本文适用于适用于东欧 (ee) 语言区域设置的 Microsoft Dynamics NAV。
症状
假设在 Microsoft Dynamics NAV 2009 R2 的东欧版本中为付款或退款创建现金收据日记帐。 将现金收据日记帐作为预付款过帐。 在这种情况下,对应用的付款或退款运行 “未应用条目” 函数时,会收到以下错误消息:
注意
预付款必须在 Cust 中为 No。账本条目 No.='XXXX'。
解决方法
修补程序信息
Microsoft现在提供了受支持的修补程序。 但是,它仅用于更正本文中所述的问题。 仅将其应用于遇到此特定问题的系统。 此修补程序可能会收到其他测试。 因此,如果你没有受到此问题的严重影响,我们建议你等待下一个Microsoft Dynamics NAV 2009 Service Pack 或包含此修补程序的下一Microsoft Dynamics NAV 版本。
注意 在特殊情况下,如果 Microsoft Dynamics 和相关产品的技术支持专业人员确定特定更新将解决你的问题,则通常由支持呼叫产生的费用可能会被取消。 对于相关特定升级无法解决的其他支持问题和事项,将照常收取支持费用。
安装信息
Microsoft 的编程示例仅用于说明,不做任何明示或暗示的保证。 这包括但不限于特定用途的适销性或适用性的隐含保证。 本文假定你熟悉所演示的编程语言以及用于创建和调试过程的工具。 Microsoft 支持工程师可以帮助解释特定过程的功能,但他们不会修改这些示例以提供新增功能或构建步骤以满足你的特定需要。
注意 在安装此修补程序之前,请验证所有 Microsoft Navision 客户端用户是否已从系统注销。 这包括 Microsoft Navision Application Services (NAS) 客户端用户。 实现此修补程序时,应是唯一登录的客户端用户。
若要实现此修补程序,必须具有开发人员许可证。
建议为 Windows 登录窗口或数据库登录名窗口中的用户帐户分配“SUPER”角色 ID。 如果无法为用户帐户分配“SUPER”角色 ID,则必须验证该用户帐户是否具有以下权限:
- 要更改的 对象的“修改”权限。
- 系统对象 ID 5210 对象和系统对象 ID 9015 对象的 Execute 权限。
注意 除非必须执行数据修复,否则您不必拥有数据存储的权限。
代码更改
注意 在将修补程序应用到生产计算机之前,始终在受控环境中测试代码修复。
要解决此问题,请按照下列步骤操作:
更改 Gen 中的 UnapplyCustLedgEntry 函数中的代码。 Jnl.-Post Line codeunit (12) 如下所示:
现有代码 1... NextDtldLedgEntryEntryNo := DtldCustLedgEntry2."Entry No." + 1; DtldCustLedgEntry2.SETCURRENTKEY("Transaction No.","Customer No.","Entry Type"); IF GenJnlLine."Prepmt. Appl. Transaction No." <> 0 THEN DtldCustLedgEntry2.SETRANGE("Transaction No.",GenJnlLine."Prepmt. Appl. Transaction No.",DtldCustLedgEntry."Transaction No.") ELSE DtldCustLedgEntry2.SETRANGE("Transaction No.",DtldCustLedgEntry."Transaction No."); DtldCustLedgEntry2.SETRANGE("Customer No.",DtldCustLedgEntry."Customer No."); DtldCustLedgEntry2.SETRANGE("Entry Type",DtldCustLedgEntry."Entry Type"::Application); DtldCustLedgEntry2.FINDSET; ...替换代码 1
... NextDtldLedgEntryEntryNo := DtldCustLedgEntry2."Entry No." + 1; DtldCustLedgEntry2.SETCURRENTKEY("Transaction No.","Customer No.","Entry Type"); IF GenJnlLine."Prepmt. Appl. Transaction No." <> 0 THEN // Add the following line. IF GenJnlLine."Prepmt. Appl. Transaction No." < DtldCustLedgEntry."Transaction No." THEN DtldCustLedgEntry2.SETRANGE("Transaction No.",GenJnlLine."Prepmt. Appl. Transaction No.",DtldCustLedgEntry."Transaction No.") // Add the following lines. ELSE DtldCustLedgEntry2.SETRANGE("Transaction No.",DtldCustLedgEntry."Transaction No.",GenJnlLine."Prepmt. Appl. Transaction No.") // End of the lines. ELSE DtldCustLedgEntry2.SETRANGE("Transaction No.",DtldCustLedgEntry."Transaction No."); DtldCustLedgEntry2.SETRANGE("Customer No.",DtldCustLedgEntry."Customer No."); DtldCustLedgEntry2.SETRANGE("Entry Type",DtldCustLedgEntry."Entry Type"::Application); DtldCustLedgEntry2.FINDSET; ...现有代码 2
... IF DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::Application THEN PrepareAdvCustUnapply( DtldCustLedgEntry2."Cust. Ledger Entry No.",TempCustLedgEntryForAppln, UnapplyAdvVATEntries,ReverseAdvVATTransNo,ApplCustLedgEntryNo,CurrencyCode); ...替换代码 2
... IF DtldCustLedgEntry2."Entry Type" = DtldCustLedgEntry2."Entry Type"::Application THEN // Add the following line. IF GenJnlLine."Prepmt. Appl. Transaction No." <> 0 THEN PrepareAdvCustUnapply( DtldCustLedgEntry2."Cust. Ledger Entry No.",TempCustLedgEntryForAppln, UnapplyAdvVATEntries,ReverseAdvVATTransNo,ApplCustLedgEntryNo,CurrencyCode); ...现有代码 3
... NegativeLCYAppAmt := NegativeLCYAppAmt + DtldCVLedgEntryBuf."Amount (LCY)"; NegativeACYAppAmt := NegativeACYAppAmt + DtldCVLedgEntryBuf."Additional-Currency Amount"; END; IF GenJnlLine."Prepmt. Appl. Transaction No." = 0 THEN BEGIN CustLedgEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No."); IF DtldCVLedgEntryBuf.Advance AND (CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Payment) THEN SalesPostAdvances.InsertTempApplnAdvanceLink(DtldCVLedgEntryBuf."Entry No.") END; END; ...替换代码 3
... NegativeLCYAppAmt := NegativeLCYAppAmt + DtldCVLedgEntryBuf."Amount (LCY)"; NegativeACYAppAmt := NegativeACYAppAmt + DtldCVLedgEntryBuf."Additional-Currency Amount"; END; IF GenJnlLine."Prepmt. Appl. Transaction No." = 0 THEN BEGIN CustLedgEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No."); IF DtldCVLedgEntryBuf.Advance AND (CustLedgEntry."Document Type" = CustLedgEntry."Document Type"::Payment) THEN SalesPostAdvances.InsertTempApplnAdvanceLink(DtldCVLedgEntryBuf."Entry No.") END; END; ...更改 Gen 中的 AutoEntrForDtldCustLedgEntries 函数中的代码。 Jnl.-Post Line codeunit (12) 如下所示:
现有代码... CASE DtldCVLedgEntryBuf."Entry Type" OF DtldCVLedgEntryBuf."Entry Type"::"Initial Entry":; DtldCVLedgEntryBuf."Entry Type"::Application: IF MultiplePostingGrApplied THEN BEGIN InitGLEntry(AccNo,DtldCVLedgEntryBuf."Amount (LCY)",0,FALSE,TRUE); InsertGLEntry(TRUE); END; DtldCVLedgEntryBuf."Entry Type"::"Unrealized Loss": ...替换代码
... CASE DtldCVLedgEntryBuf."Entry Type" OF DtldCVLedgEntryBuf."Entry Type"::"Initial Entry":; DtldCVLedgEntryBuf."Entry Type"::Application: // Add the following line. BEGIN IF MultiplePostingGrApplied THEN BEGIN InitGLEntry(AccNo,DtldCVLedgEntryBuf."Amount (LCY)",0,FALSE,TRUE); InsertGLEntry(TRUE); // Add the following lines. END; SalesPostAdvances.InsertApplnAdvanceLink(DtldCVLedgEntryBuf); // EAST0001 // End of the lines. END; DtldCVLedgEntryBuf."Entry Type"::"Unrealized Loss": ...更改 Gen 中的 UnapplyVendLedgEntry 函数中的代码。 Jnl.-Post Line codeunit (12) 如下所示:
现有代码 1... DtldVendLedgEntry2.SETCURRENTKEY("Transaction No.","Vendor No.","Entry Type"); IF GenJnlLine."Prepmt. Appl. Transaction No." <> 0 THEN DtldVendLedgEntry2.SETRANGE( "Transaction No.",GenJnlLine."Prepmt. Appl. Transaction No.",DtldVendLedgEntry."Transaction No.") ELSE DtldVendLedgEntry2.SETRANGE("Transaction No.",DtldVendLedgEntry."Transaction No."); DtldVendLedgEntry2.SETRANGE("Vendor No.",DtldVendLedgEntry."Vendor No."); ...替换代码 1
... DtldVendLedgEntry2.SETCURRENTKEY("Transaction No.","Vendor No.","Entry Type"); IF GenJnlLine."Prepmt. Appl. Transaction No." <> 0 THEN // Add the following line. IF GenJnlLine."Prepmt. Appl. Transaction No." < DtldVendLedgEntry."Transaction No." THEN DtldVendLedgEntry2.SETRANGE( "Transaction No.",GenJnlLine."Prepmt. Appl. Transaction No.",DtldVendLedgEntry."Transaction No.") ELSE // Add the following lines. DtldVendLedgEntry2.SETRANGE( "Transaction No.", DtldVendLedgEntry."Transaction No.", GenJnlLine."Prepmt. Appl. Transaction No.") ELSE // End of the lines. DtldVendLedgEntry2.SETRANGE("Transaction No.",DtldVendLedgEntry."Transaction No."); DtldVendLedgEntry2.SETRANGE("Vendor No.",DtldVendLedgEntry."Vendor No."); ...现有代码 2
... IF DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::Application THEN PrepareAdvVendUnapply( DtldVendLedgEntry2."Vendor Ledger Entry No.",TempVendLedgEntryForAppln, UnapplyAdvVATEntries,ReverseAdvVATTransNo,ApplVendLedgEntryNo,CurrencyCode); UNTIL DtldVendLedgEntry2.NEXT = 0; ...替换代码 2
... IF DtldVendLedgEntry2."Entry Type" = DtldVendLedgEntry2."Entry Type"::Application THEN // Add the following line. IF GenJnlLine."Prepmt. Appl. Transaction No." <> 0 THEN PrepareAdvVendUnapply( DtldVendLedgEntry2."Vendor Ledger Entry No.",TempVendLedgEntryForAppln, UnapplyAdvVATEntries,ReverseAdvVATTransNo,ApplVendLedgEntryNo,CurrencyCode); UNTIL DtldVendLedgEntry2.NEXT = 0; ...现有代码 3
... NegativeACYAppAmt := NegativeACYAppAmt + DtldCVLedgEntryBuf."Additional-Currency Amount"; END; END; IF NOT SkipCollectAmount THEN IF NOT (DtldCVLedgEntryBuf."Entry Type" IN [ ...替换代码
... NegativeACYAppAmt := NegativeACYAppAmt + DtldCVLedgEntryBuf."Additional-Currency Amount"; END; // Add the following lines. IF GenJnlLine."Prepmt. Appl. Transaction No." = 0 THEN BEGIN VendLedgEntry.GET(DtldVendLedgEntry2."Vendor Ledger Entry No."); IF DtldCVLedgEntryBuf.Advance AND (VendLedgEntry."Document Type" = VendLedgEntry."Document Type"::Payment) THEN PurchPostAdvances.InsertTempApplnAdvanceLink(DtldCVLedgEntryBuf."Entry No.") END; // End of the lines. END; IF NOT SkipCollectAmount THEN IF NOT (DtldCVLedgEntryBuf."Entry Type" IN [ ...更改 Gen 中的 AutoEntrForDtldVendLedgEntries 函数中的代码。 Jnl.-Post Line codeunit (12) 如下所示:
现有代码... CASE DtldCVLedgEntryBuf."Entry Type" OF DtldCVLedgEntryBuf."Entry Type"::"Initial Entry":; DtldCVLedgEntryBuf."Entry Type"::Application: IF MultiplePostingGrApplied THEN BEGIN InitGLEntry(AccNo,DtldCVLedgEntryBuf."Amount (LCY)",0,FALSE,TRUE); InsertGLEntry(TRUE); END; DtldCVLedgEntryBuf."Entry Type"::"Unrealized Loss": ...替换代码
... CASE DtldCVLedgEntryBuf."Entry Type" OF DtldCVLedgEntryBuf."Entry Type"::"Initial Entry":; DtldCVLedgEntryBuf."Entry Type"::Application: // Add the following line. BEGIN IF MultiplePostingGrApplied THEN BEGIN InitGLEntry(AccNo,DtldCVLedgEntryBuf."Amount (LCY)",0,FALSE,TRUE); InsertGLEntry(TRUE); // Add the following lines. END; PurchPostAdvances.InsertApplnAdvanceLink(DtldCVLedgEntryBuf); // End of the lines. END; DtldCVLedgEntryBuf."Entry Type"::"Unrealized Loss": ...将 PostUnApplyCustomer 函数中的代码 CustEntry-Apply PostUnApplyCustomer 代码单元 (226) 更改,如下所示:
现有代码 1... DtldCustLedgEntry.LOCKTABLE; CustLedgEntry.LOCKTABLE; CustLedgEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No."); // Delete the following line. CustLedgEntry.TESTFIELD(Prepayment,FALSE); // EAST0001 CheckPostingDate(PostingDate,'',0); IF PostingDate < DtldCustLedgEntry2."Posting Date" THEN ERROR(Text003, ...替换代码 1
... DtldCustLedgEntry.LOCKTABLE; CustLedgEntry.LOCKTABLE; CustLedgEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No."); CheckPostingDate(PostingDate,'',0); IF PostingDate < DtldCustLedgEntry2."Posting Date" THEN ERROR(Text003, ...现有代码 2
... CustLedgEntry.TABLECAPTION, DtldCustLedgEntry."Cust. Ledger Entry No.", CustLedgEntry.FIELDCAPTION("Transaction No.")); // Delete the following line. DtldCustLedgEntry.TESTFIELD(Advance,FALSE); GetPrepmtApplTransNo(DtldCustLedgEntry."Cust. Ledger Entry No.",GenJnlLine."Prepmt. Appl. Transaction No."); END; UNTIL DtldCustLedgEntry.NEXT = 0; ...替换代码 2
... CustLedgEntry.TABLECAPTION, DtldCustLedgEntry."Cust. Ledger Entry No.", CustLedgEntry.FIELDCAPTION("Transaction No.")); // Add the following line. DtldCustLedgEntry.TESTFIELD(Advance,CustLedgEntry.Prepayment); GetPrepmtApplTransNo(DtldCustLedgEntry."Cust. Ledger Entry No.",GenJnlLine."Prepmt. Appl. Transaction No."); END; UNTIL DtldCustLedgEntry.NEXT = 0; ...更改 CustEntry-Apply Posted Entries codeunit (226) GetPrepmtApplTransNo 函数中的代码,如下所示:
现有代码... CustLedgEntry.GET(CustLedgEntryNo); // Delete the following lines. IF NOT CustLedgEntry.Prepayment AND (CustLedgEntry."Prepayment Type" = CustLedgEntry."Prepayment Type"::Advance) THEN BEGIN TransactionNo := CustLedgEntry."Transaction No." - 1; END; // End of the lines. ...替换代码
... CustLedgEntry.GET(CustLedgEntryNo); // Add the following lines. IF CustLedgEntry."Prepayment Type" = CustLedgEntry."Prepayment Type"::Advance THEN IF CustLedgEntry.Prepayment THEN BEGIN CustLedgEntry.SETCURRENTKEY("Transaction No."); CustLedgEntry.SETRANGE("Transaction No.",CustLedgEntry."Transaction No." + 1); IF CustLedgEntry.FINDFIRST THEN IF NOT CustLedgEntry.Prepayment AND (CustLedgEntry."Prepayment Type" = CustLedgEntry."Prepayment Type"::Advance) THEN TransactionNo := CustLedgEntry."Transaction No."; END ELSE TransactionNo := CustLedgEntry."Transaction No." - 1; // End of the lines. ...将 PostUnApplyVendor 函数中的代码 VendEntry-Apply PostUnApplyVendor 代码单元 (227) 更改,如下所示:
现有代码... DtldVendLedgEntry."Vendor Ledger Entry No.", VendLedgEntry.FIELDCAPTION("Transaction No.")); // Delete the following line. DtldVendLedgEntry.TESTFIELD(Advance,FALSE); GetPrepmtApplTransNo(DtldVendLedgEntry."Vendor Ledger Entry No.",GenJnlLine."Prepmt. Appl. Transaction No."); END; UNTIL DtldVendLedgEntry.NEXT = 0; ...替换代码
... DtldVendLedgEntry."Vendor Ledger Entry No.", VendLedgEntry.FIELDCAPTION("Transaction No.")); // Add the following line. DtldVendLedgEntry.TESTFIELD(Advance, VendLedgEntry.Prepayment); GetPrepmtApplTransNo(DtldVendLedgEntry."Vendor Ledger Entry No.",GenJnlLine."Prepmt. Appl. Transaction No."); END; UNTIL DtldVendLedgEntry.NEXT = 0; ...更改 VendEntry-Apply Posted Entries codeunit (227) GetPrepmtApplTransNo 函数中的代码,如下所示:
现有代码... // Delete the following lines. VendLedgEntry.GET(VendLedgEntryNo); IF NOT VendLedgEntry.Prepayment AND (VendLedgEntry."Prepayment Type" = VendLedgEntry."Prepayment Type"::Advance) THEN BEGIN TransactionNo := VendLedgEntry."Transaction No." - 1; END; // End of the lines. ...替换代码
... // Add the following lines. VendLedgEntry.GET(VendLedgEntryNo); IF VendLedgEntry."Prepayment Type" = VendLedgEntry."Prepayment Type"::Advance THEN IF VendLedgEntry.Prepayment THEN BEGIN VendLedgEntry.SETCURRENTKEY("Transaction No."); VendLedgEntry.SETRANGE("Transaction No.", VendLedgEntry."Transaction No." + 1); IF VendLedgEntry.FINDFIRST THEN IF NOT VendLedgEntry.Prepayment AND (VendLedgEntry."Prepayment Type" = VendLedgEntry."Prepayment Type"::Advance) THEN TransactionNo := VendLedgEntry."Transaction No."; END ELSE TransactionNo := VendLedgEntry."Transaction No." - 1; // End of the lines. ...在 Purchase-Post Advances codeunit (26586) 中添加一个新的全局变量,然后指定该变量,如下所示:
名称:TempAdvanceLink
DataType: Record
子类型: 高级链接
在 Purchase-Post Advances codeunit (26586) 中创建 InsertTempApлAdvanceLink 函数,如下所示:
PROCEDURE InsertTempApplnAdvanceLink@1470034(DtldEntryBufEntryNo@1470002 : Integer); BEGIN TempAdvanceLink.INIT; TempAdvanceLink."Entry No." := DtldEntryBufEntryNo; TempAdvanceLink.INSERT; END;在 Purchase-Post Advances codeunit (26586) 中创建 InsertApлAdvanceLink 函数,如下所示:
PROCEDURE InsertApplnAdvanceLink@140049(DtldCVLedgEntryBuf@1102601000 : Record 383); VAR AdvanceLink@1470001 : Record 26590; BEGIN WITH AdvanceLink DO BEGIN IF TempAdvanceLink.GET(DtldCVLedgEntryBuf."Entry No.") THEN BEGIN IF FINDLAST THEN NextLinkEntryNo := AdvanceLink."Entry No." + 1 ELSE NextLinkEntryNo := 1; INIT; "Entry No." := NextLinkEntryNo; "Entry Type" := "Entry Type"::Application; "Document No." := DtldCVLedgEntryBuf."Document No."; "CV Ledger Entry No." := DtldCVLedgEntryBuf."Cust. Ledger Entry No."; Amount := DtldCVLedgEntryBuf.Amount; "Amount (LCY)" := DtldCVLedgEntryBuf."Amount (LCY)"; INSERT; TempAdvanceLink.DELETE; END; END; END;
先决条件
必须安装 Microsoft Dynamics NAV 2009 R2 的东欧版本才能应用此修补程序。
删除信息
无法删除此修补程序。
详细信息
有关修补程序2543219的详细信息,请单击下面的序列号以查看Microsoft知识库中的文章:
2543219 无法在东欧版本的 Microsoft Dynamics NAV 2009 R2 中按预期处理高额预付款
状态
Microsoft 已确认在 "适用于" 部分中所列的 Microsoft 产品中存在问题。
注意这是一篇由 Microsoft 支持组织直接创建的“快速发布”文章。 本文所包含的信息是按原样提供的,以应对新出现的问题。 由于发布速度较快,这些材料可能包含印刷错误,无需通知即可随时修改。 有关其他注意事项,请参阅使用条款。