static void Kanha(Args _args)
{
LedgerJournalTable journalTable;
LedgerJournalTrans journalTrans;
LedgerJournalTableData journalTableData;
NumberSeq numberSeq;
ledgerjournalname ledgerjournalname;
Container con;
ledgerJournalCheckPost ledgerJournalCheckPost;
;
journalTableData = JournalTableData::newTable(journalTable);
journalTable.initFromLedgerJournalName();
numberSeq = NumberSeq::newGetNum(LedgerParameters::numRefLedgerJournalizeNum());
journalTable.JournalNum = numberSeq.num();
journalTable.JournalName = "AP pay";
journalTable.Name = "AP Payment";
if (journalTable.validateWrite())
{
journalTable.insert();
}
info(strFmt("Journal - %1", journalTable.JournalNum));
//numberSeq = NumberSeq::newGetVoucherFromId(journalTableData.journalTable().VoucherNumberSeq);
journalTrans.Voucher = numberSeq.num();
journalTrans.JournalNum = journalTable.JournalNum;
journalTrans.CurrencyCode = "USD";
journalTrans.AccountType = LedgerJournalACType::Vend;
journalTrans.parmAccount("1102",journalTrans.AccountType);
journalTrans.Txt = "Testing";
journalTrans.AmountCurCredit = 1000;
journalTrans.TransDate = today();
journalTrans.OffsetAccountType = journalTable.OffsetAccountType;
journalTrans.OffsetLedgerDimension= journalTable.OffsetLedgerDimension;
journalTrans.DefaultDimension = CustTable::find("1102").DefaultDimension;
journalTrans.OffsetDefaultDimension= CustTable::find("1102").DefaultDimension;
journalTrans.insert();
// Post Journal
ledgerJournalCheckPost = ledgerJournalCheckPost::newLedgerJournalTable(journalTable,Noyes::Yes);
LedgerJournalCheckPost.run();
}
{
LedgerJournalTable journalTable;
LedgerJournalTrans journalTrans;
LedgerJournalTableData journalTableData;
NumberSeq numberSeq;
ledgerjournalname ledgerjournalname;
Container con;
ledgerJournalCheckPost ledgerJournalCheckPost;
;
journalTableData = JournalTableData::newTable(journalTable);
journalTable.initFromLedgerJournalName();
numberSeq = NumberSeq::newGetNum(LedgerParameters::numRefLedgerJournalizeNum());
journalTable.JournalNum = numberSeq.num();
journalTable.JournalName = "AP pay";
journalTable.Name = "AP Payment";
if (journalTable.validateWrite())
{
journalTable.insert();
}
info(strFmt("Journal - %1", journalTable.JournalNum));
//numberSeq = NumberSeq::newGetVoucherFromId(journalTableData.journalTable().VoucherNumberSeq);
journalTrans.Voucher = numberSeq.num();
journalTrans.JournalNum = journalTable.JournalNum;
journalTrans.CurrencyCode = "USD";
journalTrans.AccountType = LedgerJournalACType::Vend;
journalTrans.parmAccount("1102",journalTrans.AccountType);
journalTrans.Txt = "Testing";
journalTrans.AmountCurCredit = 1000;
journalTrans.TransDate = today();
journalTrans.OffsetAccountType = journalTable.OffsetAccountType;
journalTrans.OffsetLedgerDimension= journalTable.OffsetLedgerDimension;
journalTrans.DefaultDimension = CustTable::find("1102").DefaultDimension;
journalTrans.OffsetDefaultDimension= CustTable::find("1102").DefaultDimension;
journalTrans.insert();
// Post Journal
ledgerJournalCheckPost = ledgerJournalCheckPost::newLedgerJournalTable(journalTable,Noyes::Yes);
LedgerJournalCheckPost.run();
}
No comments:
Post a Comment