Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

The following issues occurs:

  • The base and amount values are rounded.

  • The total lines are incorrect and generates the following error when trying to submit the file on the AT page:

    60201201 777777777

Follow the steps in the code changes section to solve this issue. This problem occurs in the following products:

  • The Portuguese version of Microsoft Dynamics NAV 2009 R2

  • The Portuguese version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only 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 Dynamics NAV 2009 service pack or the next Microsoft Dynamics NAV version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Installation information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Note Before you install this hotfix, verify that all Microsoft Dynamics NAV client users are logged off the system. This includes Microsoft Dynamics NAV Application Server (NAS) services. You should be the only client user who is logged on when you implement this hotfix.

To implement this hotfix, you must have a developer license.

We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:

  • The Modify permission for the object that you will be changing.

  • The Execute permission for the System Object ID 5210 object and for the System Object ID 9015

    object.

Note You do not have to have rights to the data stores unless you have to perform data repair.

Code changes

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

To resolve this problem, follow these steps:

  1. Change the code in the InsertECDeclarationTrailer function in the VAT Report File Buffer table (13380) as follows:
    Existing code

    ...
    BEGIN
    NewLine;
    //NAVPTL005.001,o InsertIntegerValue (89, 2);

    // Delete the following line.
    InsertIntegerValue (98, 2); //NAVPTL005.001,n

    InsertIntegerValue (LineNumber, 9);
    PadLinetill134Characters(Blank);
    END;
    ...

    Replacement code

    ...
    BEGIN
    NewLine;
    //NAVPTL005.001,o InsertIntegerValue (89, 2);

    // Add the following lines.
    //PT355807,o InsertIntegerValue (98, 2); //NAVPTL005.001,n
    InsertIntegerValue (89, 2); //PT355807,n
    // End of the added lines.

    InsertIntegerValue (LineNumber, 9);
    PadLinetill134Characters(Blank);
    END;
    ...
  2. Change the code in the InsertAnnex4041CustomerLine function in the VAT Report File Buffer table (13380) as follows:
    Existing code

    ...
    InsertIntegerValue (pLineNumber, 5);
    InsertTextValue (pVATAnnexSetup."Tax Authority Code",2,Blank);
    InsertTextValue (pVATRegNo, 9,Blank);

    // Delete the following lines.
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    // End of the deleted lines.

    InsertTextValue (Blank,92,Blank);
    END;
    ...

    Replacement code

    ...
    InsertIntegerValue (pLineNumber, 5);
    InsertTextValue (pVATAnnexSetup."Tax Authority Code",2,Blank);
    InsertTextValue (pVATRegNo, 9,Blank);

    // Add the following lines.
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base*100,1,'<')),12); //PT355807,n
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount*100,1,'<')),12); //PT355807,n
    // End of the added lines.

    InsertTextValue (Blank,92,Blank);
    END;
    ...
  3. Change the code in the InsertAnnex4041DocumentLine function in the VAT Report File Buffer table (13380) as follows:
    Existing code

    ...
    InsertIntegerValue (pLineNumber, 5);
    InsertTextValue (pVATAnnexSetup."Tax Authority Code",2,Blank);
    InsertTextValue(pDocNo,13,Blank);

    // Delete the following line.
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);

    InsertTextValue (Blank,100,Blank);
    END;
    ...

    Replacement code

    ...
    InsertIntegerValue (pLineNumber, 5);
    InsertTextValue (pVATAnnexSetup."Tax Authority Code",2,Blank);
    InsertTextValue(pDocNo,13,Blank);

    // Add the following lines.
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount*100,1,'<')),12); //PT355807,n
    // End of the added lines.

    InsertTextValue (Blank,100,Blank);
    END;
    ...
  4. Change the code in the InsertAnnex4041ReasonLine function in the VAT Report File Buffer table (13380) as follows:
    Existing code 1

    ...
    InsertTextValue (Blank,100,Blank);
    END;

    // Delete the following lines.
    PROCEDURE InsertAnnex4041ReasonLine@1000000003(pVATAnnexSetup@1000000000 : Record 13386;pVATEntry@1000000003 : Record 254);
    BEGIN
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    IF pVATAnnexSetup.Frame = pVATAnnexSetup.Frame::"2" THEN BEGIN
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    InsertTextValue (Blank,50,Blank);
    // End of the deleted lines.

    END;

    IF pVATAnnexSetup.Frame = pVATAnnexSetup.Frame::"3" THEN BEGIN
    ...

    Replacement code 1

    ...
    InsertTextValue (Blank,100,Blank);
    END;

    // Add the following lines.
    PROCEDURE InsertAnnex4041ReasonLine@1000000003(pVATAnnexSetup@1000000000 : Record 13386;pVATEntry@1000000003 : Record 254;LineNo@1000000001 : Integer);
    BEGIN
    //PT355807,o NewLine;
    //PT355807,o InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    IF pVATAnnexSetup.Frame = pVATAnnexSetup.Frame::"2" THEN BEGIN
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    //PT355807,o InsertTextValue (Blank,50,Blank);
    //PT355807,sn
    IF (pVATAnnexSetup.SubSection = 'a') OR (pVATAnnexSetup.SubSection = '') THEN BEGIN
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    END;
    IF (pVATAnnexSetup.SubSection = 'b') AND (LineNo=1) THEN BEGIN
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(0,24);
    END;
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base*100,1,'<')),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount*100,1,'<')),12);
    //PT355807,en
    // End of the added lines.

    END;

    IF pVATAnnexSetup.Frame = pVATAnnexSetup.Frame::"3" THEN BEGIN
    ...

    Existing code 2

    ...
    IF pVATAnnexSetup.Frame = pVATAnnexSetup.Frame::"3" THEN BEGIN
    IF (pVATAnnexSetup.SubSection = 'a') OR (pVATAnnexSetup.SubSection = 'A') THEN BEGIN

    // Delete the following lines.
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    END;
    IF (pVATAnnexSetup.SubSection = 'b') OR (pVATAnnexSetup.SubSection = 'B') THEN BEGIN
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    // End of the deleted lines.

    END;
    END;
    ...

    Replacement code 2

    ...
    IF pVATAnnexSetup.Frame = pVATAnnexSetup.Frame::"3" THEN BEGIN
    IF (pVATAnnexSetup.SubSection = 'a') OR (pVATAnnexSetup.SubSection = 'A') THEN BEGIN

    // Add the following lines.
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    //PT355807,sn
    IF (LineNo=1) THEN BEGIN
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(0,24);
    END;
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base*100,1,'<')),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount*100,1,'<')),12);
    //PT355807,en
    END;
    IF (pVATAnnexSetup.SubSection = 'b') OR (pVATAnnexSetup.SubSection = 'B') THEN BEGIN
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Base,1,'<')*100),12);
    //PT355807,o InsertIntegerValue(ABS(ROUND(pVATEntry.Amount,1,'<')*100),12);
    //PT355807,sn
    IF (LineNo=1) THEN BEGIN
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(0,48);
    END;
    InsertIntegerValue(ABS(ROUND(pVATEntry.Base*100,1,'<')),12);
    InsertIntegerValue(ABS(ROUND(pVATEntry.Amount*100,1,'<')),12);
    //PT355807,en
    // End of the added lines.

    END;
    END;
    ...

    Existing code 3

    ...
    END;
    END;

    // Delete the following lines.
    InsertTextValue (Blank,48,Blank);;
    END;

    PROCEDURE LastVATAnnex40Line@1000000006(pVATregNo@1000000000 : Text[9];pResumes@1000000001 : ARRAY [10] OF Integer);
    BEGIN
    // End of the deleted lines.

    NewLine;
    InsertTextValue ('96',2,Blank);
    InsertIntegerValue (1, 5);
    ...

    Replacement code 3

    ...
    END;
    END;

    // Add the following lines.
    //PT355807,o InsertTextValue (Blank,48,Blank);
    END;

    PROCEDURE LastVATAnnex40Line@1000000006(pTotalAmount@1000000002 : Decimal;pVATregNo@1000000000 : Text[9];pResumes@1000000001 : ARRAY [10] OF Integer);
    BEGIN
    //PT355807,o NewLine;
    InsertIntegerValue(ABS(ROUND(pTotalAmount*100,1,'<')),12);
    InsertTextValue (Blank,48,Blank);
    InsertVAT40LastLine(24);
    // End of the added lines.

    NewLine;
    InsertTextValue ('96',2,Blank);
    InsertIntegerValue (1, 5);
    ...
  5. Change the code in the LastVATAnnex40Line function in the VAT Report File Buffer table (13380) as follows:
    Existing code 1

    ...
    InsertTextValue (Blank,118,Blank);
    NewLine;
    InsertTextValue ('69',2,Blank);

    // Delete the following line.
    InsertIntegerValue (pResumes[1], 5);

    InsertIntegerValue (pResumes[2], 5);
    InsertIntegerValue (pResumes[3], 5);
    InsertIntegerValue (pResumes[4], 5);
    ...

    Replacement code 1

    ...
    InsertTextValue (Blank,118,Blank);
    NewLine;
    InsertTextValue ('69',2,Blank);

    // Add the following line.
    //PT355807,o InsertIntegerValue (pResumes[1], 5);

    InsertIntegerValue (pResumes[2], 5);
    InsertIntegerValue (pResumes[3], 5);
    InsertIntegerValue (pResumes[4], 5);
    ...

    Existing code 2

    ...
    InsertIntegerValue (pResumes[7], 5);
    InsertIntegerValue (pResumes[8], 5);
    InsertIntegerValue (1, 5);
    END;

    PROCEDURE LastVATAnnex41Line@1000000004(pVATAnnexSetup@1000000001 : Record 13386;pTotalAmount@1000000000 : Decimal;pResumes@1000000002 : ARRAY [10] OF Integer);
    ...

    Replacement code 2

    ...
    InsertIntegerValue (pResumes[7], 5);
    InsertIntegerValue (pResumes[8], 5);
    InsertIntegerValue (1, 5);

    // Add the following line.
    InsertTextValue (Blank,94,Blank); //PT355807,n

    END;

    PROCEDURE LastVATAnnex41Line@1000000004(pVATAnnexSetup@1000000001 : Record 13386;pTotalAmount@1000000000 : Decimal;pResumes@1000000002 : ARRAY [10] OF Integer);
    ...
  6. Change the code in the LastVATAnnex41Line function in the VAT Report File Buffer table (13380) as follows:
    Existing code 1

    ...
    PROCEDURE LastVATAnnex41Line@1000000004(pVATAnnexSetup@1000000001 : Record 13386;pTotalAmount@1000000000 : Decimal;pResumes@1000000002 : ARRAY [10] OF Integer);
    BEGIN

    // Delete the following lines.
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(ABS(ROUND(pTotalAmount,1,'<')*100),12);
    NewLine;
    InsertTextValue ('89',2,Blank);
    InsertIntegerValue (pResumes[1], 5);
    // End of the deleted lines.

    InsertIntegerValue (pResumes[2], 5);
    InsertIntegerValue (pResumes[3], 5);
    InsertIntegerValue (pResumes[4], 5);
    ...

    Replacement code 1

    ...
    PROCEDURE LastVATAnnex41Line@1000000004(pVATAnnexSetup@1000000001 : Record 13386;pTotalAmount@1000000000 : Decimal;pResumes@1000000002 : ARRAY [10] OF Integer);
    BEGIN

    // Add the following lines.
    //PT355807,o NewLine;
    //PT355807,o InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(ABS(ROUND(pTotalAmount*100,1,'<')),12);
    InsertTextValue (Blank,72,Blank);
    InsertVAT41LastLine(24);
    NewLine;
    InsertTextValue ('89',2,Blank);
    //PT355807,o InsertIntegerValue (pResumes[1], 5);
    // End of the added lines.

    InsertIntegerValue (pResumes[2], 5);
    InsertIntegerValue (pResumes[3], 5);
    InsertIntegerValue (pResumes[4], 5);
    ...

    Existing code 2

    ...
    InsertIntegerValue (pResumes[4], 5);
    InsertIntegerValue (pResumes[5], 5);
    InsertIntegerValue (pResumes[6], 5);
    END;

    BEGIN
    ...

    Replacement code 2

    ...
    InsertIntegerValue (pResumes[4], 5);
    InsertIntegerValue (pResumes[5], 5);
    InsertIntegerValue (pResumes[6], 5);

    // Add the following lines.
    InsertIntegerValue (pResumes[7], 5); //PT355807,n
    InsertTextValue (Blank,104,Blank); //PT355807,n
    END;

    PROCEDURE InsertVAT40LastLine@1000000005(Size@1000000000 : Integer);
    BEGIN
    //PT355807,sn
    FIND('+');
    IF STRLEN("Line Value") <> 134 THEN BEGIN
    "Line Value" := COPYSTR("Line Value",1,50) + CONVERTSTR (FORMAT (0, Size, 0), Blank, HeadingZero) + COPYSTR("Line Value",51);
    MODIFY;
    END;
    //PT355807,en
    END;

    PROCEDURE InsertVAT41LastLine@1000000007(Size@1000000000 : Integer);
    BEGIN
    //PT355807,sn
    FIND('+');
    IF STRLEN("Line Value") <> 134 THEN BEGIN
    "Line Value" := COPYSTR("Line Value",1,26) + CONVERTSTR (FORMAT (0, Size, 0), Blank, HeadingZero) + COPYSTR("Line Value",27);
    MODIFY;
    END;
    //PT355807,en
    END;

    PROCEDURE LastVATAnnex40Line2@1000000009(pVATAnnexSetup@1000000003 : Record 13386;pTotalAmount@1000000002 : Decimal;pVATregNo@1000000000 : Text[9];pResumes@1000000001 : ARRAY [10] OF Integer);
    BEGIN
    //PT355807,sn
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(0,72);
    InsertIntegerValue(ABS(ROUND(pTotalAmount*100,1,'<')),12);
    InsertTextValue (Blank,48,Blank);
    NewLine;
    InsertTextValue ('96',2,Blank);
    InsertIntegerValue (1, 5);
    InsertTextValue(pVATregNo,9,Blank);
    InsertTextValue (Blank,118,Blank);
    NewLine;
    InsertTextValue ('69',2,Blank);
    InsertIntegerValue (pResumes[2], 5);
    InsertIntegerValue (pResumes[3], 5);
    InsertIntegerValue (pResumes[4], 5);
    InsertIntegerValue (pResumes[5], 5);
    InsertIntegerValue (pResumes[6], 5);
    InsertIntegerValue (pResumes[7], 5);
    InsertIntegerValue (pResumes[8], 5);
    InsertIntegerValue (1, 5);
    InsertTextValue (Blank,92,Blank);
    //PT355807,en
    END;

    PROCEDURE LastVATAnnex41Line2@1000000008(pVATAnnexSetup@1000000001 : Record 13386;pTotalAmount@1000000000 : Decimal;pResumes@1000000002 : ARRAY [10] OF Integer);
    BEGIN
    //PT355807,sn
    NewLine;
    InsertTextValue (pVATAnnexSetup."Record Type",2,Blank);
    InsertIntegerValue(0,48);
    InsertIntegerValue(ABS(ROUND(pTotalAmount*100,1,'<')),12);
    InsertTextValue (Blank,72,Blank);
    NewLine;
    InsertTextValue ('89',2,Blank);
    InsertIntegerValue (pResumes[2], 5);
    InsertIntegerValue (pResumes[3], 5);
    InsertIntegerValue (pResumes[4], 5);
    InsertIntegerValue (pResumes[5], 5);
    InsertIntegerValue (pResumes[6], 5);
    InsertIntegerValue (pResumes[7], 5);
    InsertTextValue (Blank,102,Blank);
    //NAVPTL005.002,en
    // End of the added lines.

    END;

    BEGIN
    ...
  7. Change the code in the VAT Statement (PT) report (13398) as follows:
    Existing code 1

    ...
    IF recVATAnnexSetup."Record Type" = LastRecordType THEN
    LineNo += 1
    ELSE BEGIN

    //Delete the following lines.
    IndiceArray += 1;
    ResumeLines[IndiceArray] := LineNo;
    LastRecordType := recVATAnnexSetup."Record Type";
    LineNo := 1;
    // End of the deleted lines.

    END;

    VATRepBuffer.InsertAnnex4041CustomerLine(recVATAnnexSetup,LineNo,"VAT Registration No.","VAT Entry Customer");
    ...

    Replacement code 1

    ...
    IF recVATAnnexSetup."Record Type" = LastRecordType THEN
    LineNo += 1
    ELSE BEGIN

    // Add the following lines.
    //PT355807,o IndiceArray += 1;
    //PT355807,sn
    EVALUATE(recType,recVATAnnexSetup."Record Type");
    IF AnnexFilter = 40 THEN
    IndiceArray := recType - 60
    ELSE
    IndiceArray := recType - 80;
    //PT355807,en
    ResumeLines[IndiceArray] := LineNo;
    LastRecordType := recVATAnnexSetup."Record Type";
    LineNo := 1;
    // End of the added lines.

    END;

    VATRepBuffer.InsertAnnex4041CustomerLine(recVATAnnexSetup,LineNo,"VAT Registration No.","VAT Entry Customer");
    ...

    Existing code 2

    ...
    IF recVATAnnexSetup."Record Type" = LastRecordType THEN
    LineNo += 1
    ELSE BEGIN

    // Delete the following lines.
    IndiceArray += 1;
    ResumeLines[IndiceArray] := LineNo;
    LastRecordType := recVATAnnexSetup."Record Type";
    LineNo := 1;
    // End of the deleted lines.

    END;

    VATRepBuffer.InsertAnnex4041DocumentLine(recVATAnnexSetup,LineNo,"External Document No.","VAT Entry Document No.");
    ...

    Replacement code 2

    ...
    IF recVATAnnexSetup."Record Type" = LastRecordType THEN
    LineNo += 1
    ELSE BEGIN

    // Add the following lines.
    //PT355807,o IndiceArray += 1;
    //PT355807,sn
    EVALUATE(recType,recVATAnnexSetup."Record Type");
    IF AnnexFilter = 40 THEN
    IndiceArray := recType - 60
    ELSE
    IndiceArray := recType - 80;
    //PT355807,en
    ResumeLines[IndiceArray] := LineNo;
    LastRecordType := recVATAnnexSetup."Record Type";
    LineNo := 1;
    // End of the added lines.

    END;

    VATRepBuffer.InsertAnnex4041DocumentLine(recVATAnnexSetup,LineNo,"External Document No.","VAT Entry Document No.");
    ...

    Existing code 3

    ...
    OnPostDataItem=BEGIN
    CLEAR(recVATAnnexSetup);

    // Delete the following lines.
    recVATAnnexSetup.SETRANGE("Reason Code", "Reason Code");
    IF recVATAnnexSetup.FINDFIRST THEN

    IF AnnexFilter = 41 THEN
    VATRepBuffer.LastVATAnnex41Line(recVATAnnexSetup,TotalVATAnnexAmount,ResumeLines);
    // End of the deleted lines.

    END;

    TotalFields=Base,Amount;
    ...

    Replacement code 3

    ...
    OnPostDataItem=BEGIN
    CLEAR(recVATAnnexSetup);

    // Add the following lines.
    booTotal := FALSE; //PT355807,n
    recVATAnnexSetup.SETRANGE("Reason Code", "Reason Code");
    //PT355807,o IF recVATAnnexSetup.FINDFIRST THEN
    //PT355807,o IF AnnexFilter = 41 THEN
    //PT355807,o VATRepBuffer.LastVATAnnex41Line(recVATAnnexSetup,TotalVATAnnexAmount,ResumeLines);
    //PT355807,sn
    IF recVATAnnexSetup.FINDFIRST THEN BEGIN
    IF AnnexFilter = 41 THEN BEGIN
    booTotal := TRUE;
    VATRepBuffer.LastVATAnnex41Line(recVATAnnexSetup,TotalVATAnnexAmount,ResumeLines);
    END;

    IF AnnexFilter = 40 THEN BEGIN
    booTotal := TRUE;
    VATRepBuffer.LastVATAnnex40Line(TotalVATAnnexAmount,FORMAT(FiscalNo),ResumeLines);
    END;
    END;
    //PT355807,en
    // End of the added lines.

    END;

    TotalFields=Base,Amount;
    ...

    Existing code 4

    ...
    IF recVATAnnexSetup."Record Type" = LastRecordType THEN
    LineNo += 1
    ELSE BEGIN

    // Delete the following lines.
    IndiceArray += 1;
    ResumeLines[IndiceArray] := LineNo;
    LastRecordType := recVATAnnexSetup."Record Type";
    LineNo := 1;
    // End of the deleted lines.

    END;

    TotalVATAnnexBase += Base;
    ...

    Replacement code 4

    ...
    IF recVATAnnexSetup."Record Type" = LastRecordType THEN
    LineNo += 1
    ELSE BEGIN

    // Add the following lines.
    //PT355807,o IndiceArray += 1;
    //PT355807,sn
    EVALUATE(recType,recVATAnnexSetup."Record Type");
    IF AnnexFilter = 40 THEN
    IndiceArray := recType - 60
    ELSE
    IndiceArray := recType - 80;
    //PT355807,en
    ResumeLines[IndiceArray] := LineNo;
    LastRecordType := recVATAnnexSetup."Record Type";
    LineNo := 1;
    // End of the added lines.

    END;

    TotalVATAnnexBase += Base;
    ...

    Existing code 5

    ...
    RegistersNumber += 1;

    // Delete the following line.
    VATRepBuffer.InsertAnnex4041ReasonLine(recVATAnnexSetup,"VAT Entry Reason Code");

    END;

    }
    ...

    Replacement code 5

    ...
    RegistersNumber += 1;


    + //PT355807,o VATRepBuffer.InsertAnnex4041ReasonLine(recVATAnnexSetup,"VAT Entry Reason Code");
    + VATRepBuffer.InsertAnnex4041ReasonLine(recVATAnnexSetup,"VAT Entry Reason Code",LineNo); //PT355807,n
    END;

    }

    Existing code 6

    ...
    WHERE(Number=CONST(1));
    DataItemVarName=TotalInteger;
    OnAfterGetRecord=BEGIN

    // Delete the following lines.
    IF AnnexFilter = 40 THEN
    VATRepBuffer.LastVATAnnex40Line(FORMAT(FiscalNo),ResumeLines);
    // End of the deleted lines.

    END;

    }
    ...

    Replacement code 6

    ...
    WHERE(Number=CONST(1));
    DataItemVarName=TotalInteger;
    OnAfterGetRecord=BEGIN

    // Add the following lines.
    //PT355807,o IF AnnexFilter = 40 THEN
    //PT355807,o VATRepBuffer.LastVATAnnex40Line(FORMAT(FiscalNo),ResumeLines);
    //PT355807,sn
    IF NOT booTotal THEN BEGIN
    recVATAnnexSetup2.RESET;
    recVATAnnexSetup2.SETFILTER(Annex, FORMAT(AnnexFilter));
    IF recVATAnnexSetup2.FINDLAST THEN BEGIN
    IF AnnexFilter = 40 THEN
    VATRepBuffer.LastVATAnnex40Line2(recVATAnnexSetup2,TotalVATAnnexAmount,FORMAT(FiscalNo),ResumeLines);

    IF AnnexFilter = 41 THEN
    VATRepBuffer.LastVATAnnex41Line2(recVATAnnexSetup2,TotalVATAnnexAmount,ResumeLines);
    END;
    END;
    //PT355807,en
    // End of the added lines.

    END;

    }
    ...

    Existing code 7

    ...
    LastRecordType@1000000009 : Text[2];
    TotalVATAnnexBase@1000000005 : Decimal;
    TotalVATAnnexAmount@1000000006 : Decimal;

    PROCEDURE CalcLineTotal2C@1110001(VATStmtLine2@1110000 : Record 256;Level@1110001 : Integer) : Boolean;
    BEGIN
    ...

    Replacement code 7

    ...
    LastRecordType@1000000009 : Text[2];
    TotalVATAnnexBase@1000000005 : Decimal;
    TotalVATAnnexAmount@1000000006 : Decimal;

    // Add the following lines.
    booTotal@1000000013 : Boolean;
    recVATAnnexSetup2@1000000014 : Record 13386;
    recType@1000000015 : Integer;
    // End of the added lines.

    PROCEDURE CalcLineTotal2C@1110001(VATStmtLine2@1110000 : Record 256;Level@1110001 : Integer) : Boolean;
    BEGIN
    ...


Prerequisites

You must have one of the following products installed to apply this hotfix:

  • The Portuguese version of Microsoft Dynamics NAV 2009 R2

  • The Portuguese version of Microsoft Dynamics NAV 2009 SP1

Removal information

You cannot remove this hotfix.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Usefor other considerations.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×