Issue

Consider the following scenario in the North American version of Microsoft Business Solutions - Navision 4.0:


In this scenario, the value in the Total Cost field includes both the PST and the GST. You expect the tax amount that is marked Expense/Capitalize to include only the PST because the GST part of the tax is recoverable.

Solution

CAUSE

This problem occurs because the code that calculates the value in the Total Cost field is incorrect.


Note: The code uses the values that are in the Purchase Direct Cost field and in the Total Tax Amount field to calculate the value in the Total Cost field.


However, the Total Cost field is supposed to include only the part of the tax amount that is marked Expense/Capitalize.



RESOLUTION


Modify permission for the Codeunit 90 - Purch.-Post object. A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Business Solutions - Navision 4.0 service pack that contains this hotfix.


You do not have to have rights to the data stores unless you have to perform data repair.  To install this hotfix, change the code in the Purch.-Post (90) codeunit as follows.


Existing code
OnRun


JobJnlLine.'Posting No. Series' := 'Posting No. Series';
JobJnlLine.'Source Currency Code' := 'Currency Code';
IF PurchLine.'VAT Calculation Type' = PurchLine.'VAT Calculation Type'::'Sales Tax' THEN BEGIN
  JobJnlLine.'Direct Unit Cost' := ROUND(PurchLine.'Amount Including VAT' /JobJnlLine.Quantity);
  JobJnlLine.'Total Cost' := PurchLine.'Amount Including VAT';
  JobJnlLine.'Source Currency Total Cost' := PurchLineACY.'Amount Including VAT';
END ELSE BEGIN
  JobJnlLine.'Direct Unit Cost' := ROUND(PurchLine.Amount / JobJnlLine.Quantity);


Replacement code
OnRun


JobJnlLine.'Posting No. Series' := 'Posting No. Series';
JobJnlLine.'Source Currency Code' := 'Currency Code';
IF PurchLine.'VAT Calculation Type' = PurchLine.'VAT Calculation Type'::'Sales Tax' THEN BEGIN
  JobJnlLine.'Total Cost' := PurchLine.Amount + PurchLine.'Tax To Be Expensed';
  JobJnlLine.'Direct Unit Cost' :=
    ROUND(JobJnlLine.'Total Cost' /
    JobJnlLine.Quantity,GLSetup.'Unit-Amount Rounding Precision');
  JobJnlLine.'Source Currency Total Cost' := PurchLineACY.'Amount Including VAT';
END ELSE BEGIN
  JobJnlLine.'Direct Unit Cost' := ROUND(PurchLine.Amount / JobJnlLine.Quantity);


Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.


Prerequisites
You must have Microsoft Navision 4.0 installed to apply this hotfix.


STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the 'Applies to' section. This problem was first corrected in Microsoft Navision 4.0 Service Pack 1.