错误中提醒如果提醒费用科目设置与在 Microsoft Dynamics 导航 2009 年增值税的总金额

重要说明:本文是由 Microsoft 机器翻译软件进行的翻译并可能由 Microsoft 社区通过社区翻译机构(CTF)技术进行后期编辑,或可能是由人工进行的翻译。Microsoft 同时向您提供机器翻译、人工翻译及社区后期编辑的文章,以便对我们知识库中的所有文章以多种语言提供访问。翻译的文章可能存在词汇、句法和/或语法方面的错误。Microsoft 对由于内容的误译或客户对内容的使用所导致的任何不准确、错误或损失不承担责任。

点击这里察看该文章的英文版: 3009492
症状
在提醒的总金额有误如果提醒费用科目设置与在 Microsoft Dynamics 导航 2009 年的增值税 (VAT)。这种情况下,虽然未注册提醒费用和客户是欧盟客户。按照中的步骤代码更改 若要解决此问题的部分。下列产品中发生此问题:
  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics 导航 2009 SP1
解决方案

修补程序信息

受支持的修补程序现已从 Microsoft 推出。然而,它仅用于纠正本文中描述的问题。它仅应用于正经历此特定问题的系统。此修补程序可能会接受进一步的测试。因此,如果这个问题没有对您造成严重的影响,我们建议您等待下一个 Microsoft Dynamics 导航 2009 服务包 或包含此修复程序的下一步的 Microsoft Dynamics 导航版本。

注意:在特殊情况下,可免收的支持电话,可免收如果技术支持专业人员对 Microsoft Dynamics 和相关的产品的费用确定某个特定的更新能够解决您的问题。通常的支持费用将应用于其他支持问题和事项,不需要进行专门更新。

安装信息

Microsoft 提供的编程示例仅用于说明,没有任何明示或暗示的担保。这包括但不限于适销性或特定用途适用性的暗示担保。本文假定您熟悉所演示的编程语言和用于创建和调试过程的工具。Microsoft 的支持工程师可以帮助解释某个特定过程的功能。但是,他们不会修改这些示例以提供额外的功能或构建过程以满足您的特定要求。

注意:安装此修复程序之前,请验证所有 Microsoft Dynamics 导航客户端用户都注销系统。这包括 Microsoft Dynamics 导航应用程序服务器 (NAS) 服务。要实现此修补程序时,在登录的唯一客户端用户。

若要实现此修补程序,必须使用开发人员许可证。

我们建议在 Windows 登录窗口或数据库登录窗口中的用户帐户将分配该"超级"角色 id。如果不能将用户帐户分配成"超级"角色 ID,则必须验证用户帐户具有下列权限:
  • 您将更改该对象的修改权限。
  • 系统对象 ID ™ 5210对象和系统对象 ID 9015对象的 Execute 权限。
注意:您不需要具有对数据存储区的权限,除非您需要执行数据修复。

代码更改

注意:始终测试代码修复在受控环境中应用之前与您的生产计算机的修补程序。

若要解决此问题,请执行以下步骤:
  1. 更改提醒统计窗体 (437) 中的属性中的代码,如下所示:
    现有代码
    ... CALCFIELDS("Interest Amount","VAT Amount");                         ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount";                         CustPostingGr.GET("Customer Posting Group");                         VATInterest := 0;                         IF ReminderLevel.GET("Reminder Terms Code","Reminder Level") THEN// Delete the following lines.IF ReminderLevel."Calculate Interest" THEN BEGINGLAcc.GET(CustPostingGr."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";END; IF GLAcc.GET(CustPostingGr."Additional Fee Account") THENVATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); Interest := (ReminderTotal - "Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/100 + 1))/(VATInterest/100 + 1); VatAmount := Interest * VATInterest/100 +"Additional Fee" * VATPostingSetup."VAT %"/100; // End of the deleted lines.                   IF Cust.GET("Customer No.") THEN                           Cust.CALCFIELDS("Balance (LCY)")                         ELSE                           CLEAR(Cust);                         IF Cust."Credit Limit (LCY)" = 0 THEN...
    替换代码
    ... CALCFIELDS("Interest Amount","VAT Amount");                         ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount";                         CustPostingGr.GET("Customer Posting Group");                         VATInterest := 0;                         IF ReminderLevel.GET("Reminder Terms Code","Reminder Level") THEN// Add the following lines.IF ReminderLevel."Calculate Interest" AND ("VAT Amount" <> 0) THEN BEGINGLAcc.GET(CustPostingGr."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";IF GLAcc.GET(CustPostingGr."Additional Fee Account") THENVATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");Interest :=(ReminderTotal -"Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/ 100 + 1)) /(VATInterest / 100 + 1);VatAmount := Interest * VATInterest / 100 + "Additional Fee" * VATPostingSetup."VAT %" / 100;END ELSEInterest := "Interest Amount";// End of the added lines.                         IF Cust.GET("Customer No.") THEN                           Cust.CALCFIELDS("Balance (LCY)")                         ELSE                           CLEAR(Cust);                         IF Cust."Credit Limit (LCY)" = 0 THEN...
  2. 更改提醒统计窗体 (441) 中的属性中的代码,如下所示:
    现有代码
    ...BEGIN                         SETRANGE("No.");                         CALCFIELDS("Interest Amount","VAT Amount");                         ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount";                         CustPostingGr.GET("Customer Posting Group");// Delete the following lines.ReminderLevel.GET("Reminder Terms Code","Reminder Level");IF ReminderLevel."Calculate Interest" THEN BEGINGLAcc.GET(CustPostingGr."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %";END ELSEVATInterest := 0;IF GLAcc.GET(CustPostingGr."Additional Fee Account") THENVATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); Interest := (ReminderTotal - "Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/100 + 1))/(VATInterest/100 + 1); VatAmount := Interest * VATInterest/100 +"Additional Fee" * VATPostingSetup."VAT %"/100; // End of the deleted lines.                        IF Cust.GET("Customer No.") THEN                           Cust.CALCFIELDS("Balance (LCY)")                         ELSE                           CLEAR(Cust);                         IF Cust."Credit Limit (LCY)" = 0 THEN...
    替换代码
    ...BEGIN                         SETRANGE("No.");                         CALCFIELDS("Interest Amount","VAT Amount");                         ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount";                         CustPostingGr.GET("Customer Posting Group");// Add the following lines.IF ReminderLevel.GET("Reminder Terms Code","Reminder Level") THENIF ReminderLevel."Calculate Interest" AND ("VAT Amount" <> 0) THEN BEGINGLAcc.GET(CustPostingGr."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";IF GLAcc.GET(CustPostingGr."Additional Fee Account") THENVATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");Interest :=(ReminderTotal -"Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/ 100 + 1)) /(VATInterest / 100 + 1);VatAmount := Interest * VATInterest / 100 + "Additional Fee" * VATPostingSetup."VAT %" / 100;END ELSEInterest := "Interest Amount";// End of the added lines.                         IF Cust.GET("Customer No.") THEN                           Cust.CALCFIELDS("Balance (LCY)")                         ELSE                           CLEAR(Cust);                         IF Cust."Credit Limit (LCY)" = 0 THEN...
  3. 更改提醒统计报表 (117) 中数据项目号 1 中的代码,如下所示:
    现有代码
    ...IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN                               VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");                               AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100);                             END ELSE                               AddFeeInclVAT := "Additional Fee";// Delete the following lines.CALCFIELDS("Interest Amount");IF "Interest Amount" <> 0 THEN BEGINGLAcc.GET(CustPostingGroup."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";END ELSEVATInterest := 0;// End of the deleted lines.                               IF ISSERVICETIER THEN BEGIN                               NNC_InterestAmountTotal := 0;                               NNC_RemainingAmountTotal := 0;                               NNC_VATAmountTotal := 0;...
    替换代码
    ...  IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN                               VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");                               AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100);                             END ELSE                               AddFeeInclVAT := "Additional Fee";// Add the following lines.CALCFIELDS("Interest Amount","VAT Amount");IF ("Interest Amount" <> 0) AND ("VAT Amount" <> 0) THEN BEGINGLAcc.GET(CustPostingGroup."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";Interest:=(ReminderInterestAmount +"VAT Amount" +"Issued Reminder Header"."Additional Fee" - AddFeeInclVAT) / (VATInterest / 100 + 1);END ELSE BEGINInterest:= "Interest Amount";VATInterest := 0;END;// End of the added lines.                               IF ISSERVICETIER THEN BEGIN                               NNC_InterestAmountTotal := 0;                               NNC_RemainingAmountTotal := 0;                               NNC_VATAmountTotal := 0;...
  4. 更改提醒统计报表 (117) 中数据项目数 4 节中的代码,如下所示:
    现有代码 1
    ...}            CONTROLS            {              { 45  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           CaptionML=ENU=Interest Amount;// Delete the following line.SourceExpr=(ReminderInterestAmount + "VAT Amount" +"Issued Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100 +1);// End of the deleted line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ }              { 47  ;Label        ;6090 ;0    ;4200 ;423  ;ParentControl=45;                                                           FontSize=9;...
    替换代码 1
    ...}            CONTROLS            {              { 45  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           CaptionML=ENU=Interest Amount;// Add the following line.SourceExpr=Interest;// End of the added line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ }              { 47  ;Label        ;6090 ;0    ;4200 ;423  ;ParentControl=45;                                                           FontSize=9;...
    现有代码 2
    ...CONTROLS            {              { 44  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           FontBold=Yes;                                                           CaptionML=ENU=Total;// Delete the following line.SourceExpr="Remaining Amount" + ReminderInterestAmount + "VAT Amount"-(ReminderInterestAmount + "VAT Amount" +"Issued Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100+1)*VATInterest/100 + "Issued Reminder Header"."Additional Fee" - AddFeeInclVAT;// End of the deleted line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT }              { 56  ;TextBox      ;6090 ;0    ;4200 ;423  ;FontSize=9;                                                           FontBold=Yes;...
    替换代码 2
    ... CONTROLS            {              { 44  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           FontBold=Yes;                                                           CaptionML=ENU=Total;// Add the following line.SourceExpr="Remaining Amount" + ReminderInterestAmount;// End of the added line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT }              { 56  ;TextBox      ;6090 ;0    ;4200 ;423  ;FontSize=9;                                                           FontBold=Yes;...
  5. 更改中提醒统计报告 (122) 的数据项号 1 中的代码,如下所示:
    现有代码
    ...IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN                               VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");                               AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100);                             END ELSE                               AddFeeInclVAT := "Additional Fee";// Delete the following lines.CALCFIELDS("Interest Amount");IF "Interest Amount" <> 0 THEN BEGINGLAcc.GET(CustPostingGroup."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";END ELSEVATInterest := 0;                             // End of the deleted lines.IF ISSERVICETIER THEN BEGIN                               NNC_Interest := 0;                               NNC_TotalLCY := 0;                               NNC_VATAmount := 0;                               NNC_TotalLCYVATAmount := 0;...
    替换代码
    ...IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN                               VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");                               AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100);                             END ELSE                               AddFeeInclVAT := "Additional Fee";// Add the following lines.CALCFIELDS("Interest Amount","VAT Amount");IF ("Interest Amount" <> 0) AND ("VAT Amount" <> 0) THEN BEGINGLAcc.GET(CustPostingGroup."Interest Account");VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group");VATInterest := VATPostingSetup."VAT %";Interest:=(ReminderInterestAmount +"VAT Amount" +"Reminder Header"."Additional Fee" - AddFeeInclVAT) / (VATInterest / 100 + 1);END ELSE BEGINInterest:= "Interest Amount";VATInterest := 0;END;IF VATInterest <> 0 THEN// End of the added lines.                             IF ISSERVICETIER THEN BEGIN                               NNC_Interest := 0;                               NNC_TotalLCY := 0;                               NNC_VATAmount := 0;                               NNC_TotalLCYVATAmount := 0;...
  6. 更改提醒统计报表 (122) 中的数据项目号 2 中的代码,如下所示:
    现有代码
    ... }      { PROPERTIES        {          DataItemIndent=1;          DataItemTable=Table2000000026;// Delete the following line.DataItemTableView=SORTING(Number) WHERE(Number=CONST(1));// End of the deleted line.          DataItemVarName=PageCounter;        }        SECTIONS        {          { PROPERTIES...
    替换代码
    ...}      { PROPERTIES        {          DataItemIndent=1;          DataItemTable=Table2000000026;// Add the following lines.DataItemTableView=SORTING(Number)WHERE(Number=CONST(1));// End of the added lines.          DataItemVarName=PageCounter;        }        SECTIONS        {          { PROPERTIES...
  7. 更改提醒统计报表 (122) 中的数据项目编号 3 中的代码,如下所示:
    现有代码
    ...}      { PROPERTIES        {          DataItemIndent=2;          DataItemTable=Table2000000026;// Delete the following line.DataItemTableView=SORTING(Number) WHERE(Number=FILTER(1..));// End of the deleted line.          DataItemVarName=DimensionLoop;          OnPreDataItem=BEGIN                          IF NOT ShowDim THEN                            CurrReport.BREAK;                          DocDim.SETRANGE("Table ID",DATABASE::"Reminder Header");...
    替换代码
    ...}      { PROPERTIES        {          DataItemIndent=2;          DataItemTable=Table2000000026;// Add the following lines.DataItemTableView=SORTING(Number)WHERE(Number=FILTER(1..));// End of the added lines.          DataItemVarName=DimensionLoop;          OnPreDataItem=BEGIN                          IF NOT ShowDim THEN                            CurrReport.BREAK;                          DocDim.SETRANGE("Table ID",DATABASE::"Reminder Header");...
  8. 更改提醒统计报表 (122) 中的数据项目数 5 中的代码,如下所示:
    现有代码
    ... }      { PROPERTIES        {          DataItemIndent=2;          DataItemTable=Table296;// Delete the following line.DataItemTableView=SORTING(Reminder No.,Line No.) WHERE(Line Type=FILTER(<>Not Due));// End of the deleted line.          OnPreDataItem=BEGIN                          IF ISSERVICETIER THEN                            TotalVATAmount := 0;                            IF FIND('+') THEN BEGIN...
    替换代码
    ...}      { PROPERTIES        {          DataItemIndent=2;          DataItemTable=Table296;// Add the following lines.DataItemTableView=SORTING(Reminder No.,Line No.)WHERE(Line Type=FILTER(<>Not Due));// End of the added lines.          OnPreDataItem=BEGIN                          IF ISSERVICETIER THEN                            TotalVATAmount := 0;                            IF FIND('+') THEN BEGIN...
  9. 更改提醒统计报告 (122) 数据项目数 5 节中的代码,如下所示:
    现有代码 1
    ...   }            CONTROLS            {              { 17  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           CaptionML=ENU=Interest Amount;// Delete the following line.SourceExpr=(ReminderInterestAmount + "VAT Amount" +"Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100 +1);// End of the deleted line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ }              { 20  ;Label        ;6090 ;0    ;4200 ;423  ;ParentControl=17;                                                           FontSize=9;...
    替换代码 1
    ... }            CONTROLS            {              { 17  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           CaptionML=ENU=Interest Amount;// Add the following line.SourceExpr=Interest;// End of the added line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ }              { 20  ;Label        ;6090 ;0    ;4200 ;423  ;ParentControl=17;                                                           FontSize=9;...
    现有代码 2
    ...}            CONTROLS            {              { 29  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           FontBold=Yes;// Delete the following line.SourceExpr="Remaining Amount" + ReminderInterestAmount + "VAT Amount"-(ReminderInterestAmount + "VAT Amount" +"Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100+1)*VATInterest/100 + "Reminder Header"."Additional Fee" - AddFeeInclVAT;// End of the deleted line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Reminder_Header___Additional_Fee____AddFeeInclVAT }              { 43  ;TextBox      ;6090 ;0    ;4200 ;423  ;FontSize=9;                                                           FontBold=Yes;...
    替换代码 2
    ...}            CONTROLS            {              { 29  ;TextBox      ;10710;0    ;2520 ;423  ;FontSize=9;                                                           FontBold=Yes;// Add the following line.SourceExpr="Remaining Amount" + ReminderInterestAmount;// End of the added line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader;                                                           DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Reminder_Header___Additional_Fee____AddFeeInclVAT }              { 43  ;TextBox      ;6090 ;0    ;4200 ;423  ;FontSize=9;                                                           FontBold=Yes;...

系统必备组件

您必须具有要应用此修补程序的安装以下产品之一:
  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics 导航 2009 SP1

删除信息

您不能删除此修补程序。
状态
Microsoft 已经确认这是"适用于"一节中列出的 Microsoft 产品中的问题。
注意:这是直接从创建 Microsoft 支持部门内的"快速发布"的文章。此处包含的信息是作为为了响应新出现的问题而提供的。由于以使其可用的速度,而材料可能包含印刷错误,恕不另行通知,随时可能进行修订。请参见 使用的条款 对于其他考虑事项。

警告:本文已自动翻译

属性

文章 ID:3009492 - 上次审阅时间:08/06/2015 08:00:00 - 修订版本: 2.0

Microsoft Dynamics NAV 2009

  • kbqfe kbmbsmigrate kbmbscodefix kbsurveynew kbmt KB3009492 KbMtzh
反馈