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. rtsp简介

    https://wenku.baidu.com/view/b10415dabd64783e08122b9c.html 1      概要 RTSP(Real Time Streaming Protoc ...

  2. SpringBoot Web开发(5) 开发页面国际化+登录拦截

    SpringBoot Web开发(5) 开发页面国际化+登录拦截 一.页面国际化 页面国际化目的:根据浏览器语言设置的信息对页面信息进行切换,或者用户点击链接自行对页面语言信息进行切换. **效果演示 ...

  3. PAT 乙级 1092 最好吃的月饼 (20 分)

    1092 最好吃的月饼 (20 分) 月饼是久负盛名的中国传统糕点之一,自唐朝以来,已经发展出几百品种. 若想评比出一种“最好吃”的月饼,那势必在吃货界引发一场腥风血雨…… 在这里我们用数字说话,给出 ...

  4. Git从远程clone项目报错cannot open git-upload-pack,将http.sslVerify设为false即可

    通过HTTPS访问Git远程仓库,如果服务器的SSL证书未经过第三方机构签署,那么Git就会报错 通过https访问Git远程仓库,如果服务器的SSL证书没有经过第三方机构签署,就会出现cannot ...

  5. 关于Haclon使用GPU加速的代码实例

    关于Haclon使用GPU加速的代码实例 read_image(Image, 'T20170902014819_58_2_1.bmp') *没有加加速并行处理 count_seconds(T1) to ...

  6. 2018SDIBT_国庆个人第七场

    A - Complete the Word(暴力) Description ZS the Coder loves to read the dictionary. He thinks that a wo ...

  7. cdnbest 节点和主控连接不上原因主要查看几点

    1. 注意安装过程中有没有报错,如果没有报错,检查下节点程序是否有运行,本例以linux系统为例,windows系统可以查看进程管理器 有以下进程说明程序是运行成功的 ps -aux |grep ka ...

  8. uvm_pre_do

    https://blog.csdn.net/tingtang13/article/details/46535649 1.uvm_do 封装了一系列接口,封装越多,灵活性越差.所以增加了三个接口:pre ...

  9. CentOS7使用ZFS文件系统

    默认情况下,CentOS7并没有含ZFS支持的文件和,需要进行更新和安装第三方库. Step 1:安装第三方库和更新系统 [root@localhost ~]# rpm -Uvh http://www ...

  10. [leetcode]12. Integer to Roman整数转罗马数字

    Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 ...