|
dolibarr
13.0.2
|
Inheritance diagram for SupplierInvoices:
Collaboration diagram for SupplierInvoices:Public Member Functions | |
| __construct () | |
| Constructor. | |
| get ($id) | |
| Get properties of a supplier invoice object. More... | |
| index ($sortfield="t.rowid", $sortorder= 'ASC', $limit=100, $page=0, $thirdparty_ids= '', $status= '', $sqlfilters= '') | |
| List invoices. More... | |
| post ($request_data=null) | |
| Create supplier invoice object. More... | |
| put ($id, $request_data=null) | |
| Update supplier invoice. More... | |
| delete ($id) | |
| Delete supplier invoice. More... | |
| validate ($id, $idwarehouse=0, $notrigger=0) | |
| Validate an invoice. More... | |
| getPayments ($id) | |
| Get list of payments of a given supplier invoice. More... | |
| addPayment ($id, $datepaye, $payment_mode_id, $closepaidinvoices, $accountid, $num_payment= '', $comment= '', $chqemetteur= '', $chqbank= '') | |
| Add payment line to a specific supplier invoice with the remain to pay as amount. More... | |
| getLines ($id) | |
| Get lines of a supplier invoice. More... | |
| postLine ($id, $request_data=null) | |
| Add a line to given supplier invoice. More... | |
| putLine ($id, $lineid, $request_data=null) | |
| Update a line to a given supplier invoice. More... | |
| deleteLine ($id, $lineid) | |
| Deletes a line of a given supplier invoice. More... | |
Public Member Functions inherited from DolibarrApi | |
| __construct ($db, $cachedir= '', $refreshCache=false) | |
| Constructor. More... | |
Protected Member Functions | |
| _cleanObjectDatas ($object) | |
| Clean sensible object datas. More... | |
Protected Member Functions inherited from DolibarrApi | |
| _cleanObjectDatas ($object) | |
| Executed method when API is called without parameter. More... | |
| _checkFilters ($sqlfilters) | |
| Return if a $sqlfilters parameter is valid. More... | |
Private Member Functions | |
| _validate ($data) | |
| Validate fields before create or update object. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from DolibarrApi | |
| static | _checkAccessToResource ($resource, $resource_id=0, $dbtablename= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid') |
| Check user access to a resource. More... | |
| static | _forge_criteria_callback ($matches) |
| Function to forge a SQL criteria. More... | |
Definition at line 31 of file api_supplier_invoices.class.php.
|
protected |
Clean sensible object datas.
| Object | $object | Object to clean |
Definition at line 683 of file api_supplier_invoices.class.php.
Referenced by get(), getLines(), index(), and putLine().
|
private |
Validate fields before create or update object.
| array | $data | Datas to validate |
| RestException |
Definition at line 705 of file api_supplier_invoices.class.php.
Referenced by post().
| SupplierInvoices::addPayment | ( | $id, | |
| $datepaye, | |||
| $payment_mode_id, | |||
| $closepaidinvoices, | |||
| $accountid, | |||
$num_payment = '', |
|||
$comment = '', |
|||
$chqemetteur = '', |
|||
$chqbank = '' |
|||
| ) |
Add payment line to a specific supplier invoice with the remain to pay as amount.
| int | $id | Id of invoice |
| string | $datepaye | { body} Payment date { timestamp} |
| int | $payment_mode_id | { body} Payment mode ID (look it up via REST GET to /setup/dictionary/payment_types) { 1} |
| string | $closepaidinvoices | { body} Close paid invoices { yes,no} |
| int | $accountid | { body} Bank account ID (look it up via REST GET to /bankaccounts) { 1} |
| string | $num_payment | { body} Payment number (optional) |
| string | $comment | { body} Note (optional) |
| string | $chqemetteur | { body} Payment issuer (mandatory if payment_mode_id corresponds to 'CHQ'-payment type) |
| string | $chqbank | { body} Issuer bank name (optional) |
POST {id}/payments
| RestException | 400 |
| RestException | 401 |
| RestException | 404 |
Definition at line 402 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource(), db, dol_getIdFromCode(), and price2num().
| SupplierInvoices::delete | ( | $id | ) |
Delete supplier invoice.
| int | $id | Supplier invoice ID |
| RestException | 401 |
| RestException | 404 |
| RestException | 500 |
Definition at line 268 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource().
| SupplierInvoices::deleteLine | ( | $id, | |
| $lineid | |||
| ) |
Deletes a line of a given supplier invoice.
| int | $id | Id of supplier invoice |
| int | $lineid | Id of the line to delete |
DELETE {id}/lines/{lineid}
| RestException | 400 Bad parameters |
| RestException | 401 Not allowed |
| RestException | 404 Not found |
| RestException | 405 Error |
Definition at line 647 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource().
| SupplierInvoices::get | ( | $id | ) |
Get properties of a supplier invoice object.
Return an array with supplier invoice information
| int | $id | ID of supplier invoice |
| RestException |
Definition at line 66 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
| SupplierInvoices::getLines | ( | $id | ) |
Get lines of a supplier invoice.
| int | $id | Id of supplier invoice |
GET {id}/lines
Definition at line 491 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
| SupplierInvoices::getPayments | ( | $id | ) |
Get list of payments of a given supplier invoice.
| int | $id | Id of SupplierInvoice |
GET {id}/payments
| RestException | 400 |
| RestException | 401 |
| RestException | 404 |
| RestException | 405 |
Definition at line 355 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource().
| SupplierInvoices::index | ( | $sortfield = "t.rowid", |
|
$sortorder = 'ASC', |
|||
$limit = 100, |
|||
$page = 0, |
|||
$thirdparty_ids = '', |
|||
$status = '', |
|||
$sqlfilters = '' |
|||
| ) |
List invoices.
Get a list of supplier invoices
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Limit for list |
| int | $page | Page number |
| string | $thirdparty_ids | Thirdparty ids to filter invoices of (example '1' or '1,2,3') { /^[0-9,]*$/i} |
| string | $status | Filter by invoice status : draft | unpaid | paid | cancelled |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.datec:<:'20160101')" |
| RestException |
Definition at line 101 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkFilters(), _cleanObjectDatas(), and db.
| SupplierInvoices::post | ( | $request_data = null | ) |
Create supplier invoice object.
| array | $request_data | Request datas |
| RestException | 401 |
| RestException | 500 |
Definition at line 199 of file api_supplier_invoices.class.php.
References _validate(), and dol_now().
| SupplierInvoices::postLine | ( | $id, | |
$request_data = null |
|||
| ) |
Add a line to given supplier invoice.
| int | $id | Id of supplier invoice to update |
| array | $request_data | supplier invoice line data |
POST {id}/lines
Definition at line 523 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource().
| SupplierInvoices::put | ( | $id, | |
$request_data = null |
|||
| ) |
Update supplier invoice.
| int | $id | Id of supplier invoice to update |
| array | $request_data | Datas |
| RestException | 401 |
| RestException | 404 |
Definition at line 231 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource().
| SupplierInvoices::putLine | ( | $id, | |
| $lineid, | |||
$request_data = null |
|||
| ) |
Update a line to a given supplier invoice.
| int | $id | Id of supplier invoice to update |
| int | $lineid | Id of line to update |
| array | $request_data | InvoiceLine data |
PUT {id}/lines/{lineid}
| RestException | 401 Not allowed |
| RestException | 404 Not found |
| RestException | 304 Error |
Definition at line 586 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
| SupplierInvoices::validate | ( | $id, | |
$idwarehouse = 0, |
|||
$notrigger = 0 |
|||
| ) |
Validate an invoice.
| int | $id | Invoice ID |
| int | $idwarehouse | Warehouse ID |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
POST {id}/validate
| RestException | 304 |
| RestException | 401 |
| RestException | 404 |
| RestException | 405 |
| RestException | 500 |
Definition at line 312 of file api_supplier_invoices.class.php.
References DolibarrApi\_checkAccessToResource().