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;
        }
    
    }
    
  • 相关阅读:
    中值定理
    poj 3984 迷宫问题 bfs
    android 处理网络状态——无网,2g,3g,wifi,ethernet,other
    POJ 1273 || HDU 1532 Drainage Ditches (最大流模型)
    Android硬件加速
    Android的横竖屏切换
    滑雪_poj_1088(记忆化搜索).java
    Rank of Tetris(hdu1811拓扑排序+并查集)
    git在windows下clone、pull或者push内存溢出的解决办法
    数据库中DDL、DML、DCL和TCP概念
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1860518.html
Copyright © 2011-2022 走看看