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

Cashbook VoucherNumbers

0

Hi,

When I'm creating cashbook entries with eg. 7 entries and the first VoucherNumber in the caschbook is 122.
When creating the first entry I'm setting the vouchernumber with the next available according to the actual cashbook and using the same vouchernumber for the next 6 entries (vouchernumber = 122).

The next time I'm creating new entries, the vouchernumber starts with 129. So this gives a gab of 7..!

Can this somehow be avoided?

This is the code:

ICashBookEntry entry = _session.CashBookEntry.CreateFinanceVoucher(_session.CashBook.FindByName(cashbookname), _session.Account.FindByNumber(accountnbr), null);

ICashBookEntryData entryData = _session.CashBookEntryData.GetData(entry);
entryData.Date = DateTime.Parse(cashbookdate);

entryData.VatAccount = _session.VatAccount.FindByVatCode(vatacc);

entryData.Amount = amount;

entryData.Currency = _session.Currency.FindByCode(currency);

entryData.Text = text;

entryData.Department = _session.Department.FindByNumber(departmentnbr);

if (vouchernbr == 0)

{

vouchernbr = entryData.VoucherNumber;

}

entryData.VoucherNumber = vouchernbr;

_session.CashBookEntry.UpdateFromData(entryData);

 

 

created May 11, 2014 by t_nielsen
0% Accept Rate
Q 1 A 0 C 0

Visma e-conomic A/S
...