• 获取物料指定日期的库存


    How to get On-Hand inventory of past years (by date)
    Many a times we come accross a requirement from customer to show on hand inventory of last year or some other report of this type as it is not included in the out of box package. I found a very interesting job from the community web site related to this.
     
    static void findingOnHandByDate(Args _args)
    {
    ItemId itemId;
    InventDim inventDimCriteria;
    InventDimParm inventDimParm;
    InventSumDateDim inventSumDateDim;
    TransDate start, finish;
    int c;
    int onHandTotal;
    ;
    start = str2date("1/1/2010", 213);
    finish = str2date("12/31/2010", 213);
    onHandTotal = 0;
    while(start != finish)
    {
    c++;
    // Specify the item to get onhand info on
    itemId = "00017470";
     
    inventSumDateDim =
    InventSumDateDim::newParameters(start,
    itemId,
    inventDimCriteria,
    inventDimParm);
     
    info(strfmt("Date: %1 on hand: %2", start, num2str(inventSumDateDim.postedQty() + inventSumDateDim.receivedQty() - inventSumDateDim.deductedQty(), 0, 2, 1, 1)));
    onHandTotal += (inventSumDateDim.postedQty() + inventSumDateDim.receivedQty() - inventSumDateDim.deductedQty());
    start += 1;
    }
    info(strfmt("Avg on hand per year: %1", onHandTotal / 365));
    }
  • 相关阅读:
    [转载]PHP中PSR-[0-4]规范
    Git忽略规则及.gitignore规则不生效的解决办法
    nginx配置tp5的pathinfo模式并隐藏后台入口文件
    php过滤 字符
    使用ajax的post方式下载excel
    scws简单中文分词
    php的api及登录的权限验证
    对钩子的理解
    基于角色的权限控制
    微信开发之SVN提交代码与FTP同步到apache的根目录
  • 原文地址:https://www.cnblogs.com/perock/p/2609581.html
Copyright © 2020-2023  润新知