API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Supplier Invoice Distribution

0
Hi.

Can anyone please give me an input on how to distribute a supplier invoice through the api?.

I did as follows

1. create CashBookEntryData

- var cashBookEntryData = new CashBookEntryData{

 Type = CashBookEntryType. CreditorInvoice,

Date = issueDate,

DueDate = dueDate,

CreditorInvoiceNumber = invoiceNumber,

Text = freeText,

CashBookHandle = cashBookHandle,

CurrencyHandle = currHandle,

};

cashBookEntryHandle = _sesion.CashBookEntry_CreateFromData(cashBookEntryData);

//Note : in the above  I ommitted ContraAccount, VAT and department data and everything went well in order to create SupplierInvoice

 

2. I now need to create 2 or more line (Distribute the above created invoice into 2 or more)

a. I created new cashBookEntryData and now add the following to the entry

* ContraAccount, VatAccountHandle

But instead of creating a line ;-), It created a new invoice.

 

Can anyone please help with a sample code or information?????

Thank you in advance
created Jun 10, 2015 by yakose
0% Accept Rate
Q 1 A 0 C 0

1 Answer

0
Hi Yakose

When Dimension is enabled you can use CashBookEntry_SetDistributionKey to define distribution of a CashBookEntry of type "CreditorInvoice".

You do not have to create separate entries for the distribution. This is handled by the distribution key when booking the entry.
answered Jun 29, 2015 by olej
Visma e-conomic A/S
...