WeFact Standard API versie 3.2



Offertes

Offertes zijn te beheren via de controller 'pricequote'.



pricequoteline add

Middels deze functie voegt u een offerteregel toe aan een bestaande offerte.
Voorbeeldbestand: /voorbeelden/pricequote/pricequoteline.add.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een offerte
PriceQuoteCode string Het offertenummer
PriceQuoteLines array Offerteregel:
- Date date     Datum. Standaard: vandaag
- Number float     Aantal. Standaard: 1
- 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)
- TaxPercentage float     BTW percentage: 0 - 100
- PeriodicType 'once' of 'period'     Periodiek factureren?
    Standaard: 'once' (eenmalig)
- Periods int     Aantal van de frequentie eenheid 'Periodic'
- Periodic string     Frequentie eenheid, zie variabelen-lijst
- StartPeriod date     Startdatum van de periode
Verplichte velden: Identifier of PriceQuoteCode en PriceQuoteLines (minimaal 1)

Voorbeeld invoer:
$api->sendRequest('pricequoteline', 'add', array(
	'PriceQuoteCode' 	=> 'OF0001',
	
	'PriceQuoteLines' 	=> array(
		array(
			'Description'	=> 'Traveling costs',
			'PriceExcl'	=> 35
		)
	)
));

Voorbeeld uitvoer:
Array
(
    [controller] => pricequoteline
    [action] => add
    [status] => success
    [date] => 2014-05-16T15:21:34+00:00
    [success] => Array
        (
            [0] => Er zijn 1 offerteregels toegevoegd
        )

    [pricequote] => Array
        (
            [Identifier] => 1
            [PriceQuoteCode] => OF0001
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Status] => 0
            [Date] => 2014-05-16
            [Term] => 30
            [AmountExcl] => 785.00
            [AmountTax] => 164.85
            [AmountIncl] => 949.85
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [ReferenceNumber] => 
            [CompanyName] => Company X
            [Initials] => John
            [SurName] => Jackson
            [Sex] => m
            [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] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [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
                            [StartPeriod] => 2014-05-16
                            [EndPeriod] => 2014-08-16
                        )

                    [2] => Array
                        (
                            [Identifier] => 3
                            [Date] => 2014-05-16
                            [Number] => 1
                            [NumberSuffix] => 
                            [ProductCode] => 
                            [Description] => Traveling costs
                            [PriceExcl] => 35
                            [DiscountPercentage] => 0
							[DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [Periods] => 1
                            [Periodic] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                )

            [Translations] => Array
                (
                    [Status] => Concept
                    [Country] => Nederland
                    [PriceQuoteMethod] => Per e-mail
                    [LanguageLabel] => Nederlands
                )

        )

)