HostFact API versie 3.1
Inkoopfacturen
Inkoopfacturen (van crediteuren) zijn te beheren via de controller 'creditinvoice'.
creditinvoiceline delete
Met deze functie kunnen factuurregels worden verwijderd van een bestaande inkoopfactuur.
Voorbeeldbestand: /voorbeelden/creditinvoice/creditinvoiceline.delete.php
Invoerparameters:
Veldnaam | Waarde | Omschrijving |
---|---|---|
Identifier | int | De unieke ID van een inkoopfactuur |
CreditInvoiceCode | string | Eigen interne inkoopfactuurnummer |
InvoiceLines | array | Inkoopfactuurregel: |
- Identifier | int | De unieke ID van een regel |
Voorbeeld invoer:
<?php require_once("../hostfact_api.php"); $api = new HostFactAPI(); $creditInvoiceParams = array( 'CreditInvoiceCode' => 'CF0001', 'InvoiceLines' => array( array( 'Identifier' => '2' ) ) ); $response = $api->sendRequest('creditinvoiceline', 'delete', $creditInvoiceParams); print_r_pre($response); ?>
Voorbeeld uitvoer:
Array ( [controller] => creditinvoiceline [action] => delete [status] => success [date] => 2022-11-24T12:00:00+02:00 [success] => Array ( [0] => Er zijn 1 factuurregels verwijderd ) [creditinvoice] => Array ( [Identifier] => 1 [CreditInvoiceCode] => CF0001 [InvoiceCode] => 2018-6422 [Creditor] => 1 [CreditorCode] => CD0001 [Status] => 1 [Date] => 2018-01-01 [Term] => 0 [AmountExcl] => 125.00 [AmountIncl] => 196.63 [AmountPaid] => 0.00 [Authorisation] => no [Private] => 0.00 [PrivatePercentage] => 0 [ReferenceNumber] => [PayDate] => [InvoiceLines] => Array ( [0] => Array ( [Identifier] => 1 [Number] => 1 [Description] => SLA contract #2 [PriceExcl] => 125 [TaxPercentage] => 21 ) ) [Created] => 2022-11-24 11:00:00 [Modified] => 2022-11-24 11:00:00 [Attachments] => Array ( [0] => Array ( [Identifier] => 3 [Filename] => sample.pdf ) ) [Translations] => Array ( [Status] => Nog niet betaald ) ) )