Inkoopfacturen

Inkoopfacturen (van leveranciers) zijn te beheren via de controller 'creditinvoice'.


add

Middels deze functie is het mogelijk een inkoopfactuur toe te voegen.


Invoerparameters:


Veldnaam Waarde Omschrijving
CreditInvoiceCode string Eigen interne inkoopfactuurnummer
Geef deze parameter niet mee wanneer het inkoopfactuurnummer automatisch bepaald mag worden.
InvoiceCode string Factuurnummer (door leverancier)
Creditor int De unieke ID van een leverancier
CreditorCode string Het leveranciernummer
Date datetime Datum van de inkoopfactuur. Standaard: vandaag
Term int Betaaltermijn in dagen
AmountIncl float Optioneel: Voor correctie op BTW afrondingen
AmountPaid float Bedrag reeds betaald
Authorisation 'yes' of 'no' Automatische incasso, standaard:
voorkeur leverancier
PayDate date Datum dat inkoopfactuur betaald is
PaymentMethod string Betaalmethode hoe de factuur is betaald, zie variabelen-lijst
Standaard: bankoverschrijving
Currency string Valuta, zie variabelen-lijst.
Comment string Interne notitie bij inkoopfactuur
Status int Factuur status, zie variabelen-lijst.
Standaard: 1 (nog niet betaald)
AccountingCostCentre string Code kostenplaats boekhoudpakket
Enkel beschikbaar indien geactiveerd.
AccountingProject string Code project boekhoudpakket
Enkel beschikbaar indien geactiveerd.
InvoiceLines array Inkoopfactuurregel:
- Description string Omschrijving
- PriceExcl float Prijs per stuk (excl. BTW)
- TaxCode string BTW code
Terug te vinden bij de BTW instellingen.
- CostCategory int De unieke ID van de kostencategorie
- StartDate date Startdatum van de periode
- EndDate date Einddatum van de periode
- AccountingCostCentre string Code kostenplaats boekhoudpakket
Enkel beschikbaar indien geactiveerd.
- AccountingProject string Code project boekhoudpakket
Enkel beschikbaar indien geactiveerd.
ProductInventory array Productvoorraad module:
- ProductId int De unieke ID van een product
- Number float Aantal toevoegen als productvoorraad
Verplichte velden: InvoiceCode, Creditor of CreditorCode en InvoiceLines (minimaal 1)

Voorbeeld invoer:


$parameters = [
    "CreditorCode" => "CD50000",
    "InvoiceCode" => "INV123456",
    "Date" => "2024-01-01",
    "Comment" => "initial test comment",
    "InvoiceLines" => [
        [
            "Description" => "Test line",
            "PriceExcl" => 100
        ],
        [
            "Description" => "Another Test line",
            "PriceExcl" => 200
        ]
    ]
];

$api->sendRequest('creditinvoice', 'add', $parameters);

Voorbeeld uitvoer:


Array
(
    [controller] => creditinvoice
    [action] => add
    [status] => success
    [date] => 2024-01-21T12:00:00+02:00
    [creditinvoice] => Array
        (
            [Identifier] => 1
            [CreditInvoiceCode] => CF0001
            [InvoiceCode] => INV123456
            [Creditor] => 1
            [CreditorCode] => CD50000
            [Status] => 1
            [SubStatus] => 
            [AuthorisationStatus] => 
            [Date] => 2024-01-01
            [Term] => 14
            [AmountExcl] => 300.00
            [AmountIncl] => 363.00
            [AmountPaid] => 0.00
            [AmountOutstanding] => 363.00
            [Authorisation] => no
            [PayDate] => 
            [PaymentMethod] => 
            [Currency] => EUR
            [Comment] => initial test comment
            [InvoiceLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 1
                            [Number] => 1
                            [Description] => Test line
                            [PriceExcl] => 100
                            [TaxCode] => I21
                            [TaxPercentage] => 21
                            [StartDate] => 
                            [EndDate] => 
                            [CostCategory] => 0
                        )

                    [1] => Array
                        (
                            [Identifier] => 2
                            [Number] => 1
                            [Description] => Another Test line
                            [PriceExcl] => 200
                            [TaxCode] => I21
                            [TaxPercentage] => 21
                            [StartDate] => 
                            [EndDate] => 
                            [CostCategory] => 0
                        )

                )

            [Created] => 2024-01-21 11:00:00
            [Modified] => 2024-01-21 11:00:00
            [Attachments] => Array
                (
                )

            [Translations] => Array
                (
                    [Status] => Nog niet betaald
                    [PaymentMethod] => 
                )

        )

)