...
"Currency Date","Currency Code",
"Unit Cost (LCY)","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
// Delete the following line.
IF "Unit Cost" <> xRec."Unit Cost" THEN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
...
...
"Currency Date","Currency Code",
"Unit Cost (LCY)","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
// Add the following line.
IF Job."Exch. Calculation (Cost)" = Job."Exch. Calculation (Cost)"::"Fixed FCY" THEN BEGIN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
...
...
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision)
// Delete the following lines.
ELSE
"Unit Cost" := ROUND(
CurrExchRate.ExchangeAmtLCYToFCY(
"Currency Date","Currency Code",
"Unit Cost (LCY)","Currency Factor"),
UnitAmountRoundingPrecision);
// End of the lines.
END;
END ELSE BEGIN
IF RetrieveCostPrice THEN BEGIN
IF GetSKU THEN
...
...
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision)
// Add the following lines.
END ELSE BEGIN
IF "Unit Cost" <> xRec."Unit Cost" THEN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision)
ELSE
"Unit Cost" := ROUND(
CurrExchRate.ExchangeAmtLCYToFCY(
"Currency Date","Currency Code",
"Unit Cost (LCY)","Currency Factor"),
UnitAmountRoundingPrecision);
END;
// End of the lines.
END;
END ELSE BEGIN
IF RetrieveCostPrice THEN BEGIN
IF GetSKU THEN
...
...
ResCost."Work Type Code" := "Work Type Code";
ResFindUnitCost.RUN(ResCost);
"Direct Unit Cost (LCY)" := ResCost."Direct Unit Cost" * "Qty. per Unit of Measure";
RetrievedCost := ROUND(ResCost."Unit Cost" * "Qty. per Unit of Measure",UnitAmountRoundingPrecision);
"Unit Cost" := ROUND(
CurrExchRate.ExchangeAmtLCYToFCY(
"Currency Date","Currency Code",
RetrievedCost,"Currency Factor"),
...
...
ResCost."Work Type Code" := "Work Type Code";
ResFindUnitCost.RUN(ResCost);
"Direct Unit Cost (LCY)" := ResCost."Direct Unit Cost" * "Qty. per Unit of Measure";
RetrievedCost := ROUND(ResCost."Unit Cost" * "Qty. per Unit of Measure",UnitAmountRoundingPrecision);
// Add the following line.
IF RetrievedCost <> 0 THEN
"Unit Cost" := ROUND(
CurrExchRate.ExchangeAmtLCYToFCY(
"Currency Date","Currency Code",
RetrievedCost,"Currency Factor"),
...
...
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
// Delete the following lines.
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END;
END ELSE BEGIN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
// End of the lines.
END;
END;
PROCEDURE RetrieveCostPrice@13() : Boolean;
...
...
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
// Add the following lines.
IF Job."Exch. Calculation (Cost)" = Job."Exch. Calculation (Cost)"::"Fixed LCY" THEN BEGIN
IF RetrieveCostPrice THEN BEGIN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
IF "Unit Cost" <> xRec."Unit Cost" THEN BEGIN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
IF "Unit Cost (LCY)" <> 0 THEN
"Unit Cost" := ROUND(
CurrExchRate.ExchangeAmtLCYToFCY(
"Currency Date","Currency Code",
"Unit Cost (LCY)","Currency Factor"),
UnitAmountRoundingPrecision)
ELSE
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END;
END;
END ELSE IF Job."Exch. Calculation (Cost)" = Job."Exch. Calculation (Cost)"::"Fixed FCY" THEN BEGIN
IF "Unit Cost" <> 0 THEN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END;
END;
END ELSE BEGIN
IF Job."Exch. Calculation (Cost)" = Job."Exch. Calculation (Cost)"::"Fixed LCY" THEN BEGIN
IF RetrieveCostPrice THEN BEGIN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END ELSE BEGIN
IF "Unit Cost (LCY)" <> 0 THEN
"Unit Cost" := ROUND(
CurrExchRate.ExchangeAmtLCYToFCY(
"Currency Date","Currency Code",
"Unit Cost (LCY)","Currency Factor"),
UnitAmountRoundingPrecision)
ELSE
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END;
END ELSE IF Job."Exch. Calculation (Cost)" = Job."Exch. Calculation (Cost)"::"Fixed FCY" THEN BEGIN
IF "Unit Cost" <> 0 THEN
"Unit Cost (LCY)" := ROUND(
CurrExchRate.ExchangeAmtFCYToLCY(
"Currency Date","Currency Code",
"Unit Cost","Currency Factor"),
UnitAmountRoundingPrecision);
END;
// End of the lines.
END;
END;
PROCEDURE RetrieveCostPrice@13() : Boolean;
...