zoukankan      html  css  js  c++  java
  • 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;
        }
    
    }
    
  • 相关阅读:
    Layui的一些心得
    Oracle工具PLSQL
    .NET开发中 springMVC+NHibernate注入失败的几个常见错误
    配置好运行后Error creating context 'spring.root': Could not load type from string value
    css样式添加错误导致烦扰
    Oracle时间与系统不同步,TimeStampService
    前端入门10-JavaScript语法之对象
    前端入门9-JavaScript语法之运算符
    前端入门8-JavaScript语法之数据类型和变量
    前端入门7-JavaScript语法之相关术语
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1860518.html
Copyright © 2011-2022 走看看