|
| __construct () |
| Constructor.
|
|
| get ($id) |
| Get properties of an Expense Report. More...
|
|
| index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $user_ids='', $sqlfilters='', $properties='') |
| List Expense Reports. More...
|
|
| post ($request_data=null) |
| Create Expense Report object. More...
|
|
| put ($id, $request_data=null) |
| Get lines of an Expense Report. More...
|
|
| delete ($id) |
| Delete Expense Report. More...
|
|
| getAllPayments ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0) |
| Validate an Expense Report. More...
|
|
| getPayments ($pid) |
| Get a given payment. More...
|
|
| addPayment ($id, $request_data=null) |
| Create payment of ExpenseReport. More...
|
|
| updatePayment ($id, $request_data=null) |
| Update a payment of ExpenseReport. More...
|
|
| __construct ($db, $cachedir='', $refreshCache=false) |
| Constructor. More...
|
|
◆ _cleanObjectDatas()
ExpenseReports::_cleanObjectDatas |
( |
|
$object | ) |
|
|
protected |
Delete paymentExpenseReport.
- Parameters
-
- Returns
- array
@url DELETE {id}/payments Clean sensible object datas
- Parameters
-
Object | $object | Object to clean |
- Returns
- Object Object with cleaned properties
Reimplemented from DolibarrApi.
Definition at line 726 of file api_expensereports.class.php.
References $object.
◆ _validate()
ExpenseReports::_validate |
( |
|
$data | ) |
|
|
private |
◆ _validatepayment()
ExpenseReports::_validatepayment |
( |
|
$data | ) |
|
|
private |
◆ addPayment()
ExpenseReports::addPayment |
( |
|
$id, |
|
|
|
$request_data = null |
|
) |
| |
Create payment of ExpenseReport.
- Parameters
-
int | $id | ID of expense report |
array | $request_data | {@from body} Request data |
- Returns
- int ID of paymentExpenseReport
@url POST {id}/payments
Definition at line 620 of file api_expensereports.class.php.
◆ delete()
ExpenseReports::delete |
( |
|
$id | ) |
|
◆ get()
ExpenseReports::get |
( |
|
$id | ) |
|
Get properties of an Expense Report.
Return an array with Expense Report information
- Parameters
-
int | $id | ID of Expense Report |
- Returns
- Object Object with cleaned properties
- Exceptions
-
Definition at line 77 of file api_expensereports.class.php.
◆ getAllPayments()
ExpenseReports::getAllPayments |
( |
|
$sortfield = "t.rowid" , |
|
|
|
$sortorder = 'ASC' , |
|
|
|
$limit = 100 , |
|
|
|
$page = 0 |
|
) |
| |
Validate an Expense Report.
- Parameters
-
@url POST {id}/validate
- Returns
- array FIXME An error 403 is returned if the request has an empty body. Error message: "Forbidden: Content type `text/plain` is not supported." Workaround: send this in the body { "idwarehouse": 0 } Get the list of payments of expensereport.
- Parameters
-
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
- Returns
- array List of paymentExpenseReport objects
@url GET /payments
- Exceptions
-
Definition at line 544 of file api_expensereports.class.php.
◆ getPayments()
ExpenseReports::getPayments |
( |
|
$pid | ) |
|
◆ index()
ExpenseReports::index |
( |
|
$sortfield = "t.rowid" , |
|
|
|
$sortorder = 'ASC' , |
|
|
|
$limit = 100 , |
|
|
|
$page = 0 , |
|
|
|
$user_ids = '' , |
|
|
|
$sqlfilters = '' , |
|
|
|
$properties = '' |
|
) |
| |
List Expense Reports.
Get a list of Expense Reports
- Parameters
-
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
string | $user_ids | User ids filter field. Example: '1' or '1,2,3' {@pattern /^[0-9,]*$/i} |
string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" |
string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
- Returns
- array Array of Expense Report objects
Definition at line 110 of file api_expensereports.class.php.
◆ post()
ExpenseReports::post |
( |
|
$request_data = null | ) |
|
Create Expense Report object.
- Parameters
-
array | $request_data | Request data |
- Returns
- int ID of Expense Report
Definition at line 174 of file api_expensereports.class.php.
◆ put()
ExpenseReports::put |
( |
|
$id, |
|
|
|
$request_data = null |
|
) |
| |
Get lines of an Expense Report.
- Parameters
-
int | $id | Id of Expense Report |
@url GET {id}/lines
- Returns
- int Add a line to given Expense Report
- Parameters
-
int | $id | Id of Expense Report to update |
array | $request_data | Expense Report data |
@url POST {id}/lines
- Returns
- int Update a line to given Expense Report
- Parameters
-
int | $id | Id of Expense Report to update |
int | $lineid | Id of line to update |
array | $request_data | Expense Report data |
@url PUT {id}/lines/{lineid}
- Returns
- object Delete a line of given Expense Report
- Parameters
-
int | $id | Id of Expense Report to update |
int | $lineid | Id of line to delete |
@url DELETE {id}/lines/{lineid}
- Returns
- int Update Expense Report general fields (won't touch lines of expensereport)
- Parameters
-
int | $id | Id of Expense Report to update |
array | $request_data | Datas |
- Returns
- Object Updated object
- Exceptions
-
RestException | 401 Not allowed |
RestException | 404 Expense report not found |
RestException | 500 System error |
Definition at line 418 of file api_expensereports.class.php.
◆ updatePayment()
ExpenseReports::updatePayment |
( |
|
$id, |
|
|
|
$request_data = null |
|
) |
| |
The documentation for this class was generated from the following file: