Cancel purchase order lines(Remaining quantity) using x++.
PurchLine callerPurchLine; while select forupdate callerPurchLine where (callerPurchLine.InventTransId == '52-007643' ) { ttsbegin; callerPurchLine.RemainPurchPhysical = 0; callerPurchLine.RemainInventPhysical = 0; PurchLine purchLineLocal = PurchLine::findRecId(callerPurchLine.RecId); InventQty diffRemainPurchPhysical = purchLineLocal.RemainPurchPhysical - 0; InventQty diffRemainInventPhysical = purchLineLocal.RemainInventPhysical - 0; PdsCWInventQty diffPdsCWRemainInventPhysical = purchLineLocal.PdsCWRemainInventPhysical - 0; InterCompanyUpdateRemPhys::synchronize(callerPurchLine, diffRemainInventPhysical, diffRemainPurchPhysical, InterCompanySkipUpdate::No, diffPdsCWRemainInventPhysical); callerPurchLine.write(); ttscommit; }
Keep Daxing!!
No comments:
Post a Comment