Checking table has modified in x++ :
if(PurchParmLine2.purchQtyCorrection() != 0)
{
ttsBegin;
purchReceiptEditHistory.clear();
purchReceiptEditHistory.PurchId = PurchParmLine2.purchTable().PurchId;
purchReceiptEditHistory.PackingSlipId = VendPackingSlipJour::findRecId(PurchParmTable.VendPackingSlipJour).PackingSlipId;
purchReceiptEditHistory.ItemId = PurchParmLine2.ItemId;
purchReceiptEditHistory.InventDimId = PurchParmLine2.InventDimId;
purchReceiptEditHistory.RefLinesRecId = PurchParmLine2.purchLine().RecId;
purchReceiptEditHistory.FromQty = PurchParmLine2.PreviousReceiveNow;
purchReceiptEditHistory.ToQty = PurchParmLine2.ReceiveNow;
purchReceiptEditHistory.ReceiptCorectionRemark = PurchParmLine2.TIDPurchReceiptCorectionRemark;
purchReceiptEditHistory.insert();
ttscommit;
}
//BP Deviation Documented
display PurchQty purchQtyCorrection()
{
return this.PreviousReceiveNow - this.ReceiveNow;
}
if(PurchParmLine2.purchQtyCorrection() != 0)
{
ttsBegin;
purchReceiptEditHistory.clear();
purchReceiptEditHistory.PurchId = PurchParmLine2.purchTable().PurchId;
purchReceiptEditHistory.PackingSlipId = VendPackingSlipJour::findRecId(PurchParmTable.VendPackingSlipJour).PackingSlipId;
purchReceiptEditHistory.ItemId = PurchParmLine2.ItemId;
purchReceiptEditHistory.InventDimId = PurchParmLine2.InventDimId;
purchReceiptEditHistory.RefLinesRecId = PurchParmLine2.purchLine().RecId;
purchReceiptEditHistory.FromQty = PurchParmLine2.PreviousReceiveNow;
purchReceiptEditHistory.ToQty = PurchParmLine2.ReceiveNow;
purchReceiptEditHistory.ReceiptCorectionRemark = PurchParmLine2.TIDPurchReceiptCorectionRemark;
purchReceiptEditHistory.insert();
ttscommit;
}
//BP Deviation Documented
display PurchQty purchQtyCorrection()
{
return this.PreviousReceiveNow - this.ReceiveNow;
}
0 comments:
Post a Comment