zoukankan      html  css  js  c++  java
  • AX 2012 Post a partial product receipt for a purchase order

    Problem:Post a partial product receipt for a purchase order

    Solution: We need to post partial product receipt for a purchase order. The lines to post are determined by the line number range You can add range on any field in purch line. The receive now quantity will specify the quantity to receive against each line.

    purchTable = PurchTable::find(“PO1002228”);
    update_recordSet  purchLine
    setting purchReceivedNow = 1 , Inventreceivednow = 1
    where purchLine.PurchId == purchTable.PurchId &&
    purchLine.LineNumber == 1;

    query = new Query(queryStr(PurchUpdate));//Query for the filter criteria
    query.dataSourceTable(tableNum(PurchTable)).addRange(fieldnum   (PurchTable,PurchId)).value(queryValue(purchTable.PurchId));
    query.dataSourceTable(tableNum(PurchLine)).addRange(fieldNum(PurchLine,LineNumber)).value(queryValue(1));
    chooseLinesQuery = new SysQueryRun(query);
    purchFormLetter = PurchFormLetter_PackingSlip::newPackingSlipFromChooseLineQuery(chooseLinesQuery,purchTable); //pass in _purchid,
    purchFormLetter.update( purchTable,
    “PA0093”,//product receipt number
    systemDateGet(),//trans date
    PurchUpdate::ReceiveNow,//Receive now
    AccountOrder::None,
    false,
    false);

  • 相关阅读:
    省选模拟24 题解
    省选模拟23 题解
    省选模拟22 题解
    省选模拟21 题解
    省选模拟20 题解
    省选模拟19 题解
    省选模拟18 题解
    源码分析工具
    深入理解js的变量提升和函数提升
    python并发编程之IO模型
  • 原文地址:https://www.cnblogs.com/fogfog/p/6137153.html
Copyright © 2011-2022 走看看