Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding salesinvoice #10

Closed
eMaurits opened this issue Aug 4, 2015 · 1 comment
Closed

adding salesinvoice #10

eMaurits opened this issue Aug 4, 2015 · 1 comment

Comments

@eMaurits
Copy link
Contributor

eMaurits commented Aug 4, 2015

Hi,
I've been tryin to add a salesinvoice in the same way you are doing it in the example, only by hardcoded ID's and stuff. Did you manage to get an invoice added?

The exception i get is :
{ "error": { "code": "", "message": { "lang": "", "value": "Verplicht: Factuur voor\r\nVerplicht: Besteld door" } } }

This is the code i used. $items is an array just like the way you showed in your example.
$salesinvoice = new \Picqer\Financials\Exact\SalesInvoice($connection);

    $salesinvoide->InvoiceTo = '8578a5d2-d4cf-48f2-a299-03ab75edcc74';    
    $salesinvoice->OrderedBy = '8578a5d2-d4cf-48f2-a299-03ab75edcc74';
    $salesinvoice->YourRef = '50098';
    $salesinvoice->Description = 'Beschrijving';
    $salesinvoice->SalesInvoiceLines = $items;
    $salesinvoice->save();

I've also reached out to exact online with this error, will update if i get it working with the solution they maybe provide.
Thanks

@eMaurits
Copy link
Contributor Author

eMaurits commented Aug 4, 2015

Oh, i just found out i made a typo in SalesInvoice.php
I've updated it in the pull request i've made.

@eMaurits eMaurits closed this as completed Aug 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant