WeFact Standard API versie 3.2



Facturen

Facturen zijn te beheren via de controller 'invoice'.



credit

Middels deze functie kunt u bestaande facturen crediteren. De factuur krijgt de status
'Vervallen' (= 9) en er ontstaat een nieuwe creditfactuur (status '8').
Wilt u een conceptfactuur verwijderen, gebruik dan de functie 'delete'.
Voorbeeldbestand: /voorbeelden/invoice/invoice.credit.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een factuur
InvoiceCode string Het factuurnummer
Verplichte velden: Identifier of InvoiceCode

Voorbeeld invoer:
$api->sendRequest('invoice', 'credit', array(
	'InvoiceCode'	=> 'F0001'
));

Voorbeeld uitvoer:
Array
(
    [controller] => invoice
    [action] => credit
    [status] => success
    [date] => 2014-05-16T15:08:48+00:00
    [success] => Array
        (
            [0] => Creditfactuur F0002 is aangemaakt
            [1] => Factuur F0001 is gecrediteerd.
        )

    [invoice] => Array
        (
            [Identifier] => 2
            [InvoiceCode] => F0002
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Status] => 8
            [SubStatus] =>
            [Date] => 2014-05-16
            [Term] => 14
            [PayBefore] => 2014-05-30
            [AmountExcl] => -450.00
            [AmountTax] => -94.50
            [AmountIncl] => -544.50
            [AmountPaid] => 0.00
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [Coupon] => 
            [ReferenceNumber] => 
            [CompanyName] => Company X
            [Initials] => John
            [SurName] => Jackson
            [Sex] => m
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@company.com
            [InvoiceMethod] => 0
            [SentDate] => 
            [Sent] => 0
            [LanguageCode] => nl_nl
            [Reminders] => 0
            [ReminderDate] => 
            [Summations] => 0
            [SummationDate] => 
            [Authorisation] => no
            [PaymentMethod] => wire
            [PayDate] => 
            [TransactionID] => 
            [Comment] => 
            [InvoiceLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 4
                            [Date] => 2014-05-16
                            [Number] => 3
                            [NumberSuffix] => 
                            [ProductCode] => P0001
                            [Description] => Consultancy
                            [PriceExcl] => -100
                            [DiscountPercentage] => 0
							[DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [1] => Array
                        (
                            [Identifier] => 5
                            [Date] => 2014-05-16
                            [Number] => 1
                            [NumberSuffix] => 
                            [ProductCode] => 
                            [Description] => Service contract
                            [PriceExcl] => -150
                            [DiscountPercentage] => 0
							[DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [2] => Array
                        (
                            [Identifier] => 6
                            [Date] => 2014-05-16
                            [Number] => 1
                            [NumberSuffix] => 
                            [ProductCode] => 
                            [Description] => Corresponderende factuur: F0001
                            [PriceExcl] => 0
                            [DiscountPercentage] => 0
							[DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                )

            [PaymentURL] => 
            [Translations] => Array
                (
                    [Status] => Creditfactuur
                    [Country] => Nederland
                    [InvoiceMethod] => Per e-mail
                    [PaymentMethod] => bankoverschrijving
                    [LanguageLabel] => Nederlands
                )

        )

)