WeFact Hosting API versie 2.7



Facturen

Facturen zijn te beheren via de controller 'invoice'.



invoiceline delete

Middels deze functie verwijdert u een factuurregel van een bestaande factuur. Deze functie is beschikbaar voor een factuur in alle statussen.
Voorbeeldbestand: /voorbeelden/invoice/invoiceline.delete.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een factuur
InvoiceCode string Het factuurnummer
InvoiceLines array Factuurregel:
- Identifier int     De unieke ID van een factuurregel
Verplichte velden: Identifier of InvoiceCode, InvoiceLines id

Voorbeeld invoer:
<?php

require_once("../wefact_api.php");

$api = new WeFactAPI();

$invoiceLineParams = array(
					'InvoiceCode'	=> 'F0001',
					
					'InvoiceLines'	=> array(
						array(
							'Identifier'	=> 3
						)
					)
);

$response = $api->sendRequest('invoiceline', 'delete', $invoiceLineParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => invoiceline
    [action] => delete
    [status] => success
    [date] => 2016-09-01T12:00:00+02:00
    [success] => Array
        (
            [0] => Er zijn 1 factuurregels verwijderd
        )

    [invoice] => Array
        (
            [Identifier] => 2
            [InvoiceCode] => F0001
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Status] => 2
            [SubStatus] => 
            [Date] => 2016-05-11
            [Term] => 14
            [PayBefore] => 2016-05-25
            [PaymentURL] => https://www.domain.com/klantenpaneel/betalen/?payment=F0001&key=b494392e771493e21a9014836af3450f
            [AmountExcl] => 15.00
            [AmountTax] => 3.15
            [AmountIncl] => 18.15
            [TaxRate] => 0
            [Compound] => no
            [AmountPaid] => 0.00
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [Coupon] => 
            [ReferenceNumber] => 
            [CompanyName] => Company X
            [Sex] => m
            [Initials] => John
            [SurName] => Jackson
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@company.com
            [InvoiceMethod] => 0
            [Template] => 1
            [SentDate] => 
            [Sent] => 0
            [Reminders] => 0
            [ReminderDate] => 
            [Summations] => 0
            [SummationDate] => 
            [Authorisation] => no
            [PaymentMethod] => 
            [PayDate] => 
            [TransactionID] => 
            [Description] => 
            [Comment] => 
            [InvoiceLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 4
                            [Date] => 2016-07-14
                            [Number] => 1
                            [NumberSuffix] => 
                            [ProductCode] => P003
                            [Description] => Domain example.com
                            [PriceExcl] => 15
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [PeriodicID] => 7
                            [Periods] => 1
                            [Periodic] => j
                            [StartPeriod] => 2016-07-14
                            [EndPeriod] => 2017-07-14
                            [ProductType] => 
                            [Reference] => 0
                            [NoDiscountAmountIncl] => 18.15
                            [NoDiscountAmountExcl] => 15.00
                            [DiscountAmountIncl] => 0.00
                            [DiscountAmountExcl] => 0.00
                        )

                )

            [Created] => 2016-09-01 12:00:00
            [Modified] => 2016-09-01 12:00:00
            [Attachments] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 4
                            [Filename] => sample.pdf
                        )

                )

            [Translations] => Array
                (
                    [Status] => Verzonden
                    [Country] => Nederland
                    [InvoiceMethod] => Per e-mail
                    [Template] => Factuur
                    [PaymentMethod] => 
                )

            [AmountDiscount] => 0.00
            [AmountDiscountIncl] => 0.00
            [UsedTaxrates] => Array
                (
                    [0.21] => Array
                        (
                            [AmountExcl] => 15.00
                            [AmountTax] => 3.15
                            [AmountIncl] => 18.15
                        )

                )

        )

)