Bookkeeping - required fields

Forum for JAVA developers using the E-conomic API.
Exchange your ideas, tip and tricks using the API.
Best Practices

Bookkeeping - required fields

Postby ecshh » Wed Mar 30, 2011 2:52 pm

Hi.

We're creating CashBookEntries with the following code:

Code: Select all
       CashBookEntryData cashBookEntryData = new CashBookEntryData();
       cashBookEntryData.setType(CashBookEntryType.DebtorPayment);
       cashBookEntryData.setCashBookHandle(cashBookHandle);
       cashBookEntryData.setVoucherNumber(invoiceNumber);
       cashBookEntryData.setDebtorHandle(debtorHandle);
       cashBookEntryData.setAmount(amount);
       cashBookEntryData.setCurrencyHandle(currencyHandle);
       cashBookEntryData.setDate(invoiceDate);
       cashBookEntryData.setText(text);
       session.cashBookEntry_CreateFromData(cashBookEntryData);


The above code will create an entry in the cashbook with the correct amount.
However, when we look at the cashreport in the web ui, the amount is zero.

What are we missing?
-
ecshh
 
Posts: 1
Joined: Wed Mar 30, 2011 2:45 pm

Re: Bookkeeping - required fields

Postby Christian Estrup » Thu Mar 31, 2011 11:47 am

Hi,

You must set AmountDefaultCurrency as well.

If the currency of the entry is the default currency of the company (which is the default for new entries), Amount and AmountDefaultCurrency must be equal for the entry to be bookable subsequently anyway.


Best regards,
Christian Estrup
Chief Architect

Image
Online accounting
User avatar
Christian Estrup
 
Posts: 245
Joined: Tue Jun 09, 2009 6:37 pm


Return to JAVA



cron