When we change the Expected quantity in return Sales order the Discount and Percentage is reset to ‘0’
I found the standard Code where its reseting the Discount and Percentage is reset to ‘0’ ?
case fieldNum(SalesLine, ExpectedRetQty):
SalesLine::modifyExpectedRetQty(this, this.inventDim());
static void modifyExpectedRetQty(SalesLine _salesLine,
InventDim _inventDim,
boolean _resetPrice = true)
{
Qty transQty = _salesLine.ExpectedRetQty;
transQty = decRound(transQty, UnitOfMeasure::unitOfMeasureDecimalPrecision(
UnitOfMeasure::unitOfMeasureIdBySymbol(_salesLine.SalesUnit)));
if (transQty != _salesLine.ExpectedRetQty)
{
_salesLine.ExpectedRetQty = transQty;
}
if (_resetPrice)
{
_salesLine.SalesPurchLine::resetPriceAgreement();
_salesLine.setPriceDisc(_inventDim);
}
}