LedgerVoucher lv;
NumberSeq numberSeq;
currencyExchangeHelper currencyExchangeHelper ;
LedgerVoucherTransObject LedgerVoucherTransObject;
LedgerVoucherObject LedgerVoucherObject;
;
currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), today());
ttsBegin;
numberSeq = NumberSeq::newGetVoucher(LedgerParameters::numRefLedgerExchAdjVoucher());
lv = LedgerVoucher::newLedgerPost(
DetailSummary::Detail,
SysModule::Ledger,
numberSeq.parmNumberSequenceCode());
LedgerVoucherObject= LedgerVoucherObject::newVoucher(numberSeq.voucher(),today(), SysModule::Ledger,LedgerTransType::Invent);
lv.addVoucher(LedgerVoucherObject);
LedgerVoucherTransObject=LedgerVoucherTransObject::newTransactionAmountDefault(
LedgerVoucherObject,//("ABI-000437"),
LedgerPostingType::LedgerJournal,
DimensionDefaultingService::serviceCreateLedgerDimension(5637157573), // Ledger account
Ledger::find(Ledger::current()).AccountingCurrency,
2004, // Amount
currencyExchangeHelper);
lv.addTrans(LedgerVoucherTransObject);
LedgerVoucherTransObject=LedgerVoucherTransObject::newTransactionAmountDefault(
LedgerVoucherObject,//("ABI-000437"),
LedgerPostingType::LedgerJournal,
DimensionDefaultingService::serviceCreateLedgerDimension(5637158025), // Ledger account
Ledger::find(Ledger::current()).AccountingCurrency,
-2004, // Amount
currencyExchangeHelper);
lv.addTrans(LedgerVoucherTransObject);
lv.end();
ttsCommit