狀況
當您安裝KB2705249之後,您可以使用做為 「 帳單寄送-以/賣出-地增值稅 calc"值,在 [一般分類帳 (GL) 的 [設定] 對話方塊中的"賣出-來進行購買-來回否 」 時,購買交易不能正確處理。請依照下列程式碼變更一節,若要解決這個問題的步驟。下列產品中,就會發生這個問題︰
-
Microsoft 動態航行點 2009 R2
-
Microsoft 動態航行點 2009 SP1
解決方案
Hotfix 資訊
已經可以從 Microsoft 取得支援的 hotfix。不過,它只被用來修正本文所述的問題。它只適用於發生此特定問題的系統上。此 hotfix 可能會接受其他測試。因此,如果此問題不會嚴重影響,我們建議您等候下一步的 Microsoft 動態航行點 2009 service pack 或包含此 hotfix 的下一個 Microsoft 動態航行點版本。注意 在特殊的情況下,通常會支援呼叫可能已被取消如果技術支援專業人員的 Microsoft 動態及相關的產品所產生的費用會決定某特定更新程式可以解決您的問題。收取支援費用會套用,如果有其他支援問題是,不能限定的特定更新程式。
安裝資訊
Microsoft 會提供程式設計範例僅供說明,而不做任何明示或默示的保證。這包括,但不限於適售性或適合某特定用途之默示擔保責任。本文假設您已相當熟悉使用的我們所示範的程式設計語言以及建立和偵錯程序所使用的工具。Microsoft 技術支援工程師可以協助解釋特定程序的功能。不過,它們不會修改這些範例以提供附加功能或建構程序來滿足您特定需求。注意套用此 hotfix 之前,請確認所有的 Microsoft 動態航行點用戶端使用者會登出系統。這包括 Microsoft 動態航行點應用程式伺服器 (NAS) 服務。您應該是唯一的用戶端使用者已登入,當您實作此 hotfix。若要實作此 hotfix,您必須有開發人員授權。我們建議您在 Windows 登入] 視窗中的色彩,或資料庫登入] 視窗中的使用者帳戶被指派 「 進階 」 的角色識別碼。如果使用者帳戶不能指派為 「 超級 」 的角色識別碼,您必須確認使用者帳戶具有下列權限︰
-
您將會變更物件的 [修改] 權限。
-
執行權限的系統物件 ID 5210物件和系統物件 ID 9015物件。
注意您沒有擁有資料存放區的權限,除非您需要執行資料修復。
程式碼變更
注意永遠測試程式碼修正在受控制的環境中才能套用到實際執行電腦的修正程式。若要解決這個問題,請依照下列步驟執行:
-
變更銷售標頭表格 (36) 中的欄位中的程式碼如下所示︰現有的程式碼 1
..."Bill-to Country/Region Code" := Cust."Country/Region Code";// Delete the following line."VAT Country/Region Code" := Cust."Country/Region Code";// End of the deleted line.IF NOT SkipBillToContact THEN...
取代程式碼 1
... "Bill-to Country/Region Code" := Cust."Country/Region Code"; IF NOT SkipBillToContact THEN...
現有的程式碼 2
...// Delete the following line."Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group";// End of the deleted line.GLSetup.GET;...
取代程式碼 2
...GLSetup.GET;...
現有的程式碼 3
...GLSetup.GET;// 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// End of the deleted line."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";...
取代程式碼 3
...GLSetup.GET;// 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// End of the added line."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";...
現有的程式碼 4
..."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";"Customer Posting Group" := Cust."Customer Posting Group";...
取代程式碼 4
..."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";// Add the following lines."VAT Country/Region Code" := Cust."Country/Region Code";"VAT Registration No." := Cust."VAT Registration No.";"Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group";END;// End of the added lines."Customer Posting Group" := Cust."Customer Posting Group";...
現有的程式碼 5
...Reserve := Cust.Reserve;// Delete the following line. "VAT Registration No." := Cust."VAT Registration No."; // End of the deleted line.IF "Document Type" = "Document Type"::Order THEN...
取代程式碼 5
...Reserve := Cust.Reserve;IF "Document Type" = "Document Type"::Order THEN...
-
變更購買的標頭資料表 (38) 中的欄位中的程式碼如下所示︰現有的程式碼 1
..."Pay-to County" := Vend.County;// Delete the following lines."Pay-to Country/Region Code" := Vend."Country/Region Code";"VAT Country/Region Code" := Vend."Country/Region Code";// End of the deleted lines.IF NOT SkipPayToContact THEN...
取代程式碼 1
..."Pay-to County" := Vend.County;IF NOT SkipPayToContact THEN...
現有的程式碼 2
... "Vendor Posting Group" := Vend."Vendor Posting Group";// Delete the following line."Gen. Bus. Posting Group" := Vend."Gen. Bus. Posting Group";// End of the deleted line.GLSetup.GET;...
取代程式碼 2
..."Vendor Posting Group" := Vend."Vendor Posting Group";GLSetup.GET;...
現有的程式碼 3
...GLSetup.GET;// 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// End of the deleted line."VAT Bus. Posting Group" := Vend."VAT Bus. Posting Group";...
取代程式碼 3
...GLSetup.GET;// 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// End of the added line."VAT Bus. Posting Group" := Vend."VAT Bus. Posting Group";...
現有的程式碼 4
..."VAT Bus. Posting Group" := Vend."VAT Bus. Posting Group";"Prices Including VAT" := Vend."Prices Including VAT";...
取代程式碼 4
... "VAT Bus. Posting Group" := Vend."VAT Bus. Posting Group";// Add the following lines."VAT Country/Region Code" := Vend."Country/Region Code";"VAT Registration No." := Vend."VAT Registration No.";"Gen. Bus. Posting Group" := Vend."Gen. Bus. Posting Group"; END;// End of the added lines."Prices Including VAT" := Vend."Prices Including VAT";...
現有的程式碼 5
...VALIDATE("Currency Code");// Delete the following line."VAT Registration No." := Vend."VAT Registration No.";// End of the deleted line.IF "Document Type" = "Document Type"::Order THEN...取代程式碼 5
...VALIDATE("Currency Code");IF "Document Type" = "Document Type"::Order THEN... -
變更服務標頭表格 (5900) 中的欄位中的程式碼如下所示︰現有的程式碼 1
... "Bill-to County" := Cust.County;// Delete the following line."Bill-to Country/Region Code" := Cust."Country/Region Code";// End of the deleted line.IF NOT SkipBillToContact THEN...
取代程式碼 1
..."Bill-to County" := Cust.County;IF NOT SkipBillToContact THEN...
現有的程式碼 2
... // Delete the following line."Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group";// End of the deleted line. GLSetup.GET;...
取代程式碼 2
...GLSetup.GET;...
現有的程式碼 3
...GLSetup.GET;// 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// End of the deleted line."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";...
取代程式碼 3
...GLSetup.GET;// 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// End of the added line."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";...
現有的程式碼 4
..."VAT Bus. Posting Group" := Cust."VAT Bus. Posting Group";"Customer Posting Group" := Cust."Customer Posting Group";...
取代程式碼 4
... "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";"Gen. Bus. Posting Group" := Cust."Gen. Bus. Posting Group";END;// End of the added lines."Customer Posting Group" := Cust."Customer Posting Group";...
現有的程式碼 5
... Reserve := Cust.Reserve;// Delete the following line."VAT Registration No." := Cust."VAT Registration No.";// End of the deleted line.ValidateServPriceGrOnServItem;...
取代程式碼 5
...Reserve := Cust.Reserve;ValidateServPriceGrOnServItem;...
-
變更程式碼中的InsertVAT函式在 Gen.Jnl。-張貼行 Codeunit (12),如下所示︰
現有的程式碼
...VATEntry."Bill-to/Pay-to No." := "Bill-to/Pay-to No.";// Delete the following lines.IF "Bill-to/Pay-to No." <> '' THENCASE VATEntry.Type OFVATEntry.Type::Purchase:BEGINIF Vend."No." <> "Bill-to/Pay-to No." THENVend.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:BEGINIF Cust."No." <> "Bill-to/Pay-to No." THENCust.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."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....
-
變更程式碼中的CopyFields函式在 Gen.Jnl。-張貼批次 Codeunit (13),如下所示︰現有的程式碼 1
... GenJnlLine7."Ship-to/Order Address Code" := GenJnlLine4."Ship-to/Order Address Code"; GenJnlLine7.MODIFY;...
取代程式碼 1
...GenJnlLine7."Ship-to/Order Address Code" := GenJnlLine4."Ship-to/Order Address Code";// Add the following lines.GenJnlLine7."VAT Registration No." := GenJnlLine4."VAT Registration No.";GenJnlLine7."Country/Region Code" := GenJnlLine4."Country/Region Code";// End of the added lines.GenJnlLine7.MODIFY;...
現有的程式碼 2
... GenJnlLine7."Ship-to/Order Address Code" := GenJnlLine4."Ship-to/Order Address Code"; GenJnlLine7.MODIFY;...
取代程式碼 2
...GenJnlLine7."Ship-to/Order Address Code" := GenJnlLine4."Ship-to/Order Address Code";// Add the following lines.GenJnlLine7."VAT Registration No." := GenJnlLine4."VAT Registration No.";GenJnlLine7."Country/Region Code" := GenJnlLine4."Country/Region Code";// End of the added lines.GenJnlLine7.MODIFY;...
先決條件
您必須具備套用此 hotfix 之後安裝下列產品的其中一個︰
-
Microsoft 動態航行點 2009 R2
-
Microsoft 動態航行點 2009 SP1
移除資訊
您無法移除此 hotfix。
狀態
Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。
注意這是直接從 Microsoft 支援組織內建立的「快速發行」文件。本文件所包含的現狀資訊是針對新興問題的回應。為縮短使其可用的時程,資料可能會包含印刷錯誤,且可能會隨時進行修改而不另行通知。如其他考量,請參閱 「使用規定」。