HostFact API versie 3.1
Inkoopfacturen
Inkoopfacturen (van crediteuren) zijn te beheren via de controller 'creditinvoice'.
edit
Met behulp van deze functie is het mogelijk om een inkoopfactuur te bewerken.
Alleen ingevoerde parameters worden gewijzigd.
Voorbeeldbestand: /voorbeelden/creditinvoice/creditinvoice.edit.php
Invoerparameters:
Veldnaam | Waarde | Omschrijving |
---|---|---|
Identifier | int | De unieke ID van een inkoopfactuur |
CreditInvoiceCode | string | Eigen interne inkoopfactuurnummer Geef deze parameter niet mee wanneer het inkoopfactuurnummer automatisch bepaald mag worden. |
InvoiceCode | string | Factuurnummer (door crediteur) |
ReferenceNumber | string | Referentie |
Creditor | int | De unieke ID van een crediteur |
CreditorCode | string | Het crediteurnummer |
Date | datetime | Datum van de inkoopfactuur. Standaard: vandaag |
Term | int | Betaaltermijn in dagen |
AmountPaid | float | Bedrag reeds betaald |
Authorisation | 'yes' of 'no' | Automatische incasso, standaard: voorkeur crediteur |
PayDate | date | Datum dat inkoopfactuur betaald is |
Private | float | Privé: bedrag |
PrivatePercentage | int | Privé: percentage 0 - 100 |
Status | int | Factuur status, zie variabelen-lijst. Standaard: 1 (nog niet betaald) |
InvoiceLines | array | Inkoopfactuurregel: |
- Identifier | int | De unieke ID van een regel |
- Number | float | Aantal. Standaard: 1 |
- Description | string | Omschrijving |
- PriceExcl | float | Prijs per stuk (excl. BTW) |
- TaxPercentage | float | BTW percentage: 0 - 100 |
Voorbeeld invoer:
<?php require_once("../hostfact_api.php"); $api = new HostFactAPI(); $creditInvoiceParams = array( 'CreditInvoiceCode' => 'CF0001', 'Term' => '14' ); $response = $api->sendRequest('creditinvoice', 'edit', $creditInvoiceParams); print_r_pre($response); ?>
Voorbeeld uitvoer:
Array ( [controller] => creditinvoice [action] => edit [status] => success [date] => 2022-11-24T12:00:00+02:00 [creditinvoice] => Array ( [Identifier] => 1 [CreditInvoiceCode] => CF0001 [InvoiceCode] => 2018-6422 [Creditor] => 1 [CreditorCode] => CD0001 [Status] => 1 [Date] => 2018-01-01 [Term] => 14 [AmountExcl] => 162.50 [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 ) [1] => Array ( [Identifier] => 2 [Number] => 3 [Description] => Domains .com [PriceExcl] => 12.5 [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 ) ) )