static void CashInHand_Credit(Args _args)
{
Ledger ledger = ledger::findByLegalEntity(CompanyInfo::findDataArea("CENT").RecId);
LedgerJournalTrans ledgerJournalTrans;
GeneralJournalEntry generalJournalEntry;
GeneralJournalAccountEntry generalJournalAccountEntry;
MainAccount MainAccount;
// ASAP_ReceiptDetails tmp_ReceiptDetails;
while select ledgerJournalTrans
where ledgerJournalTrans.PaymMode == "Cash"
join generalJournalEntry
index hint LedgerAccountingDateIdx
where generalJournalEntry.Ledger == ledger.RecId
&& generalJournalEntry.AccountingDate >= mkDate(11,04,2017)
&& generalJournalEntry.AccountingDate <= mkDate(11,04,2017)
&& generalJournalEntry.SubledgerVoucher == ledgerJournalTrans.Voucher
join generalJournalAccountEntry // sum(AccountingCurrencyAmount) from
where generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId
join MainAccount
where MainAccount.RecId == generalJournalAccountEntry.MainAccount
&& MainAccount.MainAccountId == '1111001'
{
info(strFmt(" Amount --%1,Voucher --- %2,date -- %3 ,txt -- %4,Company -- %5", generalJournalAccountEntry.AccountingCurrencyAmount,generalJournalEntry.SubledgerVoucher,generalJournalEntry.AccountingDate,generalJournalAccountEntry.Text, ledgerJournalTrans.Company));
//tmp_ReceiptDetails.Voucher = generalJournalEntry.SubledgerVoucher;
//tmp_ReceiptDetails.TransDate = generalJournalEntry.AccountingDate;
//tmp_ReceiptDetails.AccountingCurrencyAmount = generalJournalAccountEntry.AccountingCurrencyAmount;
//tmp_ReceiptDetails.Txt = generalJournalAccountEntry.Text;
//tmp_ReceiptDetails.insert();
}
}
No comments:
Post a Comment