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.

Assume that you implement the "Tax Authorties Adopt Digipoort for VAT and EU Sales List Submission for Microsoft Dynamics NAV SP1 NL" in the Dutch version of Microsoft Dynamics NAV 2009. When you use the Digipoort interface, you receive one of the following validation errors:

SBR_DIGIPOORT bd-alg:ContactPrefix cannot be empty.

ICP Amount must not be zero.

This problem occurs in the following products:

  • The Dutch version of Microsoft Dynamics NAV 2009 R2

  • The Dutch 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 Create Elec. ICP Declaration report (11404) as follows:
    Existing code 1

    ...
    ElecTaxDeclarationHeader@1000000 : Record 11409;
    ApplicationManagement@1000001 : Codeunit 1;
    UseVATRegNo@1000010 : Text[20];
    BEGIN
    IF Status > Status::Created THEN
    ERROR(StatusErr);
    ...

    Replacement code 1

    ...
    ElecTaxDeclarationHeader@1000000 : Record 11409;
    ApplicationManagement@1000001 : Codeunit 1;
    UseVATRegNo@1000010 : Text[20];
    StreetName@1000002 : Text[50];
    HouseNo@1000003 : Text[50];
    AdditionHouseNo@1000004 : Text[50];
    ContactPrefix@1000011 : Text[35];
    BEGIN
    IF Status > Status::Created THEN
    ERROR(StatusErr);
    ...

    Existing code 2

    ...
    // zbrli:xbrl->bd-ob:VATIdentificationNumberNLFiscalEntityDivision
    IF ElecTaxDeclarationSetup."Part of Fiscal Entity" THEN BEGIN
    IF COPYSTR(
    UPPERCASE(CompanyInfo."VAT Registration No."),
    1,STRLEN(CompanyInfo."Country/Region Code")) = CompanyInfo."Country/Region Code"
    THEN
    CompanyInfo."VAT Registration No." := DELSTR(CompanyInfo."VAT Registration No.",1,STRLEN(CompanyInfo."Country/Region Code"));
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-ob:VATIdentificationNumberNLFiscalEntityDivision',
    CompanyInfo."VAT Registration No.",'','Msg','');
    END;

    // zbrli:xbrl->bd-alg:Contact*
    ...

    Replacement code 2

    ...
    // zbrli:xbrl->bd-ob:VATIdentificationNumberNLFiscalEntityDivision
    IF ElecTaxDeclarationSetup."Part of Fiscal Entity" THEN BEGIN
    IF COPYSTR(
    UPPERCASE(CompanyInfo."Fiscal Entity No."),
    1,STRLEN(CompanyInfo."Country/Region Code")) = CompanyInfo."Country/Region Code"
    THEN
    CompanyInfo."Fiscal Entity No." := DELSTR(CompanyInfo."Fiscal Entity No.",1,STRLEN(CompanyInfo."Country/Region Code"));
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-ob:VATIdentificationNumberNLFiscalEntityDivision',
    CompanyInfo."Fiscal Entity No.",'','Msg','');
    END;

    // zbrli:xbrl->bd-alg:Contact*
    ...

    Existing code 3

    ...
    IF ElecTaxDeclarationSetup."ICP Contact Type" = ElecTaxDeclarationSetup."ICP Contact Type"::"Tax Payer" THEN BEGIN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactInitials',
    ExtractInitials(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPrefix',
    ExtractNamePrefix(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactSurname',
    ExtractSurname(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactTelephoneNumber',
    ...

    Replacement code 3

    ...
    IF ElecTaxDeclarationSetup."ICP Contact Type" = ElecTaxDeclarationSetup."ICP Contact Type"::"Tax Payer" THEN BEGIN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactInitials',
    ExtractInitials(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    ContactPrefix := ExtractNamePrefix(ElecTaxDeclarationSetup."Tax Payer Contact Name");
    IF ContactPrefix <> '' THEN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPrefix',ContactPrefix,'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactSurname',
    ExtractSurname(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactTelephoneNumber',
    ...

    Existing code 4

    ...
    ExtractSurname(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactTelephoneNumber',
    ElecTaxDeclarationSetup."Tax Payer Contact Phone No.",'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactStreetNameNL',
    ExtractStreetName(CompanyInfo.Address),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactHouseNumberNL',
    ExtractStreetNo(CompanyInfo.Address),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPostalCodeNL',
    DELCHR(CompanyInfo."Post Code",'=',' '),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPlaceOfResidenceNL',
    ...

    Replacement code 4

    ...
    ExtractSurname(ElecTaxDeclarationSetup."Tax Payer Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactTelephoneNumber',
    ElecTaxDeclarationSetup."Tax Payer Contact Phone No.",'','Msg','');

    PostCodeMgt.ParseAddressAdditionHouseNo(StreetName,HouseNo,AdditionHouseNo,CompanyInfo.Address);
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactStreetNameNL',StreetName,'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactHouseNumberNL',HouseNo,'','Msg','');
    IF AdditionHouseNo <> '' THEN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactHouseNumberAddition',AdditionHouseNo,'','Msg','');

    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPostalCodeNL',
    DELCHR(CompanyInfo."Post Code",'=',' '),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPlaceOfResidenceNL',
    ...

    Existing code 5

    ...
    END ELSE BEGIN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactInitials',
    ExtractInitials(ElecTaxDeclarationSetup."Agent Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPrefix',
    ExtractNamePrefix(ElecTaxDeclarationSetup."Agent Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactSurname',
    ExtractSurname(ElecTaxDeclarationSetup."Agent Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactTelephoneNumber',
    ...

    Replacement code 5

    ...
    END ELSE BEGIN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactInitials',
    ExtractInitials(ElecTaxDeclarationSetup."Agent Contact Name"),'','Msg','');
    ContactPrefix := ExtractNamePrefix(ElecTaxDeclarationSetup."Agent Contact Name");
    IF ContactPrefix <> '' THEN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPrefix',ContactPrefix,'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactSurname',
    ExtractSurname(ElecTaxDeclarationSetup."Agent Contact Name"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactTelephoneNumber',
    ...

    Existing code 6

    ...
    ElecTaxDeclarationSetup."Agent Contact Phone No.",'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:TaxConsultantNumber',
    ElecTaxDeclarationSetup."Agent Contact ID",'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactStreetNameNL',
    ExtractStreetName(ElecTaxDeclarationSetup."Agent Contact Address"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactHouseNumberNL',
    ExtractStreetNo(ElecTaxDeclarationSetup."Agent Contact Address"),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPostalCodeNL',
    DELCHR(ElecTaxDeclarationSetup."Agent Contact Post Code",'=',' '),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPlaceOfResidenceNL',
    ...

    Replacement code 6

    ...
    ElecTaxDeclarationSetup."Agent Contact Phone No.",'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:TaxConsultantNumber',
    ElecTaxDeclarationSetup."Agent Contact ID",'','Msg','');

    PostCodeMgt.ParseAddressAdditionHouseNo(
    StreetName,HouseNo,AdditionHouseNo,ElecTaxDeclarationSetup."Agent Contact Address");
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactStreetNameNL',StreetName,'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactHouseNumberNL',HouseNo,'','Msg','');
    IF AdditionHouseNo <> '' THEN
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactHouseNumberAddition',AdditionHouseNo,'','Msg','');

    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPostalCodeNL',
    DELCHR(ElecTaxDeclarationSetup."Agent Contact Post Code",'=',' '),'','Msg','');
    InsertDataLine("Elec. Tax Declaration Header",1,'bd-alg:ContactPlaceOfResidenceNL',
    ...

    Existing code 7

    ...
    SETRANGE("VAT Registration No.", "VAT Registration No.");
    CALCSUMS(Base);

    "Elec. Tax Declaration Header".InsertLine(0,1,CurrentType,'');
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:CountryCodeISO-EC',
    COPYSTR("Country/Region Code",1,2),'','Msg','');

    IF COPYSTR(UPPERCASE("VAT Registration No."),1,STRLEN("Country/Region Code")) = "Country/Region Code" THEN
    "VAT Registration No." := DELSTR("VAT Registration No.",1,STRLEN("Country/Region Code"));
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:SuppliesAmount',
    FORMAT(-Base,0,'<Sign><Integer>'),'INF','Msg','EUR');
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:VATIdentificationNumberNational',
    "VAT Registration No.",'','Msg','');

    FIND('+');
    SETRANGE("Country/Region Code");
    ...

    Replacement code 7

    ...
    SETRANGE("VAT Registration No.", "VAT Registration No.");
    CALCSUMS(Base);

    IF ABS(Base) >= 1 THEN BEGIN
    "Elec. Tax Declaration Header".InsertLine(0,1,CurrentType,'');
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:CountryCodeISO-EC',
    COPYSTR("Country/Region Code",1,2),'','Msg','');

    IF COPYSTR(UPPERCASE("VAT Registration No."),1,STRLEN("Country/Region Code")) = "Country/Region Code" THEN
    "VAT Registration No." := DELSTR("VAT Registration No.",1,STRLEN("Country/Region Code"));

    CASE Integer.Number OF
    0,2:
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:SuppliesAmount',
    FORMAT(-Base,0,'<Sign><Integer>'),'INF','Msg','EUR');
    1:
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:ServicesAmount',
    FORMAT(-Base,0,'<Sign><Integer>'),'INF','Msg','EUR');
    END;
    InsertDataLine("Elec. Tax Declaration Header",2,'bd-ob:VATIdentificationNumberNational',
    "VAT Registration No.",'','Msg','');
    END;

    FIND('+');
    SETRANGE("Country/Region Code");
    ...
  2. Change the code in Global Variables in the Create Elec. ICP Declaration report (11404) as follows:
    Existing code

    ...
    CompanyInfo@1000003 : Record 79;
    ElecTaxDeclarationSetup@1000001 : Record 11408;
    StatusErr@1000005 : TextConst 'ENU=The report status need to have value " " or Created to create the report content.';
    CurrentType@1000000 : Text[60];

    LOCAL PROCEDURE GetStrippedAppVersion@1101100000(AppVersion@1101100001 : Text[250]) Res : Text[250];
    ...

    Replacement code

    ...
    CompanyInfo@1000003 : Record 79;
    ElecTaxDeclarationSetup@1000001 : Record 11408;
    StatusErr@1000005 : TextConst 'ENU=The report status need to have value " " or Created to create the report content.';
    PostCodeMgt@1000002 : Codeunit 11401;
    CurrentType@1000000 : Text[60];

    LOCAL PROCEDURE GetStrippedAppVersion@1101100000(AppVersion@1101100001 : Text[250]) Res : Text[250];
    ...
  3. Change the code in the ExtractStreetName function in the Create Elec. ICP Declaration report (11404) as follows:
    Existing code

    ...
    ElecTaxDeclHeader.InsertLine(1,Indentation + 1,'unitRef',unitRef);
    END;

    LOCAL PROCEDURE ExtractStreetName@1000013(Address@1000000 : Text[50]) : Text[50];
    BEGIN
    IF IndexOfFirstNumber(Address) > 1 THEN
    EXIT(COPYSTR(Address,1,IndexOfFirstNumber(Address) - 2));
    EXIT(Address);
    END;

    LOCAL PROCEDURE ExtractStreetNo@1000012(Address@1000000 : Text[50]) : Text[50];
    BEGIN
    IF IndexOfFirstNumber(Address) > 0 THEN
    EXIT(COPYSTR(Address,IndexOfFirstNumber(Address)));
    EXIT('');
    END;

    LOCAL PROCEDURE ExtractInitials@1000014(FullName@1000000 : Text[35]) Initials : Text[30];
    VAR
    Pos@1000001 : Integer;
    ...

    Replacement code

    ...
    ElecTaxDeclHeader.InsertLine(1,Indentation + 1,'unitRef',unitRef);
    END;

    LOCAL PROCEDURE ExtractInitials@1000014(FullName@1000000 : Text[35]) Initials : Text[30];
    VAR
    Pos@1000001 : Integer;
    ...
  4. Change the code in the IndexOfFirstNumber function in the Create Elec. ICP Declaration report (11404) as follows:
    Existing code

    ...
    Surname := COPYSTR(FullName,STRPOS(FullName,' ') + 1);
    END;

    LOCAL PROCEDURE IndexOfFirstNumber@1000017(Str@1000000 : Text[50]) : Integer;
    VAR
    Index@1000001 : Integer;
    BEGIN
    FOR Index := 1 TO STRLEN(Str) DO BEGIN
    IF Str[Index] IN ['0'..'9'] THEN
    EXIT(Index);
    END;
    EXIT(0);
    END;

    BEGIN
    END.
    }
    ...

    Replacement code

    ...
    Surname := COPYSTR(FullName,STRPOS(FullName,' ') + 1);
    END;

    BEGIN
    END.
    }
    ...
  5. Change the code in the ParseAddressAdditionHouseNo function in the Post Code Management codeunit (11401) as follows:
    Existing code

    ...
    EXIT(TRUE);
    END;

    BEGIN
    {
    <changelog>
    ...

    Replacement code

    ...
    EXIT(TRUE);
    END;

    PROCEDURE ParseAddressAdditionHouseNo@1000003(VAR StreetName@1000001 : Text[50];VAR HouseNo@1000002 : Text[50];VAR AdditionHouseNo@1000003 : Text[50];Address@1000000 : Text[50]);
    VAR
    HouseString@1000004 : Text[50];
    BEGIN
    StreetName := '';
    HouseNo := '';
    AdditionHouseNo := '';
    IF Address = '' THEN
    EXIT;

    // Suppose that house string is a last word in the Address
    HouseString := GetHouseString(Address);

    IF HouseString = '' THEN BEGIN
    StreetName := Address;
    EXIT;
    END;

    // The last word is a House string with possible AdditionHouseNo information. All before last word is a StreetName.
    StreetName := COPYSTR(Address,1,STRLEN(Address) - STRLEN(HouseString) - 1);
    HouseNo := GetHouseNoFromHouseString(HouseString);
    AdditionHouseNo := HouseString;
    END;

    LOCAL PROCEDURE GetHouseString@1000002(Address@1000000 : Text[50]) : Text[50];
    VAR
    i@1000003 : Integer;
    BEGIN
    // If there's only one word then return empty HouseString
    IF STRPOS(Address,' ') = 0 THEN
    EXIT('');

    //Lookup from end of string first space after a number

    // Find the last word: revert address string, cut first word, revert result
    RevertString(Address);
    // Delete Spaces at beginning
    Address := DELCHR(Address,'<');

    i := 1;

    // Find first number i ==> position of first number
    WHILE (NOT (Address[i] IN ['0'..'9']) AND (i < STRLEN(Address))) DO
    i += 1;

    IF ((i = STRLEN(Address)) AND NOT (Address[i] IN ['0'..'9'])) THEN //No number found
    EXIT('');

    // look further until number stops
    WHILE ((Address[i] IN ['0'..'9']) AND (i < STRLEN(Address))) DO
    i+= 1;

    Address := DELCHR(COPYSTR(Address,1, i-1), '<=>'); // remove all spaces

    RevertString(Address);
    EXIT(Address);
    END;

    LOCAL PROCEDURE GetHouseNoFromHouseString@1000000(VAR HouseString@1000000 : Text[50]) HouseNo : Text[50];
    VAR
    Pos@1000002 : Integer;
    BEGIN
    Pos := 1;
    WHILE HouseString[Pos] IN ['0'..'9'] DO
    Pos += 1;
    HouseNo := COPYSTR(HouseString,1,Pos - 1);

    // remove HouseNo from the HouseString including special separating char if such exist
    IF HouseString[Pos] IN ['/','\','-'] THEN
    Pos += 1;
    HouseString := COPYSTR(HouseString,Pos);
    END;

    LOCAL PROCEDURE RevertString@1170000000(VAR String@1170000000 : Text[50]);
    VAR
    StringCopy@1170000001 : Text[50];
    i@1170000002 : Integer;
    Length@1170000003 : Integer;
    BEGIN
    StringCopy := String;
    Length := STRLEN(String);
    FOR i := 1 TO Length DO
    String[i] := StringCopy[Length - i + 1];
    END;

    BEGIN
    {
    <changelog>
    ...


Prerequisites

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

  • The Dutch version of Microsoft Dynamics NAV 2009 R2

  • The Dutch version of Microsoft Dynamics NAV 2009 SP1

In addition, you have to implement the "Tax Authorties Adopt Digipoort for VAT and EU Sales List Submission for Microsoft Dynamics NAV SP1 NL."

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!

×