phpexact-onlinepicqer-exact-php-client

Problems getting attachment of invoice in exact online


I'm using the library picqer/exact-online and I was getting attachments of an invoice I just created like this: However this suddenly stopped working a few days ago, can anybody help here?

Following error occurs:

Picqer\Financials\Exact\ApiException: Error 400: Unrecognized 'Edm.Guid' literal 'guid''' in '12'. (uncaught exception) at /var/web/partners/vendor/picqer/exact-php-client/src/Picqer/Financials/Exact/Connection.php line 560 while creating an invoice.

$printedInvoice = new PrintedSalesInvoice($this->exact);
$printedInvoice->InvoiceID = $invoice->InvoiceID;
$documentData = $printedInvoice->save();

$attachment   = new DocumentAttachment($this->exact);
$attachments  = $attachment->filter(sprintf(
    "Document eq guid'%s'", 
    $documentData['Document']
));

Solution

  • Problem was discovered and there was a hidden error creating the PrintedSalesInvoice because my invoice had an end date set to a non-existing financial year.