To implement this hotfix, you must have a developer license.
You do not have to have rights to the data stores unless you have to perform data repair.
...
NewAdjustedCost@1006 : Decimal;
NewAdjustedCostACY@1007 : Decimal;
ShareOfTotalCost@1009 : Decimal;
BEGIN
IF ProdOrderLine."Finished Qty. (Base)" <= 0 THEN
EXIT;
...
...
NewAdjustedCost@1006 : Decimal;
NewAdjustedCostACY@1007 : Decimal;
ShareOfTotalCost@1009 : Decimal;
// Add the following lines.
RndgResidual@1010 : Decimal;
RndgResidualACY@1011 : Decimal;
// End of the added lines.
BEGIN
IF ProdOrderLine."Finished Qty. (Base)" <= 0 THEN
EXIT;
...
...
CalcMfgAdjustedCost("Entry No.",OldCostElementBuf,CostElementBuf);
IF CostElementBuf.FINDSET AND (ShareOfTotalCost <> 0) THEN
REPEAT
// Delete the following lines.
RoundCost(
NewAdjustedCost,CostElementBuf."Rounding Residual",CostElementBuf."Actual Cost",
ShareOfTotalCost,GLSetup."Amount Rounding Precision");
RoundCost(
NewAdjustedCostACY,CostElementBuf."Rounding Residual (ACY)",CostElementBuf."Actual Cost (ACY)",
ShareOfTotalCost,Currency."Amount Rounding Precision");
CostElementBuf.MODIFY;
// End of the deleted lines.
OldCostElementBuf.Retrieve(CostElementBuf.Type,CostElementBuf."Variance Type");
NewAdjustedCost := NewAdjustedCost - OldCostElementBuf."Actual Cost";
NewAdjustedCostACY := NewAdjustedCostACY - OldCostElementBuf."Actual Cost (ACY)";
...
...
CalcMfgAdjustedCost("Entry No.",OldCostElementBuf,CostElementBuf);
IF CostElementBuf.FINDSET AND (ShareOfTotalCost <> 0) THEN
REPEAT
// Add the following lines.
NewAdjustedCost := CostElementBuf."Actual Cost" * ShareOfTotalCost + RndgResidual;
RndgResidual := NewAdjustedCost - ROUND(NewAdjustedCost,GLSetup."Amount Rounding Precision");
NewAdjustedCostACY := CostElementBuf."Actual Cost (ACY)" * ShareOfTotalCost + RndgResidualACY;
RndgResidualACY := NewAdjustedCostACY - ROUND(NewAdjustedCostACY,Currency."Amount Rounding Precision");
// End of the added lines.
OldCostElementBuf.Retrieve(CostElementBuf.Type,CostElementBuf."Variance Type");
NewAdjustedCost := NewAdjustedCost - OldCostElementBuf."Actual Cost";
NewAdjustedCostACY := NewAdjustedCostACY - OldCostElementBuf."Actual Cost (ACY)";
...