In NAV 2013 when a purchase is posted (invoiced) for a line involving a G/L account rather than an item, it is possible that the Unit cost (LCY) and Total Cost (LCY) will be overstated. The reason for this is a change in how the Unit Cost LCY is determined when transferring it from the purchase line to the job journal line.
The change (code below) adds the “Tax To Be Expensed” from the Purchase line to the Unit Cost(LCY) field – when the line is not for an Item (G/L account for example). This is not a problem if the quantity is one - or the tax to be expensed is zero, but as the quantity increases the amount of overstatement also increases.
Example A: Qty 1 , Unit Cost 10.00, 5% tax – Tax to be expensed = $0.50 , Final Unit Cost LCY is $10.50
Example B: Qty 200, Unit Cost 10.00, 5% tax, Tax to be expensed = $100.00, Final Unit Cost LCY is $110.00
IF Type = Type::Item THEN BEGIN
Item.GET("No.");
IF Item."Costing Method" = Item."Costing Method"::Standard THEN
JobJnlLine.VALIDATE("Unit Cost (LCY)",Item."Standard Cost")
ELSE
JobJnlLine.VALIDATE("Unit Cost (LCY)","Unit Cost (LCY)");
END ELSE BEGIN
IF "Currency Code" = '' THEN
TaxToBeExpensedLCY := "Tax To Be Expensed"
ELSE
TaxToBeExpensedLCY :=
CurrencyExchRate.ExchangeAmtFCYToLCY(
PurchHeader."Posting Date",
"Currency Code",
"Tax To Be Expensed",
PurchHeader."Currency Factor");
JobJnlLine.VALIDATE("Unit Cost (LCY)","Unit Cost (LCY)" + TaxToBeExpensedLCY); //This is the problem line!
END;
My fix is to insert this code right above the problem line that validates the "Unit Cost (LCY)"
IF PurchLine.”Qty. to Invoice” <> 0 THEN BEGIN
TaxToBeExpensedLCY := TaxToBeExpensedLCY / “Qty. to Invoice”;
END;