_SalesLine.clear();
inventdim.InventLocationId = SalesTable::find(salesid).InventLocationId;
inventdim.inventBatchId = _HBInventTx_D_V2.inventBatchId;
inventdim = inventdim::findOrCreate(inventdim);
_SalesLine.InventDimId = inventdim.inventDimId;
_SalesLine.SalesId = salesid;
_SalesLine.ItemId = _HBInventTx_D_V2.ItemId;
_SalesLine.SalesQty = _HBInventTx_D_V2.qty * -1;
_SalesLine.ReturnReasonCodeId = '01';
_SalesLine.createLine(NoYes::Yes, // Validate
NoYes::Yes, // initFromSalesTable
NoYes::Yes, // initFromInventTable
NoYes::Yes, // calcInventQty
NoYes::Yes, // searchMarkup
NoYes::Yes); // searchPrice
No comments:
Post a Comment