使用 Digipoort 介面,在荷蘭文版本的 Microsoft 動態航行點 2009年時的驗證錯誤

範本︰ CPR-Navision 程式碼 Fiacx 範本

錯誤 #: 211509 (內容維護)

假設您在荷蘭文版本的 Microsoft 動態航行點 2009年實作 「稅 Authorties 收養 Digipoort 增值稅和 Microsoft 動態航行點 SP1 NL 的歐盟銷售清單送出」。當您使用 Digipoort 介面時,可能會收到下列的驗證錯誤其中一項︰

SBR_DIGIPOORT bd-alg:ContactPrefix 不可為空白。

ICP 數量不能為零。

下列產品中,就會發生這個問題︰

  • 荷蘭文版本的 Microsoft 動態航行點 2009 R2

  • Microsoft 動態航行點 2009 Service Pack 1 (SP1) 的荷蘭文版本

解決方案

Hotfix 資訊

已經可以從 Microsoft 取得支援的 hotfix。不過,它只被用來修正本文所述的問題。它只適用於發生此特定問題的系統上。此 hotfix 可能會接受其他測試。因此,如果此問題不會嚴重影響,我們建議您等候下一步的 Microsoft 動態航行點 2009 service pack 或包含此 hotfix 的下一個 Microsoft 動態航行點版本。

注意 在特殊的情況下,通常會支援呼叫可能已被取消如果技術支援專業人員的 Microsoft 動態及相關的產品所產生的費用會決定某特定更新程式可以解決您的問題。收取支援費用會套用,如果有其他支援問題是,不能限定的特定更新程式。

如果這個 hotfix 沒有公布出來讓公眾下載 (亦即本文中未提供此 hotfix 公開的 URL),則散佈需要技術指導人員、 重大問題小組成員或管理員核准,下列條件︰

  • 接獲此 hotfix,客戶必須遭遇 < 徵狀=""> 一節所述的錯誤。

  • 您必須追蹤您傳送這個檔案,並提供他們下一步的 service pack 時可供使用 (如果 service pack 發佈) 的客戶。

此 hotfix 並未排定隨附於 Microsoft 動態航行點的 Service Pack。

安裝資訊

Microsoft 會提供程式設計範例僅供說明,而不做任何明示或默示的保證。這包括,但不限於適售性或適合某特定用途之默示擔保責任。本文假設您已相當熟悉使用的我們所示範的程式設計語言以及建立和偵錯程序所使用的工具。Microsoft 技術支援工程師可以協助解釋特定程序的功能。不過,它們不會修改這些範例以提供附加功能或建構程序來滿足您特定需求。

注意套用此 hotfix 之前,請確認所有的 Microsoft 動態航行點用戶端使用者會登出系統。這包括 Microsoft 動態航行點應用程式伺服器 (NAS) 服務。您應該是唯一的用戶端使用者已登入,當您實作此 hotfix。

若要實作此 hotfix,您必須有開發人員授權。

我們建議您在 Windows 登入] 視窗中的色彩,或資料庫登入] 視窗中的使用者帳戶被指派 「 進階 」 的角色識別碼。如果使用者帳戶不能指派為 「 超級 」 的角色識別碼,您必須確認使用者帳戶具有下列權限︰

  • 您將會變更物件的 [修改] 權限。

  • 執行權限的系統物件 ID 5210物件和系統物件 ID 9015

    物件。

注意您沒有擁有資料存放區的權限,除非您需要執行資料修復。

程式碼變更

注意永遠測試程式碼修正在受控制的環境中才能套用到實際執行電腦的修正程式。

若要解決這個問題,請依照下列步驟執行:

  1. 變更建立 Elec.ICP 宣告報表 (11404) 中的程式碼如下所示︰
    現有的程式碼 1

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

    取代程式碼 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);
    ...

    現有的程式碼 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*
    ...

    取代程式碼 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*
    ...

    現有的程式碼 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',
    ...

    取代程式碼 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',
    ...

    現有的程式碼 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',
    ...

    取代程式碼 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',
    ...

    現有的程式碼 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',
    ...

    取代程式碼 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',
    ...

    現有的程式碼 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',
    ...

    取代程式碼 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',
    ...

    現有的程式碼 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");
    ...

    取代程式碼 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. 變更在全域變數建立 Elec.ICP 宣告報表 (11404) 中的程式碼如下所示︰
    現有的程式碼

    ...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];
    ...

    取代程式碼

    ...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. 變更中的ExtractStreetName函式,建立 Elec.ICP 宣告報表 (11404) 中的程式碼如下所示︰
    現有的程式碼

    ...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;
    ...

    取代程式碼

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

    LOCAL PROCEDURE ExtractInitials@1000014(FullName@1000000 : Text[35]) Initials : Text[30];
    VAR
    Pos@1000001 : Integer;
    ...
  4. 變更中的IndexOfFirstNumber函式,建立 Elec.ICP 宣告報表 (11404) 中的程式碼如下所示︰
    現有的程式碼

    ...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.
    }
    ...

    取代程式碼

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

    BEGIN
    END.
    }
    ...
  5. 變更後置程式碼管理 codeunit (11401) 的ParseAddressAdditionHouseNo函式中的程式碼如下所示︰
    現有的程式碼

    ...EXIT(TRUE);
    END;

    BEGIN
    {
    <changelog>
    ...

    取代程式碼

    ...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>
    ...


先決條件

您必須具備套用此 hotfix 之後安裝下列產品的其中一個︰

  • 荷蘭文版本的 Microsoft 動態航行點 2009 R2

  • 荷蘭文版本的 Microsoft 動態航行點 2009 SP1

此外,您必須實作 「稅 Authorties 採用 Digipoort 增值稅和 Microsoft 動態航行點 SP1 NL 的歐盟銷售清單送出。"

移除資訊

您無法移除此 hotfix。

狀態

Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。

參考

VSFT DynamicsNAVSE: 359638,359044,358345,360154,359348,357995

注意這是直接從 Microsoft 支援組織內建立的「快速發行」文件。本文件所包含的現狀資訊是針對新興問題的回應。為縮短使其可用的時程,資料可能會包含印刷錯誤,且可能會隨時進行修改而不另行通知。如其他考量,請參閱 「使用規定」。

作者︰ andregu
Writer: v-six
技術編審︰ andregu
Editor:

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×