本文適用於葡萄牙語 () 語言地區的 Microsoft Dynamics NAV。
症狀
當您在葡萄牙版 Microsoft Dynamics NAV 2009 中,同時入帳包含發票與拒收帳單的現金收據日記帳時,所有已掛設的總帳分錄皆透過拒絕帳單帳戶入帳。 不過,應收帳款帳戶用於發票,拒絕帳單帳戶則應使用被拒單。 此問題發生於以下產品:
- Microsoft Dynamics NAV 2009 R2 的葡萄牙語版本
- Microsoft Dynamics NAV 2009 Service Pack 1 的葡萄牙語版本
解決方式
Hotfix 資訊
Microsoft 現在已經支援熱修補程式。 然而,這僅是為了修正本文所描述的問題。 只應用在遇到這個特定問題的系統上。 此熱修補可能會進行額外測試。 因此,如果您未受到此問題嚴重影響,我們建議您等待下一個 Microsoft Dynamics NAV 2009 服務包或包含此熱修補的 Microsoft Dynamics NAV 版本。
注意:在特殊情況下,若 Microsoft Dynamics 及相關產品的技術支援專業人員判斷特定更新能解決您的問題,通常因支援電話而產生的費用可能會被取消。 一般來說,如果有所描述之特定更新無法解決的其他支援問題,才會收取支援費用。
安裝資訊
Microsoft 僅提供圖例的程式設計範例,不含明示或暗示的擔保。 這包括 (但不限於) 適用于特定目的之可操作性或適用性的暗示擔保。 本文假設您熟悉正在示範的程式設計語言,以及用來建立和進行程式偵錯工具的工具。 Microsoft 支援工程師可以協助說明特定程式的功能。 不過,他們將不會修改這些範例以提供新增功能或建構符合您特定需求的程式。
注意:安裝此熱修補程式前,請確認所有 Microsoft Navision 用戶端使用者都已登出系統。 這包括Microsoft Navision 應用服務 (NAS) 用戶端使用者。 當你實施這個熱修補時,應該只有你一個登入的客戶端使用者。
要實作這個熱修補,你必須擁有開發者授權。
我們建議在 Windows 登入視窗或資料庫登入視窗中,將使用者帳號分配「SUPER」角色 ID。 若使用者帳號無法被指派「SUPER」角色 ID,您必須驗證該帳號擁有以下權限:
- 你要更改的物件的修改權限。
- 系統物件 ID 5210 的執行權限,以及系統物件 ID 9015 的執行權限。
注意:除非你必須進行資料修復,否則你不必擁有資料儲存的權利。
法規變更
注意:在將修正程式套用到生產電腦之前,務必在受控環境中測試修正。
為了解決這個問題,請更改 Gen. 的程式碼。 Jnl.-郵政線路代碼單元 (12) 。 若要這麼做,請按照下列步驟進行:
加入以下全域變數:
TempRejCustLedgEntry@1100047 : TEMPORARY Record 21;在 PostCust 函式中更改程式碼如下:
現行法規1... DiscRiskFactAmountLCY := 0; DiscUnriskFactAmountLCY := 0; CollFactAmountLCY := 0; //-------- IF Cust."No." <> "Account No." THEN Cust.GET("Account No."); Cust.CheckBlockedCustOnJnls(Cust,"Document Type",TRUE); IF "Posting Group" = '' THEN BEGIN ...替換代碼1
... DiscRiskFactAmountLCY := 0; DiscUnriskFactAmountLCY := 0; CollFactAmountLCY := 0; //-------- // Add the following lines. TempRejCustLedgEntry.RESET; TempRejCustLedgEntry.DELETEALL; // End of the lines. IF Cust."No." <> "Account No." THEN Cust.GET("Account No."); Cust.CheckBlockedCustOnJnls(Cust,"Document Type",TRUE); IF "Posting Group" = '' THEN BEGIN ...現有的第二號法規
... END; // Post the application ApplyCustLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine,GLSetup."Appln. Rounding Precision"); // Delete the following lines. IF GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::" " THEN GenJnlLine."Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreateReceivableDoc(GenJnlLine,CVLedgEntryBuf); CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; ...替換代碼2
... END; // Post the application ApplyCustLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine,GLSetup."Appln. Rounding Precision"); // Add the following lines. IF ("Applies-to ID" = '') AND ("Applies-to Doc. Type" = "Applies-to Doc. Type"::" ") THEN "Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreateReceivableDoc(GenJnlLine,CVLedgEntryBuf); CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; ...在 PostVend 函式中更改程式碼如下:
現有程式碼... // Post the application ApplyVendLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine, GLSetup."Appln. Rounding Precision"); // Delete the following lines. IF GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::" " THEN GenJnlLine."Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreatePayableDoc(GenJnlLine,CVLedgEntryBuf); VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; ...替換代碼
... // Post the application ApplyVendLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine, GLSetup."Appln. Rounding Precision"); // Add the following lines. IF ("Applies-to ID" = '') AND ("Applies-to Doc. Type" = "Applies-to Doc. Type"::" ") THEN "Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreatePayableDoc(GenJnlLine,CVLedgEntryBuf); VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; ...在 ApplyCustLedgEntry 函式中更改程式碼如下:
現有程式碼... OldCustLedgEntry."Document Situation"::"Closed Documents", OldCustLedgEntry."Document Situation"::"Closed BG/PO"]) THEN FromClosedDoc := TRUE ELSE FromClosedDoc := FALSE; DocPost.UpdateReceivableDoc( OldCustLedgEntry,GenJnlLine,AppliedAmountLCY + DeltaUnrealAmount + DeltaAmountLCY, DocAmountLCY,RejDocAmountLCY,DiscDocAmountLCY,CollDocAmountLCY, DiscRiskFactAmountLCY,DiscUnriskFactAmountLCY,CollFactAmountLCY); END; ...替換代碼
... OldCustLedgEntry."Document Situation"::"Closed Documents", OldCustLedgEntry."Document Situation"::"Closed BG/PO"]) THEN FromClosedDoc := TRUE ELSE FromClosedDoc := FALSE; // Add the following lines. IF OldCustLedgEntry."Document Status" = OldCustLedgEntry."Document Status"::Rejected THEN BEGIN TempRejCustLedgEntry := OldCustLedgEntry; TempRejCustLedgEntry."Remaining Amount (LCY) stats." := AppliedAmountLCY + DeltaUnrealAmount + DeltaAmountLCY; TempRejCustLedgEntry.INSERT; END; // End of the lines. DocPost.UpdateReceivableDoc( OldCustLedgEntry,GenJnlLine,AppliedAmountLCY + DeltaUnrealAmount + DeltaAmountLCY, DocAmountLCY,RejDocAmountLCY,DiscDocAmountLCY,CollDocAmountLCY, DiscRiskFactAmountLCY,DiscUnriskFactAmountLCY,CollFactAmountLCY); END; ...在 PostDtldCustLedgEntries 函式中更改程式碼如下:
現有程式碼... AccNo := CustPostingGr."Bills Account"; END ELSE BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; // Delete the following lines. IF DiscDocAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Discted. Bills Acc."); AccNo := CustPostingGr."Discted. Bills Acc."; END; IF CollDocAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Bills on Collection Acc."); AccNo := CustPostingGr."Bills on Collection Acc."; END; IF RejDocAmountLCY <> 0 THEN BEGIN CASE GenJnlLine."Applies-to Doc. Type" OF GenJnlLine."Applies-to Doc. Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); AccNo := CustPostingGr."Rejected Bills Acc."; END; GenJnlLine."Applies-to Doc. Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); AccNo := CustPostingGr."Rejected Factoring Acc."; END; ELSE IF (GenJnlLine."Document Type" IN [GenJnlLine."Document Type"::"Credit Memo",GenJnlLine."Document Type"::Payment]) AND (OldCVLedgEntryBuf4."Applies-to ID" <> '') THEN BEGIN CASE OldCVLedgEntryBuf4."Document Type" OF OldCVLedgEntryBuf4."Document Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; OldCVLedgEntryBuf4."Document Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; END; END; END; END; IF (DiscRiskFactAmountLCY <> 0) OR (DiscUnriskFactAmountLCY <> 0) THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Discount Acc."); AccNo := CustPostingGr."Factoring for Discount Acc."; END; IF CollFactAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Collection Acc."); AccNo := CustPostingGr."Factoring for Collection Acc."; END; // End of the lines. ReceivableAccAmtLCY := TotalAmountLCY - (DocAmountLCY + DiscDocAmountLCY + CollDocAmountLCY + RejDocAmountLCY + DiscRiskFactAmountLCY + ...替換代碼
... AccNo := CustPostingGr."Bills Account"; END ELSE BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; ReceivableAccAmtLCY := TotalAmountLCY - (DocAmountLCY + DiscDocAmountLCY + CollDocAmountLCY + RejDocAmountLCY + DiscRiskFactAmountLCY + ...在 PostReceivableDocs 函式中更改程式碼如下:
現有程式碼... GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; IF RejDocAmountLCY <> 0 THEN BEGIN // Delete the following lines. CASE GenJnlLine."Applies-to Doc. Type" OF GenJnlLine."Applies-to Doc. Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); InitGLEntry(CustPostingGr."Rejected Bills Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; GenJnlLine."Applies-to Doc. Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); InitGLEntry(CustPostingGr."Rejected Factoring Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; ELSE IF (GenJnlLine."Document Type" IN [GenJnlLine."Document Type"::"Credit Memo",GenJnlLine."Document Type"::Payment]) AND (OldCVLedgEntryBuf4."Applies-to ID" <> '') THEN BEGIN CASE OldCVLedgEntryBuf4."Document Type" OF OldCVLedgEntryBuf4."Document Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); InitGLEntry(CustPostingGr."Rejected Bills Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; OldCVLedgEntryBuf4."Document Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); InitGLEntry(CustPostingGr."Rejected Factoring Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE ); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; END; END; // End of the lines. END; END; IF DiscRiskFactAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Discount Acc."); InitGLEntry(CustPostingGr."Factoring for Discount Acc.", ...替換代碼
... GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; IF RejDocAmountLCY <> 0 THEN BEGIN // Add the following lines. WITH TempRejCustLedgEntry DO BEGIN RESET; SETCURRENTKEY("Customer No.","Document Type","Document Situation","Document Status"); SETRANGE("Document Type","Document Type"::Bill); CALCSUMS("Remaining Amount (LCY) stats."); IF "Remaining Amount (LCY) stats." <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); InitGLEntry( CustPostingGr."Rejected Bills Acc.","Remaining Amount (LCY) stats.", DocAmtCalcAddCurrency("Remaining Amount (LCY) stats."),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; SETRANGE("Document Type","Document Type"::Invoice); CALCSUMS("Remaining Amount (LCY) stats."); IF "Remaining Amount (LCY) stats." <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); InitGLEntry( CustPostingGr."Rejected Factoring Acc.","Remaining Amount (LCY) stats.", DocAmtCalcAddCurrency("Remaining Amount (LCY) stats."),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; // End of the lines. END; END; IF DiscRiskFactAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Discount Acc."); InitGLEntry(CustPostingGr."Factoring for Discount Acc.", ...
先決條件
您必須安裝以下其中一項產品才能套用此熱修補:
- Microsoft Dynamics NAV 2009 R2 的葡萄牙語版本
- Microsoft Dynamics NAV 2009 Service Pack 1 的葡萄牙語版本
移除資訊
你無法移除這個熱修正。
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。
注意本文為 Microsoft 支援單位內部直接建立的「快速發佈」文章。 此處包含的資訊是以其現況提供,用於回應新產生的問題。 由於快速發佈,資料可能包含拼字錯誤,並可能會隨時修訂,不另行通知。 請參閱使用條款以瞭解其他相關考量。