PHP code example of btjsteens / eboekhouden

1. Go to this page and download the library: Download btjsteens/eboekhouden library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

btjsteens / eboekhouden example snippets


$relation = $eBoekhouden->getRelationByCode('BAR');
if (isset($relation->Relaties->cRelatie)) {
    // Relation exists
}

$mutation = $eBoekhouden->getMutationsByInvoiceNumber($invoiceNumber);
if (isset($mutation->Mutaties->cMutatieList)) {
    // Mutation with $invoiceNumber exists
}

$mutation = new Mutation();
$mutation->setKind("FactuurVerstuurd"); // FactuurOntvangen, FactuurVerstuurd, FactuurbetalingOntvangen, FactuurbetalingVerstuurd, GeldOntvangen, GeldUitgegeven
$mutation->setDate(date('Y-m-d'));
$mutation->setAccount(1000); // Ledger account code (in this example, the acocunt for debtors)
$mutation->setRelationCode("BAR"); // Must match existing Relation
$mutation->setInvoiceNumber("INV-500"); // Must be unique
$mutation->setTermOfPayment(30); // In days
$mutation->setDescription("FOO");
$mutation->setInOrExVat("IN");
$mutation->addMutationLine(10, 21, "HOOG_VERK_21", 8000, 0)); // Price, VAT %, VAT tariff name (see documentation chapter 4), ledger account code for mutation and optional cost center ID.
$eBoekhouden->addMutation($mutation);

var_dump($this->soapClient->__getLastRequestHeaders()); // the headers of your last request
var_dump($this->soapClient->__getLastRequest()); // your last request