WeFact API versie 2.4.0
Abonnementen
Abonnementen zijn te beheren via de controller 'subscription'.
add
Middels deze functie is het mogelijk een overige dienst (abonnement) toe te voegen.
Voorbeeldbestand: /voorbeelden/subscription/subscription.add.php
Invoerparameters:
Veldnaam | Waarde | Omschrijving |
---|---|---|
Debtor | int | De unieke ID van een debiteur |
DebtorCode | string | Het debiteurnummer |
Subscription | array | Abonnementsregel: |
- Number | float | Aantal. Standaard: 1 |
- NumberSuffix | string | Eenheid bijvoorbeeld: Kg. |
- ProductCode | string | Het productnummer |
- Description | string | Omschrijving |
- PriceExcl | float | Prijs per stuk (excl. BTW) |
- TaxCode | string | BTW code Terug te vinden bij de BTW instellingen. |
- DiscountPercentage | float | Korting abonnement, percentage: 0 - 100 |
- Periods | int | Factureer iedere: aantal periodes |
- Periodic | string | Factureer iedere: eenheid, zie variabelen-lijst |
- StartDate | date | Startdatum van de periode |
- NextDate | date | Volgende facturatiedatum. Enkel beschikbaar indien de instelling 'vooraf factureren' op 0 staat ingesteld. |
- TerminationDate | date | De datum waarop het abonnement opgezegd is |
- TerminateAfter | int | Aantal keer dat het abonnement gefactureerd moet worden. 0 = onbepaalde duur. |
- Comment | text | Interne notitie |
- AccountingCostCentre | string | Code kostenplaats boekhoudpakket Enkel beschikbaar indien geactiveerd. |
- AccountingProject | string | Code project boekhoudpakket Enkel beschikbaar indien geactiveerd. |
Let op: U kunt of de TerminateAfter of de TerminationDate meegeven, niet allebei. De TerminateAfter is inclusief het aantal keer dat het abonnement in het verleden gefactureerd is.
Voorbeeld invoer:
$api->sendRequest('subscription', 'add', array( 'DebtorCode' => 'DB0001', 'Subscription' => array( 'ProductCode' => 'P0002' ) ));
Voorbeeld uitvoer:
Array ( [controller] => subscription [action] => add [status] => success [date] => 2016-10-01T12:30:00+00:00 [success] => Array ( [0] => Abonnement Service contract is aangemaakt. ) [subscription] => Array ( [Identifier] => 1 [Debtor] => 1 [DebtorCode] => DB0001 [Number] => 1 [NumberSuffix] => [ProductCode] => P0002 [Description] => Service contract [PriceExcl] => 75 [PriceIncl] => 90.75 [TaxPercentage] => 21 [DiscountPercentage] => 0 [Periods] => 1 [Periodic] => m [StartDate] => 2014-05-16 [EndDate] => 2014-06-15 [NextDate] => 2014-05-15 [Comment] => [TerminateAfter] => 0 [TerminationDate] => [AmountExcl] => 75 [AmountIncl] => 90.75 [Created] => 2016-10-01 12:00:00 [Modified] => 2016-10-01 12:00:00 ) )