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. CentOS 7安装WordPress

    在开始本文前,我假定你已经安装好了nginx.php-fpm和mariaDB(或mysql).它们的安装过程可参考我以前的文章. 1. 安装EPEL(Extra Packages for Enterp ...

  2. centos7+nginx+rtmp+ffmpeg搭建流媒体服务器(保存流目录与http目录不要随意配置,否则有权限问题)

    搭建nginx-http-flv-module升级代替rtmp模块,详情:https://github.com/winshining/nginx-http-flv-module/blob/master ...

  3. python网页爬虫开发之五-反爬

    1.头信息检查是否频繁相同 随机产生一个headers, #user_agent 集合 user_agent_list = [  'Mozilla/5.0 (Windows NT 6.1; WOW64 ...

  4. WordPress版微信小程序2.1.5版发布

    WordPress版微信小程序功能已经基本完善,利用这套程序,搭配WordPress提供的rest api,WordPress网站的站长可以快速搭建属于自己的网站微信小程序 . WordPress版微 ...

  5. linux如何复制文件夹和移动文件夹

    linux下文件的复制.移动与删除命令为:cp,mv,rm一.文件复制命令cp 命令格式:cp [-adfilprsu] 源文件(source) 目标文件(destination)cp [option ...

  6. redis基本知识

    启动redis: redis-sever 检查redis是否在运行: redis-cli 再ping 会提示PONG 启动远程redis:redis-cli -h 127.0.0.1 -p 6379 ...

  7. Xeon Phi 《协处理器高性能编程指南》随书代码整理 part 1

    ▶ 第三章,逐步优化了一个二维卷积计算的过程 ● 基准代码 #include <stdio.h> #include <stdlib.h> #include <string ...

  8. SpringMVC 请求全过程漫谈

    SpringMVC 请求全过程漫谈 SpringMVC 跟其他的mvc框架一样,如 struts,webwork, 本质上都是 将一个 http 请求(request)进行各种处理, 然后返回resp ...

  9. 如何查看java的class文件

    1.首先拿到javac文件 例如:test.class 2.可以使用文本编辑器用二进制的方式打开() cafe babe 0000 0034 0056 0a00 1200 3209 0010 0033 ...

  10. cdnbest的proxy里api用法案例:

    用户的proxy帐号里api key要设置好,那个key设置后是不显示的,但会显示已设置 key是自已随便生成的 $uid = 22222; $skey = 'langansafe&*#'; ...