WeFact API versie 2.4.4



Offertes

Offertes zijn te beheren via de controller 'pricequote'.



accept

Middels deze functie kunt u een offerte op geaccepteerd zetten. De offerte verandert naar status 'Geaccepteerd' (= 3).
Voorbeeldbestand: /voorbeelden/pricequote/pricequote.accept.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een offerte
PriceQuoteCode string Het offertenummer
CreateInvoice 'yes' of 'no' Standaard 'no'
UsePriceQuoteCodeASInvoiceReference 'yes' of 'no' Standaard: 'no'
Verplichte velden: Identifier of PriceQuoteCode


Voorbeeld invoer:
$parameters = [
    "PriceQuoteCode" => "OF2019-0001",
    "CreateInvoice" => "yes",
    "UsePriceQuoteCodeASInvoiceReference" => "yes"
];

$api->sendRequest('pricequote', 'accept', $parameters);

Voorbeeld uitvoer:
Array
(
    [controller] => pricequote
    [action] => accept
    [status] => success
    [date] => 2019-12-01T16:46:15+02:00
    [invoice] => Array
        (
            [Identifier] => 1
            [InvoiceCode] => [concept]0001
        )

    [success] => Array
        (
            [0] => Offerte OF2019-0001 is geaccepteerd
            [1] => Er is een factuur gemaakt van de offerte
        )

    [pricequote] => Array
        (
            [Identifier] => 1
            [PriceQuoteCode] => OF2019-0001
            [Debtor] => 1
            [DebtorCode] => DB10000
            [Status] => 4
            [Archived] => 0
            [Date] => 2019-10-22
            [Term] => 30
            [AmountExcl] => 229.45
            [AmountTax] => 48.18
            [AmountIncl] => 277.63
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [ReferenceNumber] => 
            [CompanyName] => Jan Janssen B.V.
            [Initials] => Jan
            [SurName] => Janssen
            [Sex] => m
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@example.com
            [PriceQuoteMethod] => 0
            [SentDate] => 
            [Sent] => 1
            [LanguageCode] => nl_nl
            [Currency] => EUR
            [Description] => 
            [Comment] => 
            [PriceQuoteLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 1
                            [Date] => 2019-10-22
                            [Number] => 2
                            [NumberSuffix] =>  
                            [ProductCode] => P0001
                            [Description] => Werkzaamheden gebaseerd op uurtarief
                            [PriceExcl] => 100
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [1] => Array
                        (
                            [Identifier] => 2
                            [Date] => 2019-10-22
                            [Number] => 155
                            [NumberSuffix] => km
                            [ProductCode] => P0002
                            [Description] => Reiskosten à € 0,19 per km
                            [PriceExcl] => 0.19
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                )

            [Created] => 2019-12-01 15:46:15
            [Modified] => 2019-12-01 15:46:15
            [AcceptURL] => 
            [VatShift] => no
            [Translations] => Array
                (
                    [Status] => Factuur aangemaakt
                    [Country] => Nederland
                    [PriceQuoteMethod] => Per e-mail
                    [LanguageLabel] => Nederlands
                )

        )

)