Facturen
Facturen zijn te beheren via de controller 'invoice'.
edit
Met behulp van deze functie is het mogelijk om een factuur te bewerken.
Alleen ingevoerde parameters worden gewijzigd.
Invoerparameters:
| Veldnaam | Waarde | Omschrijving |
|---|---|---|
| Identifier | int | De unieke ID van een factuur. |
| InvoiceCode | string | Het factuurnummer. Geef deze parameter niet mee wanneer het factuurnummer automatisch bepaald mag worden. |
| Debtor | int | De unieke ID van een klant |
| DebtorCode | string | Het klantnummer |
| ExtraClientContactId | int | De unieke ID van een extra contactpersoon |
| Date | date | De datum van de factuur |
| Term | int | Betaaltermijn in dagen |
| AmountPaid | float | Bedrag reeds betaald |
| Discount | float | Korting (totale factuur]: percentage 0 - 100 |
| IgnoreDiscount | '0' of '1' | Kortingsmodule negeren (0 = nee en 1 = ja] Standaard: 0 |
| UseProductInventory | 'yes' of 'no' | Voorraad bijwerken Standaard: yes |
| VatCalcMethod | 'excl' of 'incl' | BTW rekenen op basis van exclusief of inclusief BTW? Standaard: gebruikt administratie instelling |
| ReferenceNumber | string | Referentie |
| CompanyName | string | Klant: bedrijfsnaam |
| Initials | string | Klant: voornaam |
| SurName | string | Klant: achternaam |
| Sex | 'm', 'f', 'd', 'fam' of 'u' | Klant: geslacht, standaard: 'm' |
| Address | string | Klant: adres |
| ZipCode | string | Klant: postcode |
| City | string | Klant: plaats |
| Country | string | Klant: land, zie variabelen-lijst |
| EmailAddress | string | Klant: e-mailadres |
| InvoiceMethod | int | Factuur verzendmethode, zie variabelen-lijst. Standaard: voorkeur klant |
| SentDate | datetime | Verzenddatum factuur |
| Sent | int | Aantal keer verstuurd. Standaard: 0 |
| LanguageCode | string | Huisstijl. Leeglaten betekent standaard huisstijl. |
| Authorisation | 'yes' of 'no' | Automatische incasso, standaard: voorkeur klant |
| PaymentMethod | string | Betaalmethode hoe de factuur is betaald, zie variabelen-lijst Standaard: bankoverschrijving |
| PayDate | date | Betaaldatum |
| TransactionID | string | Transactie ID van (online] betaling |
| Description | string | Factuur omschrijving |
| Comment | text | Interne notitie bij factuur |
| Status | int | Factuur status, zie variabelen-lijst. Standaard: 0 (concept) |
| SubStatus | string | Blokkeer een concept factuur door "BLOCKED" mee te geven. Pauzeer het betalingstraject van een verstuurde/deels betaalde factuur door "PAUSED" mee te geven. |
| CustomFields | array | array met eigen velden. De key van de array komt overeen met de veldcode, de value met de waarde |
| AccountingCostCentre | string | Code kostenplaats boekhoudpakket Enkel beschikbaar indien geactiveerd. |
| AccountingProject | string | Code project boekhoudpakket Enkel beschikbaar indien geactiveerd. |
| InvoiceLines | array | Factuurregel: |
| - Identifier | int | De unieke ID van een regel |
| - Date | date | Datum. Standaard: vandaag |
| - Number | float | Aantal. Standaard: 1 |
| - NumberSuffix | string | Eenheid bijvoorbeeld: Kg. |
| - ProductCode | string | Productnummer |
| - Description | string | Omschrijving |
| - PriceExcl | float | Prijs per stuk (excl. BTW] |
| - DiscountPercentage | float | Korting factuurregel, percentage: 0 - 100 |
| - DiscountPercentageType | 'line' of 'subscription' | Type korting (enkel factuurregel of ook voor abonnement] |
| - TaxCode | string | BTW code Terug te vinden bij de BTW instellingen. |
| - StartDate | date | Startdatum van de periode |
| - EndDate | date | Einddatum van de periode Enkel in te geven als PeriodicType 'once' is. |
| - PeriodicType | 'once' of 'period' | Periodiek factureren? Standaard: 'once' (Geen abonnement] |
| - Periods | int | Factureer iedere: aantal periodes |
| - Periodic | string | Factureer iedere: eenheid, zie variabelen-lijst |
| - AccountingCostCentre | string | Code kostenplaats boekhoudpakket Enkel beschikbaar indien geactiveerd. |
| - AccountingProject | string | Code project boekhoudpakket Enkel beschikbaar indien geactiveerd. |
* Klantgegevens worden automatisch ingevuld door de variabele 'Debtor' of 'DebtorCode'.
** Factuurregel: Indien 'ProductCode' wordt meegegeven worden automatisch de 'Description', 'PriceExcl', 'TaxCode', 'PeriodicType', 'Periods', 'Periodic' en 'StartDate' ingevuld.
Voorbeeld invoer:
$parameters = [
"Identifier" => 1,
"Discount" => 10,
"Term" => 30
];
$api->sendRequest('invoice', 'edit', $parameters);
Voorbeeld uitvoer:
Array
(
[controller] => invoice
[action] => edit
[status] => success
[date] => 2024-01-21T12:00:00+02:00
[invoice] => Array
(
[Identifier] => 1
[InvoiceCode] => [concept]0001
[Debtor] => 2
[DebtorCode] => DB10001
[Status] => 0
[SubStatus] =>
[PaymentPausedEndDate] =>
[PaymentPausedReason] =>
[Date] => 2023-11-22
[Term] => 30
[PayBefore] => 2023-12-22
[PaymentURL] =>
[AmountExcl] => 206.68
[AmountTax] => 43.40
[AmountIncl] => 250.08
[AmountPaid] => 0.00
[AmountOutstanding] => 250.08
[Discount] => 10
[VatCalcMethod] => excl
[IgnoreDiscount] => no
[ReferenceNumber] =>
[CompanyName] => Bedrijfsnaam
[Initials] => Jan
[SurName] => Janssen
[Sex] => m
[Address] => Keizersgracht 100
[ZipCode] => 1015 AA
[City] => Amsterdam
[Country] => NL
[EmailAddress] => info@example.com
[ExtraClientContactId] => 1
[InvoiceMethod] => 0
[ScheduledAt] =>
[SentDate] =>
[Sent] => 0
[Reminders] => 0
[ReminderDate] =>
[Summations] => 0
[SummationDate] =>
[Authorisation] => no
[PaymentMethod] =>
[PayDate] =>
[TransactionID] =>
[LanguageCode] => nl_nl
[Currency] => EUR
[Description] =>
[Comment] =>
[InvoiceLines] => Array
(
[0] => Array
(
[Identifier] => 1
[Date] => 2023-11-22
[Number] => 2
[NumberSuffix] =>
[ProductCode] => P0001
[Description] => Werkzaamheden gebaseerd op uurtarief
[PriceExcl] => 100
[DiscountPercentage] => 0
[DiscountPercentageType] => line
[TaxCode] => V21
[TaxPercentage] => 21
[PeriodicID] => 0
[Periods] => 1
[Periodic] =>
[StartDate] =>
[EndDate] =>
[StartPeriod] =>
[EndPeriod] =>
)
[1] => Array
(
[Identifier] => 2
[Date] => 2023-11-22
[Number] => 155
[NumberSuffix] => km
[ProductCode] => P0002
[Description] => Reiskosten à € 0,19 per km
[PriceExcl] => 0.19
[DiscountPercentage] => 0
[DiscountPercentageType] => line
[TaxCode] => V21
[TaxPercentage] => 21
[PeriodicID] => 0
[Periods] => 1
[Periodic] =>
[StartDate] =>
[EndDate] =>
[StartPeriod] =>
[EndPeriod] =>
)
[2] => Array
(
[Identifier] => 3
[Date] => 2023-11-22
[Number] => 1
[NumberSuffix] =>
[ProductCode] => P0002
[Description] => Reiskosten à € 0,19 per km
[PriceExcl] => 0.19
[DiscountPercentage] => 0
[DiscountPercentageType] => line
[TaxCode] => V21
[TaxPercentage] => 21
[PeriodicID] => 0
[Periods] => 1
[Periodic] =>
[StartDate] =>
[EndDate] =>
[StartPeriod] =>
[EndPeriod] =>
)
)
[Created] => 2024-01-21 11:00:00
[Modified] => 2024-01-21 11:00:00
[VatShift] => no
[Attachments] => Array
(
)
[Translations] => Array
(
[Status] => Concept
[Country] => Nederland
[InvoiceMethod] => Per e‑mail
[PaymentMethod] =>
[LanguageLabel] => Nederlands
)
)
)