LedgerTransModule class
How do I find Ledger Transaction Detail?
below X++ Code
wrote by Jimmy oct 25th 2010
1) declaration
public class ReportRun extends ObjectRun
{
TmpLedgerBase TmpLedgerBase; //Jimmy 2010-05-27
LedgerTransModule LedgerTransModule; //Jimmy 2010-05-27
}
2) Calc
public void executeSection() //Jimmy 2010-05-27 calc financial Amount
{
CustInvoiceJour CustInvoiceJour;
;
CustInvoiceJour = CustInvoiceJour::findFromCustInvoiceTrans(CustInvoiceTrans_1.OrigSalesId,CustInvoiceTrans_1.InvoiceId,CustInvoiceTrans_1.InvoiceDate,CustInvoiceTrans_1.numberSequenceGroup);
LedgerTransModule = new LedgerTransModule(CustInvoiceJour.LedgerVoucher,CustInvoiceTrans_1.InvoiceDate);
LedgerTransModule.createTransModule();
TmpLedgerBase.setTmpData(LedgerTransModule.transModule());
super();
}
3)get values from temp table
display Amount Amount()
{
;
select firstonly TmpLedgerBase
where TmpLedgerBase.id == CustInvoiceTrans_1.ItemId;
return - TmpLedgerBase.Amount;
}
Example:
For a Purchase Order transaction that is posted to the ledger, how can I find the vendor and the item that was purchased? I am currently using LedgerTrans table and I am able to see the ledger transaction type (Purchase Order,Production, Inventory, Payment, etc.), but how do I get to the detail level for a purchase order transaction to determine what item was purchased and from whom?
Jobs below as
static void Jimmy_ledgerTransfromVoucher(Args _args) { LedgerTrans ledgerTrans; LedgerTransModule ledgerTransModule; TmpLedgerBase tmpLedgerBase; ; while select Voucher,TransDate from ledgertrans where ledgertrans.TransType == ledgertransType::Purch { ledgerTransModule = new LedgerTransModule(ledgerTrans.Voucher,ledgertrans.TransDate); ledgerTransModule.createTransModule(); tmpLedgerBase.setTmpData(ledgerTransModule.transModule()); while select tmpLedgerBase where tmpLedgerBase.Module == SysModule::Purch || tmpLedgerBase.Module == SysModule::Invent || tmpLedgerBase.OriginalDocument == OriginalDocument::PurchaseInvoice { info(strfmt( "Amoount = %1,id = %2,IdName = %3,Module = %4,OrgDocument = %5,voucher %6" , tmpLedgerBase.Amount, tmpLedgerBase.id, tmpLedgerBase.IdName, tmpLedgerBase.Module, tmpLedgerBase.OriginalDocument, tmpLedgerBase.Voucher) ); } break ; } } |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 智能桌面机器人:用.NET IoT库控制舵机并多方法播放表情
· Linux glibc自带哈希表的用例及性能测试
· 深入理解 Mybatis 分库分表执行原理
· 如何打造一个高并发系统?
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 手把手教你在本地部署DeepSeek R1,搭建web-ui ,建议收藏!
· 新年开篇:在本地部署DeepSeek大模型实现联网增强的AI应用
· Janus Pro:DeepSeek 开源革新,多模态 AI 的未来
· 互联网不景气了那就玩玩嵌入式吧,用纯.NET开发并制作一个智能桌面机器人(三):用.NET IoT库
· 【非技术】说说2024年我都干了些啥