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;
        }
    
    }
    
  • 相关阅读:
    Cocos2d-x学习之---自定义图标(带触摸事件)
    Cocos2d-x关于ScrollView
    学习实战三:基于Cocos2d-x引擎模仿微信打飞机游戏
    补算法相关知识一:蚂蚁算法
    避免Cocos2d-x编写的游戏在用eclipse生成安卓包时繁琐的写Android.mk文件
    Cocos2d-x学习之---模仿微信打飞机游戏敌机层设计初想
    Cocos2d-x学习之---2013年10月11日小记
    有时候真怕,时间会说出真心话。
    NO2:设置RedHat Linux下的samba开机启动
    NO1:在Windows端安装SecureCRT来连接Linux
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1860518.html
Copyright © 2011-2022 走看看