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.

This article applies to Microsoft Dynamics NAV for the Hungarian (hu) language locale.

Symptoms

In the Hungarian version of Microsoft Dynamics NAV 2009 R2, the Itemized VAT Statement report that is known as 1365M has an incorrect name and uses incorrect form ID when you export the data to a text file. 1365 was a temporary name that was used only in the year of 2013. This ID changes every year. For example: 

  • In 2013, it was 1365.

  • In 2014, it is 1465.

  • In 2015, it will be 1565.

The first two digits increase in every year. The object names are also incorrect. They should be named as "Itemized VAT Statement" without the number.

Resolution

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 Fields in the Export/Print 1365M form (14550) as follows:
    Existing code

    ...
    // Delete the following line.
    OBJECT Form 14550 Export/Print 1365M

    ...

    Replacement code

    ...
    // Add the following line.
    OBJECT Form 14550 Export/Print Item. VAT Stat.

    ...
  2. Change the code in Properties in form 14550 as follows:
    Existing code

    ...
    }
    PROPERTIES
    {

    // Delete the following lines.
    Width=6270;
    Height=4510;
    CaptionML=[ENU=Export/Print VAT 1365M Statement;
    // End of the lines.

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    OnInit=BEGIN
    ThresholdAmount := 2000000;

    ...

    Replacement code

    ...
    }
    PROPERTIES
    {

    // Add the following lines.
    Width=5720;
    Height=2750;
    CaptionML=[ENU=Export/Print Item. VAT Stat.;
    // End of the lines.

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    OnInit=BEGIN
    ThresholdAmount := 2000000;

    ...
  3. Change the code of Controls in form 14550 as follows:
    Existing code 1

    ...
    }
    CONTROLS
    {

    // Delete the following line.
    { 1360006;MenuButton;3740 ;3520 ;2200 ;550 ;CaptionML=[ENU=&Functions;



    HUN=&Funkci�k];
    Menu=MENUITEMS
    {
    ...

    Replacement code 1

    ...
    }
    CONTROLS
    {

    // Add the following lines.
    { 1360006;MenuButton;3300 ;1980 ;2200 ;550 ;HorzGlue=Right;
    VertGlue=Bottom;
    CaptionML=[ENU=&Functions;
    // End of the lines.

    HUN=&Funkci�k];Menu=MENUITEMS
    {
    ...

    Existing code 2

    ...
    Visible=No }
    }
    }

    // Delete the following line.
    { 1360017;TextBox ;3960 ;440 ;2000 ;500 ;CaptionML=[ENU=Start Date;

    HUN=Kezd�si d tum];DateFormula=No;
    SourceExpr=StartDate;
    ...

    Replacement code 2

    ...
    Visible=No }
    }
    }

    // Add the following line.
    { 1360017;TextBox ;3520 ;220 ;2000 ;440 ;CaptionML=[ENU=Start Date;

    HUN=Kezd�si d tum];DateFormula=No;
    SourceExpr=StartDate;
    ...

    Existing code 3

    ...
    EndDate := CALCDATE('<-1D>',VATPeriod."Starting Date");
    END;
    }

    // Delete the following lines.
    { 1360018;Label ;660 ;440 ;3190 ;550 ;ParentControl=1360017 }
    { 1360020;Label ;660 ;1210 ;3190 ;550 ;ParentControl=1360021 }
    { 1360021;TextBox ;3960 ;1210 ;2000 ;500 ;CaptionML=[ENU=End Date;HUN=Z r� d tum]; SourceExpr=EndDate }
    { 1360000;Label ;660 ;2090 ;3190 ;550 ;ParentControl=1360001 }
    { 1360001;TextBox ;3960 ;2090 ;2000 ;500 ;CaptionML=[ENU=VAT Threshold Amount;
    // End of the lines.

    HUN=�fa k�sz�b�sszege];DateFormula=No;
    SourceExpr=ThresholdAmount }
    ...

    Replacement code 3

    ...
    EndDate := CALCDATE('<-1D>',VATPeriod."Starting Date");
    END;
    }

    // Add the following lines.
    { 1360018;Label ;220 ;220 ;3190 ;440 ;ParentControl=1360017 }
    { 1360020;Label ;220 ;770 ;3190 ;440 ;ParentControl=1360021 }
    { 1360021;TextBox ;3520 ;770 ;2000 ;440 ;CaptionML=[ENU=End Date;HUN=Z r� d tum]; SourceExpr=EndDate }
    { 1360000;Label ;220 ;1320 ;3190 ;440 ;ParentControl=1360001 }
    { 1360001;TextBox ;3520 ;1320 ;2000 ;440 ;CaptionML=[ENU=VAT Threshold Amount;
    // End of the lines.

    HUN=�fa k�sz�b�sszege];DateFormula=No;
    SourceExpr=ThresholdAmount }
    ...
  4. Change the code in the 1365 Itemized VAT Statement report (14522) as follows:
    Existing code

    ...
    // Delete the following line.
    OBJECT Report 14522 1365 Itemized VAT Statement

    HUN=�fa k�sz�b�sszege];
    DateFormula=No;
    SourceExpr=ThresholdAmount }

    ...

    Replacement code

    ...
    EndDate := CALCDATE('<-1D>',VATPeriod."Starting Date");
    END;
    }

    // Add the following line.
    OBJECT Report 14522 Itemized VAT Statement

    HUN=�fa k�sz�b�sszege];
    DateFormula=No;
    SourceExpr=ThresholdAmount }


    ...
  5. Change the code of Properties in report 14522 as follows:
    Existing code

    ...
    }
    PROPERTIES
    {

    // Delete the following lines.
    CaptionML=[ENU=1365 Itemized VAT Statement;
    HUN=1365 ti?½teles fakimutat s];
    // End of the lines.

    PaperSize=A4 210 x 297 mm;
    }
    DATAITEMS


    ...

    Replacement code

    ...
    }
    PROPERTIES
    {
    // Add the following lines.
    CaptionML=[ENU=Itemized VAT Statement;
    HUN=Ti?½teles fakimutat s];
    // End of the lines.

    PaperSize=A4 210 x 297 mm;
    }
    DATAITEMS


    ...
  6. Change the code in the Create1365MFile function in the Form 1365 Export codeunit (14550) as follows:
    Existing code

    ...
    FullClientFilePath@1360008 : Text[1024];
    SummaryFileName@1360009 : Text[30];
    BEGIN

    // Delete the following lines.
    SetFolderLocation(FolderLocation,FileExtension);

    SummaryFileName := 'Result1365M.txt';
    // End of the lines.

    CREATE(FilesSysObj);
    SummaryTextStream := FilesSysObj.CreateTextFile(TEMPORARYPATH + SummaryFileName,TRUE,FALSE);

    ...

    Replacement code

    ...
    FullClientFilePath@1360008 : Text[1024];
    SummaryFileName@1360009 : Text[30];
    BEGIN

    // Add the following lines.
    SetFolderLocation(PeriodFrom,FolderLocation,FileExtension);

    SummaryFileName := 'Result' + GetFormID(PeriodFrom) + '.txt';
    // End of the lines.

    CREATE(FilesSysObj);
    SummaryTextStream := FilesSysObj.CreateTextFile(TEMPORARYPATH + SummaryFileName,TRUE,FALSE);

    ...
  7. Change the code in the CreateAndDownloadFiles function in the Form 1365 Export codeunit (14550) as follows:
    Existing code 1

    ...
    ("Partner ID" <> PreviousTemp1365MBuffer."Partner ID");

    IF IsNewPartner AND Instantiated THEN BEGIN

    // Delete the following line.
    UpdateAndDownloadFile(SummaryTextStream,PreviousTemp1365MBuffer,FolderLocation,FileExtension);

    Instantiated := FALSE;
    END;
    ...

    Replacement code 1

    ...
    ("Partner ID" <> PreviousTemp1365MBuffer."Partner ID");

    IF IsNewPartner AND Instantiated THEN BEGIN

    // Add the following line.
    UpdateAndDownloadFile(PeriodFrom,SummaryTextStream,PreviousTemp1365MBuffer,FolderLocation,FileExtension);

    Instantiated := FALSE;
    END;

    ...

    Existing code 2

    ...

    IF IsForPrint THEN BEGIN
    IF NOT Instantiated THEN BEGIN

    // Delete the following line.
    TextStream := FilesSysObj.CreateTextFile(TEMPORARYPATH + '1365M.txt',TRUE,FALSE);

    WriteFileHeader(PeriodFrom,PeriodTo,Temp1365MBuffer);
    Instantiated := TRUE;
    END;

    ...

    Replacement code 2

    ...

    IF IsForPrint THEN BEGIN
    IF NOT Instantiated THEN BEGIN

    // Add the following line.
    TextStream := FilesSysObj.CreateTextFile(TEMPORARYPATH + GetFormID(PeriodFrom) + '.txt',TRUE,FALSE);

    WriteFileHeader(PeriodFrom,PeriodTo,Temp1365MBuffer);
    Instantiated := TRUE;
    END;

    ...

    Existing code 3

    ...
    PreviousTemp1365MBuffer := Temp1365MBuffer;
    UNTIL NEXT = 0;
    IF Instantiated THEN

    // Delete the following line.
    UpdateAndDownloadFile(SummaryTextStream,PreviousTemp1365MBuffer,FolderLocation,FileExtension);

    END;
    END;
    END;

    ...

    Replacement code 3

    ...
    PreviousTemp1365MBuffer := Temp1365MBuffer;
    UNTIL NEXT = 0;
    IF Instantiated THEN

    // Add the following line.
    UpdateAndDownloadFile(PeriodFrom,SummaryTextStream,PreviousTemp1365MBuffer,FolderLocation,FileExtension);

    END;
    END;
    END;

    ...
  8. Change the code in the WriteFileHeader function in the Form 1365 Export codeunit (14550) as follows:
    Existing code

    ...
    InitVariables;
    CompanyInformation.GET;

    // Delete the following line.
    WriteText('$ny_azon=1365M');

    WriteText(PADSTR('$sorok_sz ma=',STRLEN('$sorok_sz ma=') + 10));
    WriteText('$d_lapok_sz ma=4');
    WriteText('$d_lap1=01-K,1');

    ...

    Replacement code

    ...
    InitVariables;
    CompanyInformation.GET;

    // Add the following line.
    WriteText('$ny_azon=' + GetFormID(PeriodFrom));

    WriteText(PADSTR('$sorok_sz ma=',STRLEN('$sorok_sz ma=') + 10));
    WriteText('$d_lapok_sz ma=4');
    WriteText('$d_lap1=01-K,1');

    ...
  9. Change the code in the UpdateAndDownloadFile function in the Form 1365 Export codeunit (14550) as follows:
    Existing code 1

    ...
    Count1365M02K += 1;
    END;

    // Delete the following line.
    PROCEDURE UpdateAndDownloadFile@1360041(VAR SummaryTextStream@1360004 : Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{0BB02EC0-EF49-11CF-8940-00A0C9054228}:'Windows Script Host Object Model'.TextStream";PreviousTemp1365MBuffer@1360001 : Record 14550;FolderLocation@1360000 : Text[1024];FileExtension@1360002 : Text[32]);

    VAR
    FullClientFilePath@1360003 : Text[1024];
    ServerFileName@1360005 : Text[1024];

    ...

    Replacement code 1

    ...
    Count1365M02K += 1;
    END;

    // Add the following line.
    PROCEDURE UpdateAndDownloadFile@1360041(PeriodFrom@1360007 : Date;VAR SummaryTextStream@1360004 : Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{0BB02EC0-EF49-11CF-8940-00A0C9054228}:'Windows Script Host Object Model'.TextStream";PreviousTemp1365MBuffer@1360001 : Record 14550;FolderLocation@1360000 : Text[1024];FileExtension@1360002 : Text[32]);

    VAR
    FullClientFilePath@1360003 : Text[1024];
    ServerFileName@1360005 : Text[1024];

    ...

    Existing code 2

    ...
    BEGIN
    Write1365M;
    TextStream.Close;

    // Delete the following line.
    ServerFileName := TEMPORARYPATH + '1365M.txt';

    UpdateCountLine(ServerFileName,CountLine);

    IF PreviousTemp1365MBuffer."VAT Registration No." <> '' THEN

    ...

    Replacement code 2

    ...
    BEGIN
    Write1365M;
    TextStream.Close;

    // Add the following line.
    ServerFileName := TEMPORARYPATH + GetFormID(PeriodFrom) + '.txt';

    UpdateCountLine(ServerFileName,CountLine);

    IF PreviousTemp1365MBuffer."VAT Registration No." <> '' THEN

    ...

    Existing code 3

    ...
    PartnerIdentification + '_' +
    FORMAT(TODAY,0,'<Year4,4><Month,2><Day,2>') + FileExtension;


    // Delete the following line.
    DownloadFile(TextStream,FullClientFilePath,'1365M.txt');

    SummaryTextStream.WriteLine(FullClientFilePath);
    END;

    ...

    Replacement code 3

    ...
    PartnerIdentification + '_' +
    FORMAT(TODAY,0,'<Year4,4><Month,2><Day,2>') + FileExtension;


    // Add the following line.
    DownloadFile(TextStream,FullClientFilePath,GetFormID(PeriodFrom) + '.txt');

    SummaryTextStream.WriteLine(FullClientFilePath);
    END;

    ...
  10. Change the code in the SetFolderLocation function in the Form 1365 Export codeunit (14550) as follows:
    Existing code 1

    ...
    CLEAR(NotItemizedPurchaseVATAmount);
    END;


    // Delete the following line.
    LOCAL PROCEDURE SetFolderLocation@1360019(VAR ClientFileName@1360001 : Text[1024];VAR FileExtension@1360002 : Text[32]);

    VAR
    CommonDialogManagement@1360003 : Codeunit 412;
    DefaultFileType@1360004 : ' ,Text,Excel,Word,Custom,Xml,Htm,Xsd,Xslt';

    ...

    Replacement code 1

    ...
    CLEAR(NotItemizedPurchaseVATAmount);
    END;


    // Add the following line.
    LOCAL PROCEDURE SetFolderLocation@1360019(PeriodFrom@1360000 : Date;VAR ClientFileName@1360001 : Text[1024];VAR FileExtension@1360002 : Text[32]);

    VAR
    CommonDialogManagement@1360003 : Codeunit 412;
    DefaultFileType@1360004 : ' ,Text,Excel,Word,Custom,Xml,Htm,Xsd,Xslt';

    ...

    Existing code 2

    ...
    Action@1360005 : 'Open,Save';
    BEGIN
    IF ClientFilePath <> '' THEN BEGIN

    // Delete the following line.
    ClientFileName := ClientFilePath + '\1365M';

    FileExtension := '.imp';
    END ELSE BEGIN
    ClientFileName := CommonDialogManagement.OpenFile('',ClientFileName,DefaultFileType::Custom,FileType,Action::Save);

    ...

    Replacement code 2

    ...
    Action@1360005 : 'Open,Save';
    BEGIN
    IF ClientFilePath <> '' THEN BEGIN

    // Add the following line.
    ClientFileName := ClientFilePath + '\' + GetFormID(PeriodFrom);

    FileExtension := '.imp';
    END ELSE BEGIN
    ClientFileName := CommonDialogManagement.OpenFile('',ClientFileName,DefaultFileType::Custom,FileType,Action::Save);

    ...
  11. Change the code in the GetFormID function in the Form 1365 Export codeunit (14550) as follows:
    Existing code

    ...
    EXIT(ROUND(Amount/1000,1));
    END;

    BEGIN
    END.
    }

    ...

    Replacement code

    ...
    EXIT(ROUND(Amount/1000,1));
    END;

    // Add the following lines.
    LOCAL PROCEDURE GetFormID@1360012(PeriodFrom@1360000 : Date) : Text[5];
    BEGIN
    EXIT(FORMAT(PeriodFrom,0,'<Year>') + '65M');
    END;
    // End of the lines.

    BEGIN
    END.
    }

    ...
  12. Change the code of Properties in the Hungary MenuSuite (30) as follows:
    Existing code

    ...
    NextNodeID=[{00000000-0000-0000-0000-000000000000}] }
    { ;[{698579F1-8311-4B43-AA7F-DA71B371DAB4}] ;NextNodeID=[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] }
    { MenuItem ;[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] ;Name=Export/Print VAT 1365M Statement;

    // Delete the following line.
    CaptionML=[ENU=Export/Print VAT 1365M Stmt.;

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    MemberOfMenu=[{F8D2429D-034B-4C58-9B5E-81BE962DB1BC}];
    RunObjectType=Form;

    ...

    Replacement code

    ...
    NextNodeID=[{00000000-0000-0000-0000-000000000000}] }
    { ;[{698579F1-8311-4B43-AA7F-DA71B371DAB4}] ;NextNodeID=[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] }
    { MenuItem ;[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] ;Name=Export/Print VAT 1365M Statement;

    // Add the following line.
    CaptionML=[ENU=Export/Print Item. VAT Stat.;

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    MemberOfMenu=[{F8D2429D-034B-4C58-9B5E-81BE962DB1BC}];
    RunObjectType=Form;

    ...
  13. Change the code of Properties in the Dept – Hungary MenuSuite (1030) as follows:
    Existing code

    ...
    DepartmentCategory=Reports and Analysis }
    { ;[{698579F1-8311-4B43-AA7F-DA71B371DAB4}] ;NextNodeID=[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] }
    { MenuItem ;[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] ;Name=Export/Print VAT 1365M Statement;

    // Delete the following line.
    CaptionML=[ENU=Export/Print VAT 1365M Stmt.;

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    MemberOfMenu=[{F8D2429D-034B-4C58-9B5E-81BE962DB1BC}];
    RunObjectType=Page;

    ...

    Replacement code 2

    ...
    DepartmentCategory=Reports and Analysis }
    { ;[{698579F1-8311-4B43-AA7F-DA71B371DAB4}] ;NextNodeID=[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] }
    { MenuItem ;[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] ;Name=Export/Print VAT 1365M Statement;

    // Add the following line.
    CaptionML=[ENU=Export/Print Item. VAT Stat.;

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    MemberOfMenu=[{F8D2429D-034B-4C58-9B5E-81BE962DB1BC}];
    RunObjectType=Page;

    ...
  14. Change the code in the Export/Print 1365M page (14550) as follows:
    Existing code

    ...
    // Delete the following line.
    OBJECT Page 14550 Export/Print 1365M

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    MemberOfMenu=[{F8D2429D-034B-4C58-9B5E-81BE962DB1BC}];
    RunObjectType=Page;

    ...

    Replacement code

    ...
    DepartmentCategory=Reports and Analysis }
    { ;[{698579F1-8311-4B43-AA7F-DA71B371DAB4}] ;NextNodeID=[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] }
    { MenuItem ;[{53D31DD1-62C5-45F8-AE69-D9716DFDAEFA}] ;Name=Export/Print VAT 1365M Statement;

    // Add the following line.
    OBJECT Page 14550 Export/Print Item. VAT Stat.

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    MemberOfMenu=[{F8D2429D-034B-4C58-9B5E-81BE962DB1BC}];
    RunObjectType=Page;

    ...
  15. Change the code of Properties in the Export/Print 1365M page (14550) as follows:
    Existing code 2

    ...
    }
    PROPERTIES
    {

    // Delete the following line.
    CaptionML=[ENU=Export/Print VAT 1365M Statement;

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    PageType=Card;
    OnInit=BEGIN

    ...

    Replacement code 2

    ...
    }
    PROPERTIES
    {

    // Add the following line.
    CaptionML=[ENU=Export/Print Item. VAT Stat.;

    HUN=1365M fakimutat s export l sa/nyomtat sa];
    PageType=Card;
    OnInit=BEGIN

    ...

Prerequisites

You must have the Hungarian version of Microsoft Dynamics NAV 2009 R2 installed to apply this hotfix.

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!

×