本文適用於所有國家及語言地區的 Microsoft Dynamics NAV。
症狀
假設你在 Microsoft Dynamics 2009 的總帳設定對話框中的 Bill-to/Sell-to VAT 計算清單中點選了「賣出/買入號碼」。 當您發布銷售訂單,其中銷售客戶來自歐盟 (歐盟) ,帳單客戶為國內客戶時,與增值稅報告相關的增值稅 (增值稅) 條目資訊,尤其是增值稅維埃報告,並未被一致填寫。 關於 增值稅國家代碼 欄位及 增值稅註冊號碼 欄位的資訊,始終來自帳單收件人。
此問題發生於以下產品:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 服務包 1 (SP1)
解決方式
Hotfix 資訊
Microsoft 現在已經支援熱修補程式。 然而,這僅是為了修正本文所描述的問題。 只應用在遇到這個特定問題的系統上。 此熱修補可能會進行額外測試。 因此,如果您未受到此問題嚴重影響,我們建議您等待下一個 Microsoft Dynamics NAV 2009 服務包或包含此熱修補的 Microsoft Dynamics NAV 版本。
注意:在特殊情況下,若 Microsoft Dynamics 及相關產品的技術支援專業人員判斷特定更新能解決您的問題,通常因支援電話而產生的費用可能會被取消。 一般來說,如果有所描述之特定更新無法解決的其他支援問題,才會收取支援費用。
安裝資訊
Microsoft 僅提供圖例的程式設計範例,不含明示或暗示的擔保。 這包括 (但不限於) 適用于特定目的之可操作性或適用性的暗示擔保。 本文假設您熟悉正在示範的程式設計語言,以及用來建立和進行程式偵錯工具的工具。 Microsoft 支援工程師可以協助說明特定程式的功能。 不過,他們將不會修改這些範例以提供新增功能或建構符合您特定需求的程式。
注意:安裝此熱修補程式前,請確認所有 Microsoft Dynamics NAV 用戶端使用者皆已登出系統。 這包括Microsoft Dynamics NAV應用伺服器 (NAS) 服務。 當你實施這個熱修補時,應該只有你一個登入的客戶端使用者。
要實作這個熱修補,你必須擁有開發者授權。
我們建議在 Windows 登入視窗或資料庫登入視窗中,將使用者帳號分配「SUPER」角色 ID。 若使用者帳號無法被指派「SUPER」角色 ID,您必須驗證該帳號擁有以下權限:
- 你要更改的物件的修改權限。
- 系統物件 ID 5210 的執行權限,以及系統物件 ID 9015 的執行權限。
注意:除非你必須進行資料修復,否則你不必擁有資料儲存的權利。
法規變更
注意:在將修正程式套用到生產電腦之前,務必在受控環境中測試修正。
如果要解決這個問題,請依照下列步驟執行。
在 Gen 的 InsertVAT 函式中更改程式碼。 Jnl.-郵政線路 (12) 如下:
現有程式碼... VATEntry."Sales Tax Connection No." := NextConnectionNo; VATEntry."User ID" := USERID; VATEntry."No. Series" := "Posting No. Series"; VATEntry."VAT Base Discount %" := "VAT Base Discount %"; VATEntry."Bill-to/Pay-to No." := "Bill-to/Pay-to No."; // Delete the following lines. IF "Bill-to/Pay-to No." <> '' THEN CASE VATEntry.Type OF VATEntry.Type::Purchase: BEGIN IF Vend."No." <> "Bill-to/Pay-to No." THEN Vend.GET("Bill-to/Pay-to No."); VATEntry."Country/Region Code" := Vend."Country/Region Code"; VATEntry."VAT Registration No." := Vend."VAT Registration No."; END; VATEntry.Type::Sale: BEGIN IF Cust."No." <> "Bill-to/Pay-to No." THEN Cust.GET("Bill-to/Pay-to No."); VATEntry."Country/Region Code" := Cust."Country/Region Code"; VATEntry."VAT Registration No." := Cust."VAT Registration No."; END; END; // End of the deleted lines. ...替換代碼
... VATEntry."Sales Tax Connection No." := NextConnectionNo; VATEntry."User ID" := USERID; VATEntry."No. Series" := "Posting No. Series"; VATEntry."VAT Base Discount %" := "VAT Base Discount %"; VATEntry."Bill-to/Pay-to No." := "Bill-to/Pay-to No."; // Add the following lines. VATEntry."Country/Region Code" := "Country/Region Code"; VATEntry."VAT Registration No." := "VAT Registration No."; // End of the added lines. ...更改銷售給客戶編號中的代碼。 - 銷售標頭表中的 OnValidate 觸發器 (36) 如下:
現有程式碼... "Sell-to Contact" := Cust.Contact; "Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group"; "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; "Tax Area Code" := Cust."Tax Area Code"; "Tax Liable" := Cust."Tax Liable"; // Delete the following line. "VAT Registration No." := Cust."VAT Registration No."; ...替換代碼
... "Sell-to Contact" := Cust.Contact; "Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group"; "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; "Tax Area Code" := Cust."Tax Area Code"; "Tax Liable" := Cust."Tax Liable"; // Add the following lines. GLSetup.GET; IF GLSetup."Bill-to/Sell-to VAT Calc." = GLSetup."Bill-to/Sell-to VAT Calc."::"Sell-to/Buy-from No." THEN BEGIN "VAT Registration No." := Cust."VAT Registration No."; "VAT Country/Region Code" := Cust."Country/Region Code"; END; // End of the added lines. ...更改帳單至客戶編號中的代碼。 - 銷售標頭表中的 OnValidate 觸發器 (36) 如下:
現行法規1... "Bill-to Address 2" := Cust."Address 2"; "Bill-to City" := Cust.City; "Bill-to Post Code" := Cust."Post Code"; "Bill-to County" := Cust.County; "Bill-to Country/Region Code" := Cust."Country/Region Code"; // Delete the following line. "VAT Country/Region Code" := Cust."Country/Region Code"; ...替換代碼1
... "Bill-to Address 2" := Cust."Address 2"; "Bill-to City" := Cust.City; "Bill-to Post Code" := Cust."Post Code"; "Bill-to County" := Cust.County; "Bill-to Country/Region Code" := Cust."Country/Region Code"; ...現有的第二號法規
... // Delete the following line. IF GLSetup."Bill-to/Sell-to VAT Calc." = GLSetup."Bill-to/Sell-to VAT Calc."::"Bill-to/Pay-to No." THEN "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; ...替換代碼2
... // Add the following line. IF GLSetup."Bill-to/Sell-to VAT Calc." = GLSetup."Bill-to/Sell-to VAT Calc."::"Bill-to/Pay-to No." THEN BEGIN "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; // Add the following lines. "VAT Registration No." := Cust."VAT Registration No."; "VAT Country/Region Code" := Cust."Country/Region Code"; END; // End of the added lines. ...現行法規3
... "Language Code" := Cust."Language Code"; "Salesperson Code" := Cust."Salesperson Code"; "Combine Shipments" := Cust."Combine Shipments"; Reserve := Cust.Reserve; // Delete the following line. "VAT Registration No." := Cust."VAT Registration No."; ...替代代碼3
... "Language Code" := Cust."Language Code"; "Salesperson Code" := Cust."Salesperson Code"; "Combine Shipments" := Cust."Combine Shipments"; Reserve := Cust.Reserve; ...更改客戶編號中的代碼。 - 在服務標頭表中 (5900) OnValidate 觸發器如下:
現有程式碼... END; "Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group"; "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; "Tax Area Code" := Cust."Tax Area Code"; "Tax Liable" := Cust."Tax Liable"; // Delete the following line. "VAT Registration No." := Cust."VAT Registration No."; ...替換代碼
... END; "Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group"; "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; "Tax Area Code" := Cust."Tax Area Code"; "Tax Liable" := Cust."Tax Liable"; // Add the following lines. GLSetup.GET; IF GLSetup."Bill-to/Sell-to VAT Calc." = GLSetup."Bill-to/Sell-to VAT Calc."::"Sell-to/Buy-from No." THEN BEGIN "VAT Registration No." := Cust."VAT Registration No."; "VAT Country/Region Code" := Cust."Country/Region Code"; END; // End of the added lines. ...更改帳單至客戶編號中的代碼。 - 在服務標頭表中 (5900) OnValidate 觸發器如下:
現行法規1... // Delete the following line. IF GLSetup."Bill-to/Sell-to VAT Calc." = GLSetup."Bill-to/Sell-to VAT Calc."::"Bill-to/Pay-to No." THEN "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; ...替換代碼1
... // Add the following line. IF GLSetup."Bill-to/Sell-to VAT Calc." = GLSetup."Bill-to/Sell-to VAT Calc."::"Bill-to/Pay-to No." THEN BEGIN "VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group"; // Add the following lines. "VAT Registration No." := Cust."VAT Registration No."; "VAT Country/Region Code" := Cust."Country/Region Code"; END; // End of the added lines. ...現有的第二號法規
... "Invoice Disc. Code" := Cust."Invoice Disc. Code"; "Customer Disc. Group" := Cust."Customer Disc. Group"; "Language Code" := Cust."Language Code"; "Salesperson Code" := Cust."Salesperson Code"; Reserve := Cust.Reserve; // Delete the following line. "VAT Registration No." := Cust."VAT Registration No."; ...替換代碼2
... "Invoice Disc. Code" := Cust."Invoice Disc. Code"; "Customer Disc. Group" := Cust."Customer Disc. Group"; "Language Code" := Cust."Language Code"; "Salesperson Code" := Cust."Salesperson Code"; Reserve := Cust.Reserve; ...請依照以下方式刪除服務標頭表中「運送國/地區代碼 - OnValidate」觸發器的代碼, (5900) :
... // Delete the following lines. IF "Ship-to Country/Region Code" <> '' THEN "VAT Country/Region Code" := "Country/Region Code" ELSE "VAT Country/Region Code" := "Country/Region Code" // End of the deleted lines. ...在 5900 (服務標頭表的 UpdateShipToAddress 本地程序中,將程式碼變更如下) :
現有程式碼... "Ship-to County" := CompanyInfo."Ship-to County"; "Ship-to Country/Region Code" := CompanyInfo."Ship-to Country/Region Code"; "Ship-to Contact" := CompanyInfo."Ship-to Contact"; END; // Delete the following line. "VAT Country/Region Code" := "Country/Region Code"; END; ...替換代碼
... "Ship-to County" := CompanyInfo."Ship-to County"; "Ship-to Country/Region Code" := CompanyInfo."Ship-to Country/Region Code"; "Ship-to Contact" := CompanyInfo."Ship-to Contact"; END; END; ...
先決條件
您必須安裝以下其中一項產品才能套用此熱修補:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 服務包 1 (SP1)
移除資訊
你無法移除這個熱修正。
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。
注意本文為 Microsoft 支援單位內部直接建立的「快速發佈」文章。 此處包含的資訊是以其現況提供,用於回應新產生的問題。 由於快速發佈,資料可能包含拼字錯誤,並可能會隨時修訂,不另行通知。 請參閱使用條款以瞭解其他相關考量。