static void Job649(Args _args) 

    ItemId                  ItemId          = "000XA00612R1"; 
    InventDimId             InventDimId     = "K00811600"; 
    InventQty               qty             = ; 
    InventQty               physicalQty; 
 
    NumberSeq               numberSeq; 
    InventJournalVoucherId  voucherId; 
    InventTransId           InventTransId; 
     
    InventUpd_Financial     financial; 
    InventMov_Vir_Counting  movement; 
 
    TransactionTxt          transactionTxt; 
 
    LedgerVoucher           ledgerVoucher; 
    LedgerVoucherObject     ledgerVoucherObject; 
     
    THK_2ndInventQty        THK_2ndqty; 
    CostAmount calcCostAmount() 
    { 
        InventPriceMap      inventPriceMap      = InventTable::find(ItemId).inventCostPriceMap(InventDimId); 
        ; 
        return PriceDisc::price2Amount(inventPriceMap.price(), 
                                       inventPriceMap.priceUnit(), 
                                       , 
                                       qty, 
                                       qty, 
                                       inventPriceMap.markup(), 
                                       , 
                                       '', 
                                       ); 
    } 
    ; 
    physicalQty = InventSum::find(ItemId,InventDimId).PhysicalInvent; 
    qty = qty - physicalQty; 
    if (qty != ) 
    { 
        if (!InventTransId) 
        { 
            InventTransId = NumberSeq::newGetNum(InventParameters::numRefInventTransId()).num(); 
        } 
         
        numberSeq = NumberSeq::newGetNum(InventParameters::numRefInventJournalVoucherId()); 
         
        voucherId = numberSeq.num(); 
 
        transactionTxt   = new TransactionTxt(); 
        transactionTxt.setType(LedgerTransTxt::InventJournalCount); 
        transactionTxt.setDate(systemdateget()); 
        transactionTxt.setVoucher(voucherId); 
         
        ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Summary, 
                                                    SysModule::Invent, 
                                                    numberSeq.parmVoucherSequenceCode()); 
        ledgerVoucherObject = LedgerVoucherObject::newVoucher(voucherId, 
                                                              systemdateget(), 
                                                              SysModule::Invent, 
                                                              LedgerTransType::Invent); 
        ledgerVoucherObject.lastTransTxt(transactionTxt.txt()); 
        ledgerVoucher.addVoucher(ledgerVoucherObject); 
 
        movement = InventMov_Vir_Counting::newParameters( 
            InventTransId, 
            ItemId, 
            InventDimId, 
            systemdateget(), 
            qty, 
            THK_2ndqty); 
             
        financial = InventUpd_Financial::newVirtuelCounting(movement, ledgerVoucher, abs(calcCostAmount()) * movement.transSign()); 
        financial.updateNow(); 
    } 
}

AX_InventCounting的更多相关文章

随机推荐

  1. PAT 乙级1093 字符串A+B (20 分)

    1093 字符串A+B (20 分) 给定两个字符串 A 和 B,本题要求你输出 A+B,即两个字符串的并集.要求先输出 A,再输出 B,但重复的字符必须被剔除. 输入格式: 输入在两行中分别给出 A ...

  2. atop 分析小记

    atop分析小记 atop这个工具相当NB 项目中需要用到它的磁盘使用率统计值,为了一探究竟,挖了下它的代码 atopsar atopsar实际就是atop的一个链接指向. 从atop.c的main源 ...

  3. Spring Bean生命周期详解

    对象生命周期:创建(实例化----初始化)---使用----销毁,而在Spring中,Bean对象周期当然遵从这一过程,但是Spring提供了许多对外接口,允许开发者对三个过程(实例化.初始化.销毁) ...

  4. 实战ELK(7)ElasticSearch常用的基本查询语句

    1.term 过滤 term主要用于精确匹配哪些值,比如数字,日期,布尔值或 not_analyzed 的字符串(未经切词的文本数据类型): { "term": { "d ...

  5. nginx+python+windows 开始

    参考文章:http://www.testwo.com/article/311 参考如上文章基本能够完成hello world示例,我来记录下自己操作步骤及不同点,用以备忘,如果能帮助到其他人更好. 以 ...

  6. CentOS6.8 下RPM方式安装MySQL5.6

    1. 检查MySQL及相关RPM包,是否安装,如果有安装,则移除(rpm –e 名称) yum remove mysql mysql-server mysql-libs(我用的上面的)或者 [root ...

  7. servlet cdi注入

    @WebServlet("/cdiservlet")//url映射,即@WebServlet告诉容器,如果请求的URL是"/cdiservlet",则由NewS ...

  8. c#操作excel方式三:使用Microsoft.Office.Interop.Excel.dll读取Excel文件

    1.引用Microsoft.Office.Interop.Excel.dll 2.引用命名空间.使用别名 using System.Reflection; using Excel = Microsof ...

  9. JRebel 代理激活

    1.生成GUID   https://www.guidgen.com/ 例:04cfff79-8f45-481c-a858-a5b9590422e7 2.License Server 例: http: ...

  10. Eclipse 如何查看源代码

    Eclipse 关联源代码: