WeFact API versie 2.4.0
Offertes
Offertes zijn te beheren via de controller 'pricequote'.
add
Middels deze functie kunt u een offerte aanmaken in WeFact.
Voorbeeldbestand: /voorbeelden/pricequote/pricequote.add.php
Invoerparameters:
Veldnaam | Waarde | Omschrijving |
---|---|---|
PriceQuoteCode | string | Het offertenummer Geef deze parameter niet mee wanneer het offertenummer automatisch bepaald mag worden. |
Debtor | int | De unieke ID van een debiteur |
DebtorCode | string | Het debiteurnummer |
Date | date | De datum van de offerte |
Term | int | Geldigheidstermijn in dagen |
Discount | float | Korting (totale offerte): percentage 0 - 100 |
IgnoreDiscount | '0' of '1' | Kortingsmodule negeren (0 = nee en 1 = ja) Standaard: 0 |
VatCalcMethod | 'excl' of 'incl' | BTW rekenen op basis van exclusief of inclusief BTW? Standaard: gebruikt administratie instelling |
ReferenceNumber | string | Referentie |
CompanyName | string | Debiteur: bedrijfsnaam |
Initials | string | Debiteur: voornaam |
SurName | string | Debiteur: achternaam |
Sex | 'm', 'f', 'd' of 'fam' | Debiteur: Geslacht. Standaard: 'm' |
Address | string | Debiteur: adres |
ZipCode | string | Debiteur: postcode |
City | string | Debiteur: plaats |
Country | string | Debiteur: land, zie variabelen-lijst |
EmailAddress | string | Debiteur: e-mailadres |
SentDate | date | Verzenddatum offerte |
Sent | int | Aantal keer verstuurd. Standaard: 0 |
LanguageCode | string | Huisstijl. Leeglaten betekent standaard huisstijl. |
Description | string | Offerte omschrijving |
Comment | text | Interne notitie bij offerte |
Status | int | Offerte status, zie variabelen-lijst. Standaard: 0 (concept) |
Archived | '0' of '1' | Offerte archiveren (0 = nee en 1 = ja) |
CustomFields | array | array met eigen velden. De key van de array komt overeen met de veldcode, de value met de waarde |
PriceQuoteLines | array | Offerteregel: |
- 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 offerteregel, percentage: 0 - 100 |
- DiscountPercentageType | 'line' of 'subscription' | Type korting (enkel offerteregel of later 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 |
* Debiteurgegevens worden automatisch ingevuld door de variabele 'Debtor' of 'DebtorCode'.
** Offerteregel: Indien 'ProductCode' wordt meegegeven worden automatisch de 'Description', 'PriceExcl', 'TaxPercentage', 'PeriodicType', 'Periods', 'Periodic' en 'StartDate' ingevuld.
Voorbeeld invoer:
$api->sendRequest('pricequote', 'add', array( 'DebtorCode' => 'DB0001', 'PriceQuoteLines' => array( array( 'Number' => 3, 'ProductCode' => 'P0001' ), array( 'Description' => 'Service contract', 'PeriodicType' => 'period', 'Periods' => 3, 'Periodic' => 'm', 'PriceExcl' => 150, ) ) ));
Voorbeeld uitvoer:
Array ( [controller] => pricequote [action] => add [status] => success [date] => 2014-05-16T15:15:45+00:00 [pricequote] => Array ( [Identifier] => 1 [PriceQuoteCode] => OF0001 [Debtor] => 1 [DebtorCode] => DB0001 [Status] => 0 [Date] => 2014-05-16 [Term] => 30 [AmountExcl] => 150.00 [AmountTax] => 31.50 [AmountIncl] => 181.50 [Discount] => 0 [VatCalcMethod] => excl [IgnoreDiscount] => no [ReferenceNumber] => [CompanyName] => Company X [Initials] => John [SurName] => Jackson [Sex] => [Address] => Keizersgracht 100 [ZipCode] => 1015 AA [City] => Amsterdam [Country] => NL [EmailAddress] => info@company.com [PriceQuoteMethod] => 0 [SentDate] => [Sent] => 0 [LanguageCode] => nl_nl [Description] => [Comment] => [PriceQuoteLines] => Array ( [0] => Array ( [Identifier] => 1 [Date] => 2014-05-16 [Number] => 3 [NumberSuffix] => [ProductCode] => P0001 [Description] => Consultancy [PriceExcl] => 100 [DiscountPercentage] => 0 [DiscountPercentageType] => line [TaxPercentage] => 21 [Periods] => 1 [Periodic] => [StartDate] => [EndDate] => ) [1] => Array ( [Identifier] => 2 [Date] => 2014-05-16 [Number] => 1 [NumberSuffix] => [ProductCode] => [Description] => Service contract [PriceExcl] => 150 [DiscountPercentage] => 0 [DiscountPercentageType] => line [TaxPercentage] => 21 [Periods] => 3 [Periodic] => m [StartDate] => 2014-05-16 [EndDate] => 2014-08-15 ) ) [Translations] => Array ( [Status] => Concept [Country] => Nederland [PriceQuoteMethod] => Per e-mail [LanguageLabel] => Nederlands ) ) )