Přihlásit se pomocí účtu Microsoft
Přihlaste se nebo si vytvořte účet.
Dobrý den,
Vyberte jiný účet.
Máte více účtů.
Zvolte účet, pomocí kterého se chcete přihlásit.
Angličtina
Omlouváme se, ale tento článek není dostupný ve vašem jazyce.

This article applies to Microsoft Dynamics NAV for the Norwegian (no) language locale.

Symptoms

You can post to the value-added tax (VAT) table in a VAT period that is settled and closed in the Norwegian version of Microsoft Dynamics NAV 2009 unexpectedly. 
This problem occurs in the following products:

  • The Norwegian version of Microsoft Dynamics NAV 2009 R2

  • The Norwegian 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 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, but 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 Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. 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 Fields in the User Setup table (91) as follows:
    Existing code

    ...
    CaptionML=ENU=Purchase Resp. Ctr. Filter }
    { 5900; ;Service Resp. Ctr. Filter;Code10 ;TableRelation="Responsibility Center";
    CaptionML=ENU=Service Resp. Ctr. Filter }

    // Delete the following line.
    }

    KEYS
    {
    { ;User ID ;Clustered=Yes }
    ...

    Replacement code

    ...
    CaptionML=ENU=Purchase Resp. Ctr. Filter }
    { 5900; ;Service Resp. Ctr. Filter;Code10 ;TableRelation="Responsibility Center";
    CaptionML=ENU=Service Resp. Ctr. Filter }

    // Add the following lines.
    { 10600; ;Application always Allowed;Boolean }
    }
    // End of the lines.

    KEYS
    {
    { ;User ID ;Clustered=Yes }
    ...
  2. Change the code in the Fields in the General Ledger Setup table (98) as follows:
    Existing code

    ...
    END;

    CaptionML=ENU=Prepayment Unrealized VAT }
    { 10601; ;Non-Taxable ;Boolean ;CaptionML=ENU=Non-Taxable }
    }
    KEYS
    ...

    Replacement code

    ...
    END;

    CaptionML=ENU=Prepayment Unrealized VAT }

    // Add the following line.
    { 10600; ;Application always Allowed;Boolean }

    { 10601; ;Non-Taxable ;Boolean ;CaptionML=ENU=Non-Taxable }
    }
    KEYS
  3. Change the code in the Controls in the General Ledger Setup form (118) as follows:
    Existing code 1

    ...
    }
    CONTROLS
    {
    // Delete the following line.
    { 1 ;TabControl ;220 ;220 ;12980;7150 ;HorzGlue=Both;

    VertGlue=Both;
    PageNamesML=ENU=General,Numbering,Dimensions,Reporting,Application }
    { 6 ;TextBox ;3850 ;990 ;1650 ;440 ;ParentControl=1;
    ...

    Replacement code 1

    ...
    }
    CONTROLS
    {

    // Add the following line.
    { 1 ;TabControl ;220 ;220 ;12980;7700 ;HorzGlue=Both;

    VertGlue=Both;
    PageNamesML=ENU=General,Numbering,Dimensions,Reporting,Application }
    { 6 ;TextBox ;3850 ;990 ;1650 ;440 ;ParentControl=1;
    ...

    Existing code 2

    ...
    ShowCaption=No;
    SourceExpr="Check G/L Account Usage" }
    { 69 ;Label ;440 ;5720 ;3300 ;440 ;ParentControl=60 }
    { 1080002;CheckBox ;10230;5610 ;440 ;440 ;ParentControl=1;
    InPage=0;
    ShowCaption=No;
    ...

    Replacement code 2

    ...
    ShowCaption=No;
    SourceExpr="Check G/L Account Usage" }
    { 69 ;Label ;440 ;5720 ;3300 ;440 ;ParentControl=60 }

    // Add the following lines.
    { 1080000;CheckBox ;10230;6160 ;440 ;440 ;ParentControl=1;
    InPage=0;
    ShowCaption=No;
    SourceExpr="Application always Allowed" }
    { 1080001;Label ;6820 ;6160 ;3300 ;440 ;ParentControl=1080000;
    InPage=0 }
    // End of the lines.

    { 1080002;CheckBox ;10230;5610 ;440 ;440 ;ParentControl=1;
    InPage=0;
    ShowCaption=No;
    ...

    Existing code 3

    ...
    SourceExpr="Non-Taxable" }
    { 1080003;Label ;6820 ;5610 ;3300 ;440 ;ParentControl=1080002;
    InPage=0 }

    // Delete the following line.
    { 82 ;TextBox ;10230;6160 ;2750 ;440 ;ParentControl=1;

    InPage=0;
    SourceExpr="Bill-to/Sell-to VAT Calc." }
    ...

    Replacement code 3

    ...
    SourceExpr="Non-Taxable" }
    { 1080003;Label ;6820 ;5610 ;3300 ;440 ;ParentControl=1080002;
    InPage=0 }

    // Add the following line.
    { 82 ;TextBox ;10230;6710 ;2750 ;440 ;ParentControl=1;

    InPage=0;
    SourceExpr="Bill-to/Sell-to VAT Calc." }
    ...

    Existing code 4

    ...
    InPage=0;
    SourceExpr="Bill-to/Sell-to VAT Calc." }

    // Delete the following lines.
    { 83 ;Label ;6820 ;6160 ;3300 ;440 ;ParentControl=82 }
    { 84 ;CheckBox ;10230;6710 ;440 ;440 ;ParentControl=1;
    // End of the lines.

    InPage=0;
    ShowCaption=No;
    SourceExpr="Print VAT specification in LCY" }
    ...

    Replacement code 4

    ...
    InPage=0;
    SourceExpr="Bill-to/Sell-to VAT Calc." }

    // Add the following lines.
    { 83 ;Label ;6820 ;6710 ;3300 ;440 ;ParentControl=82 }
    { 84 ;CheckBox ;10230;7260 ;440 ;440 ;ParentControl=1;
    // End of the lines.

    InPage=0;
    ShowCaption=No;
    SourceExpr="Print VAT specification in LCY" }
    ...

    Existing code 5

    ...
    InPage=0;
    ShowCaption=No;
    SourceExpr="Print VAT specification in LCY" }

    // Delete the following line.
    { 85 ;Label ;6820 ;6710 ;3300 ;440 ;ParentControl=84 }

    { 86 ;CheckBox ;10230;3960 ;440 ;440 ;ParentControl=1;
    InPage=0;
    ShowCaption=No;
    ...

    Replacement code 5

    ...
    InPage=0;
    ShowCaption=No;
    SourceExpr="Print VAT specification in LCY" }

    // Add the following line.
    { 85 ;Label ;6820 ;7260 ;3300 ;440 ;ParentControl=84 }

    { 86 ;CheckBox ;10230;3960 ;440 ;440 ;ParentControl=1;
    InPage=0;
    ShowCaption=No;
    ...

    Existing code 6

    ...
    ShowCaption=No;
    SourceExpr="Payment Tolerance Warning" }
    { 81 ;Label ;440 ;3300 ;3300 ;440 ;ParentControl=80 }

    // Delete the following line.
    { 52 ;CommandButton;3740 ;7590 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    Default=Yes;
    PushAction=LookupOK;
    ...

    Replacement code 6

    ...
    ShowCaption=No;
    SourceExpr="Payment Tolerance Warning" }
    { 81 ;Label ;440 ;3300 ;3300 ;440 ;ParentControl=80 }

    // Add the following line.
    { 52 ;CommandButton;3740 ;8250 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    Default=Yes;
    PushAction=LookupOK;
    ...

    Existing code 7

    ...
    Default=Yes;
    PushAction=LookupOK;
    InvalidActionAppearance=Hide }

    // Delete the following line.
    { 53 ;CommandButton;6160 ;7590 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    Cancel=Yes;
    PushAction=LookupCancel;
    ...

    Replacement code 7

    ...
    Default=Yes;
    PushAction=LookupOK;
    InvalidActionAppearance=Hide }

    // Add the following line.
    { 53 ;CommandButton;6160 ;8250 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    Cancel=Yes;
    PushAction=LookupCancel;
    ...

    Existing code 8

    ...
    Cancel=Yes;
    PushAction=LookupCancel;
    InvalidActionAppearance=Hide }

    // Delete the following line.
    { 54 ;CommandButton;11000;7590 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    PushAction=FormHelp }
    ...

    Replacement code 8

    ...
    Cancel=Yes;
    PushAction=LookupCancel;
    InvalidActionAppearance=Hide }

    // Add the following line.
    { 54 ;CommandButton;11000;8250 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    PushAction=FormHelp }
    ...

    Existing code 9

    ...
    VertGlue=Bottom;
    PushAction=FormHelp }

    // Delete the following line.
    { 42 ;MenuButton ;8580 ;7590 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    CaptionML=ENU=F&unctions;
    Menu=MENUITEMS
    ...

    Replacement code 9

    ...
    VertGlue=Bottom;
    PushAction=FormHelp }

    // Add the following line.
    { 42 ;MenuButton ;8580 ;8250 ;2200 ;550 ;HorzGlue=Right;

    VertGlue=Bottom;
    CaptionML=ENU=F&unctions;
    Menu=MENUITEMS
    ...
  4. Change the code in the Controls in the User Setup form (119) as follows:
    Existing code 1

    ...
    SourceExpr="User ID" }
    { 3 ;Label ;0 ;0 ;0 ;0 ;ParentControl=2;
    InColumnHeading=Yes }

    // Delete the following line.
    { 4 ;TextBox ;0 ;0 ;3011 ;0 ;ParentControl=1;

    InColumn=Yes;
    SourceExpr="Allow Posting From" }
    { 5 ;Label ;0 ;0 ;0 ;0 ;ParentControl=4;
    ...

    Replacement code 1

    ...
    SourceExpr="User ID" }
    { 3 ;Label ;0 ;0 ;0 ;0 ;ParentControl=2;
    InColumnHeading=Yes }

    // Add the following line.
    { 4 ;TextBox ;0 ;0 ;1650 ;0 ;ParentControl=1;

    InColumn=Yes;
    SourceExpr="Allow Posting From" }
    { 5 ;Label ;0 ;0 ;0 ;0 ;ParentControl=4;
    ...

    Existing code 2

    ...
    SourceExpr="Allow Posting From" }
    { 5 ;Label ;0 ;0 ;0 ;0 ;ParentControl=4;
    InColumnHeading=Yes }

    // Delete the following line.
    { 6 ;TextBox ;0 ;0 ;3300 ;0 ;ParentControl=1;

    InColumn=Yes;
    SourceExpr="Allow Posting To" }
    { 7 ;Label ;0 ;0 ;0 ;0 ;ParentControl=6;
    ...

    Replacement code 2

    ...
    SourceExpr="Allow Posting From" }
    { 5 ;Label ;0 ;0 ;0 ;0 ;ParentControl=4;
    InColumnHeading=Yes }

    // Add the following line.
    { 6 ;TextBox ;0 ;0 ;1650 ;0 ;ParentControl=1;

    InColumn=Yes;
    SourceExpr="Allow Posting To" }
    { 7 ;Label ;0 ;0 ;0 ;0 ;ParentControl=6;
    ...

    Existing code 3

    ...
    SourceExpr="Allow Posting To" }
    { 7 ;Label ;0 ;0 ;0 ;0 ;ParentControl=6;
    InColumnHeading=Yes }
    { 8 ;CheckBox ;0 ;0 ;1650 ;0 ;ParentControl=1;
    InColumn=Yes;
    SourceExpr="Register Time" }
    ...

    Replacement code 3

    SourceExpr="Allow Posting To" }
    { 7 ;Label ;0 ;0 ;0 ;0 ;ParentControl=6;
    InColumnHeading=Yes }

    // Add the following lines.
    { 1080000;CheckBox ;4286 ;550 ;1650 ;440 ;ParentControl=1;
    InColumn=Yes;
    ShowCaption=No;
    SourceExpr="Application always Allowed" }
    { 1080001;Label ;6160 ;330 ;3300 ;440 ;ParentControl=1080000;
    InColumnHeading=Yes }
    // End of the lines.

    { 8 ;CheckBox ;0 ;0 ;1650 ;0 ;ParentControl=1;
    InColumn=Yes;
    SourceExpr="Register Time" }
    ...
  5. Add a global variable in the Gen. Jnl.-Check Line codeunit (11), and then specify the variable as follows:

    • Name: AllowPostingInClosedVATPeriod

    • DataType: Boolean

  6. Change the code in the RunCheck function in the Gen. Jnl.-Check Line codeunit (11) as follows:
    Existing code

    ...
    IF DateNotAllowed("Posting Date") THEN
    FIELDERROR("Posting Date",Text001);

    // Delete the following line.
    VATTools.RunCheckNorwegianVAT(GenJnlLine);

    IF ("Document Date" <> 0D) THEN
    IF ("Document Date" <> NORMALDATE("Document Date")) AND
    ...

    Replacement code

    ...
    IF DateNotAllowed("Posting Date") THEN
    FIELDERROR("Posting Date",Text001);

    // Add the following line.
    VATTools.RunCheckNorwegianVAT(GenJnlLine,AllowPostingInClosedVATPeriod);

    IF ("Document Date" <> 0D) THEN
    IF ("Document Date" <> NORMALDATE("Document Date")) AND
    ...
  7. Change the code in the CheckPostingPeriod function in the Gen. Jnl.-Check Line codeunit (11) as follows:
    Existing code

    ...
    OverrideDimErr := TRUE;
    END;

    BEGIN
    END.
    }
    ...

    Replacement code

    ...
    OverrideDimErr := TRUE;
    END;

    // Add the following lines.
    PROCEDURE CheckPostingPeriod@1000000001(CheckPeriod@1080000 : Boolean);
    VAR
    AllowPosting@1080001 : Boolean;
    BEGIN
    IF CheckPeriod THEN BEGIN
    AllowPostingFrom := 0D;
    AllowPostingTo := 0D;
    AllowPostingInClosedVATPeriod := FALSE;
    END ELSE BEGIN
    AllowPosting := FALSE;
    GLSetup.GET;
    AllowPosting := GLSetup."Application always Allowed";
    IF NOT AllowPosting THEN
    IF UserSetup.GET(USERID) THEN
    AllowPosting := UserSetup."Application always Allowed";
    IF AllowPosting THEN BEGIN
    AllowPostingFrom := 0D;
    AllowPostingTo := 31129999D;
    END ELSE BEGIN
    AllowPostingFrom := 0D;
    AllowPostingTo := 0D;
    END;
    AllowPostingInClosedVATPeriod := AllowPosting;
    END;
    END;
    // End of the lines.

    BEGIN
    END.
    }
  8. Change the code in the CustPostApplyCustLedgEntry function in the Gen. Jnl.-Post Line codeunit (12) as follows:
    Existing code

    ...
    TempJnlLineDim.DELETEALL;
    DimMgt.CopyLedgEntryDimToJnlLineDim(LedgEntryDim,TempJnlLineDim);

    // Delete the following line.
    GenJnlCheckLine.RunCheck(GenJnlLine,TempJnlLineDim);

    InitCodeUnit;
    ...

    Replacement code

    ...
    TempJnlLineDim.DELETEALL;
    DimMgt.CopyLedgEntryDimToJnlLineDim(LedgEntryDim,TempJnlLineDim);

    // Add the following lines.
    GenJnlCheckLine.CheckPostingPeriod(FALSE);
    GenJnlCheckLine.RunCheck(GenJnlLine,TempJnlLineDim);
    GenJnlCheckLine.CheckPostingPeriod(TRUE);
    // End of the lines.

    InitCodeUnit;
    ...
  9. Change the code in the VendPostApplyVendLedgEntry function in the Gen. Jnl.-Post Line codeunit (12) as follows:
    Existing code

    ...
    TempJnlLineDim.DELETEALL;
    DimMgt.CopyLedgEntryDimToJnlLineDim(LedgEntryDim,TempJnlLineDim);

    // Delete the following lines.
    //GenJnlCheckLine.CheckPostingPeriod(FALSE); // NO0005
    GenJnlCheckLine.RunCheck(GenJnlLine,TempJnlLineDim);
    //GenJnlCheckLine.CheckPostingPeriod(TRUE); // NO0005
    // End of the lines.

    InitCodeUnit;
    ...

    Replacement code

    ...
    TempJnlLineDim.DELETEALL;
    DimMgt.CopyLedgEntryDimToJnlLineDim(LedgEntryDim,TempJnlLineDim);

    // Add the following lines.
    GenJnlCheckLine.CheckPostingPeriod(FALSE);
    GenJnlCheckLine.RunCheck(GenJnlLine,TempJnlLineDim);
    GenJnlCheckLine.CheckPostingPeriod(TRUE);
    // End of the lines.

    InitCodeUnit;
    ...
  10. Change the code in the RunCheckNorwegianVAT function in the Norwegian VAT Tools codeunit (10600) as follows:
    Existing code 1

    ...
    EXIT(VATPeriod."Period No.");
    END;

    // Delete the following line.
    PROCEDURE RunCheckNorwegianVAT@1080009(GenJnlLine@1080000 : Record 81);

    VAR
    SettledVATPeriod@1080003 : Record 10601;
    VATProdPostGrp@1080002 : Record 324;
    ...

    Replacement code 1

    EXIT(VATPeriod."Period No.");
    END;

    // Add the following line.
    PROCEDURE RunCheckNorwegianVAT@1080009(GenJnlLine@1080000 : Record 81;VAR AllowPostingInClosedVATPeriod@1080001 : Boolean);

    VAR
    SettledVATPeriod@1080003 : Record 10601;
    VATProdPostGrp@1080002 : Record 324;
    ...

    Existing code 2

    ...
    GLSetup@1080004 : Record 98;
    BEGIN
    WITH GenJnlLine DO BEGIN
    IF "VAT Base Amount Type" <> "VAT Base Amount Type"::Automatic THEN BEGIN
    IF ("Gen. Posting Type" = "Gen. Posting Type"::Purchase) OR
    ("Bal. Gen. Posting Type" = "Bal. Gen. Posting Type"::Purchase)
    ...

    Replacement code 2

    ...
    GLSetup@1080004 : Record 98;
    BEGIN
    WITH GenJnlLine DO BEGIN

    // Add the following lines.
    IF AllowPostingInClosedVATPeriod THEN
    AllowPostingInClosedVATPeriod := FALSE
    ELSE
    IF SettledVATPeriod.GET(DATE2DMY("Posting Date",3),VATPeriodNo("Posting Date")) THEN
    IF SettledVATPeriod.Closed THEN
    FIELDERROR("Posting Date",STRSUBSTNO(Text005,SettledVATPeriod.Year,SettledVATPeriod."Period No."));
    // End of the lines.

    IF "VAT Base Amount Type" <> "VAT Base Amount Type"::Automatic THEN BEGIN
    IF ("Gen. Posting Type" = "Gen. Posting Type"::Purchase) OR
    ("Bal. Gen. Posting Type" = "Bal. Gen. Posting Type"::Purchase)
    ...

Prerequisites

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

  • The Norwegian version of Microsoft Dynamics NAV 2009 R2

  • The Norwegian version of Microsoft Dynamics NAV 2009 Service Pack 1 (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 Use for other considerations.

Potřebujete další pomoc?

Chcete další možnosti?

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.

Byly tyto informace užitečné?

Co ovlivnilo váš názor?
Po stisknutí tlačítka pro odeslání se vaše zpětná vazba použije k vylepšování produktů a služeb Microsoftu. Váš správce IT bude moci tato data shromažďovat. Prohlášení o zásadách ochrany osobních údajů.

Děkujeme vám za zpětnou vazbu.

×