...
// Dionisis Calculate Cost Differently for Manufacturing Entries.
IF "Expected Cost" THEN BEGIN
CalcCostToPost(
ValueEntry,ExpCostToPost,CostExpected,"Expected Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
"Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
"Posted Cost Component 5");
CalcCostToPost(
ValueEntry,ExpCostToPostACY,"Cost Amount (Expected) (ACY)","Exp. Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
END ELSE BEGIN
CalcCostToPost(
ValueEntry,CostToPost,CostActual,"Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
"Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
"Posted Cost Component 5");
CalcCostToPost(
ValueEntry,CostToPostACY,"Cost Amount (Actual) (ACY)","Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
END;
...
...
// Dionisis Calculate Cost Differently for Manufacturing Entries.
//Add the following lines.
// IF "Expected Cost" THEN BEGIN
IF "Expected Cost" OR InvtSetup."Expected Cost Posting to G/L" THEN BEGIN
//End of the lines.
CalcCostToPost(
ValueEntry,ExpCostToPost,CostExpected,"Expected Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
"Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
"Posted Cost Component 5");
CalcCostToPost(
ValueEntry,ExpCostToPostACY,"Cost Amount (Expected) (ACY)","Exp. Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
//Add the following lines.
// END ELSE BEGIN
END;
IF NOT "Expected Cost" THEN BEGIN
//End of the lines.
CalcCostToPost(
ValueEntry,CostToPost,CostActual,"Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
"Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
"Posted Cost Component 5");
CalcCostToPost(
ValueEntry,CostToPostACY,"Cost Amount (Actual) (ACY)","Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
END;
...