应用对象
Dynamics NAV 2009

"供应商陈述"报告显示不正确的总金额发票的付款应用时其中付款折扣被扣除的 Microsoft Dynamics 导航 2009 年葡萄牙文版。作为总余额显示付款折扣金额。按照在代码更改部分,若要解决此问题的步骤。在下列产品中发生此问题︰

  • 葡萄牙语版本的 Microsoft Dynamics 导航 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执行权限对象。

注意:您不需要具有对数据存储区的权限,除非您需要执行数据修复。

代码更改

注始终测试代码修补程序在受控环境中之前将修补程序应用到生产计算机。在应用之前更改,请导入 SEPA 的所有更新。若要解决此问题,请执行以下步骤:

  1. 更改中供应商的帐单报表 (13377) 的数据项号 1 中的代码,如下所示︰现有代码 1

    ...   Currency2.INSERT;                            UNTIL Currency.NEXT = 0;                        END;// Delete the following line.OnAfterGetRecord=BEGIN// End of the deleted line.                             CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");                             PrintLine := FALSE;                             Vend2 := Vendor;                             COPYFILTER("Currency Filter",Currency2.Code);...

    替换代码 1

    ... Currency2.INSERT;                            UNTIL Currency.NEXT = 0;                        END;// Add the following lines.OnAfterGetRecord=VARVendLedgEntry@1000 : Record 25;BEGIN// End of the added lines.                             CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");                             PrintLine := FALSE;                             Vend2 := Vendor;                             COPYFILTER("Currency Filter",Currency2.Code);...

    现有代码 2

    ...PrintLine := Vend2."Net Change" <> 0;                                 UNTIL (Currency2.NEXT = 0) OR PrintLine;                             END;                             IF (NOT PrintLine) AND PrintAllHavingEntry THEN BEGIN// Delete the following lines."Vendor Ledger Entry".RESET;"Vendor Ledger Entry".SETCURRENTKEY("Vendor No.","Posting Date");"Vendor Ledger Entry".SETRANGE("Vendor No.",Vendor."No.");"Vendor Ledger Entry".SETRANGE("Posting Date",StartDate,EndDate);Vendor.COPYFILTER("Currency Filter","Vendor Ledger Entry"."Currency Code");PrintLine := "Vendor Ledger Entry".FIND('-');// End of the deleted lines.                             END;                             IF NOT PrintLine THEN                               CurrReport.SKIP;...

    替换代码 2

    ... PrintLine := Vend2."Net Change" <> 0;                                 UNTIL (Currency2.NEXT = 0) OR PrintLine;                             END;                             IF (NOT PrintLine) AND PrintAllHavingEntry THEN BEGIN// Add the following lines.VendLedgEntry.SETCURRENTKEY("Vendor No.","Posting Date");VendLedgEntry.SETRANGE("Vendor No.",Vendor."No.");VendLedgEntry.SETRANGE("Posting Date",StartDate,EndDate);Vendor.COPYFILTER("Currency Filter",VendLedgEntry."Currency Code");PrintLine := NOT VendLedgEntry.ISEMPTY;// End of the added lines.                             END;                             IF NOT PrintLine THEN                               CurrReport.SKIP;...
  2. 更改供应商帐单报表 (13377) 中的数据项目数 4 中的代码,如下所示︰现有代码 1

    ... }      { PROPERTIES        {          DataItemIndent=3;// Delete the following lines.DataItemTable=Table25;DataItemTableView=SORTING(Vendor No.,Posting Date);OnPreDataItem=BEGINSETRANGE("Posting Date",StartDate,EndDate);SETRANGE("Currency Code",Currency2.Code);CurrReport.CREATETOTALS("Remaining Amount");// End of the deleted lines.                          IF Currency2.Code = '' THEN BEGIN                            GLSetup.TESTFIELD("LCY Code");                            CurrencyCode3 := GLSetup."LCY Code"                          END ELSE...

    替换代码 1

    ...  }      { PROPERTIES        {          DataItemIndent=3;// Add the following lines.DataItemTable=Table2000000026;DataItemTableView=SORTING(Number)WHERE(Number=CONST(1));DataItemVarName=VendLedEntryHdr;PrintOnlyIfDetail=Yes;}SECTIONS{}}{ PROPERTIES{DataItemIndent=4;DataItemTable=Table380;DataItemTableView=SORTING(Vendor No.,Posting Date,Entry Type,Currency Code)WHERE(Excluded from calculation=CONST(No),Entry Type=FILTER(<>Application&<>Redrawal));DataItemVarName=DtldVendLedgEntry;PrintOnlyIfDetail=No;OnPreDataItem=BEGINSETRANGE("Vendor No.",Vendor."No.");SETRANGE("Posting Date",StartDate,EndDate);SETRANGE("Currency Code",Currency2.Code);// End of the added lines.                         IF Currency2.Code = '' THEN BEGIN                            GLSetup.TESTFIELD("LCY Code");                            CurrencyCode3 := GLSetup."LCY Code"                          END ELSE...

    现有代码 2

    ...END ELSE                            CurrencyCode3 := Currency2.Code                        END;// Delete the following lines.OnAfterGetRecord=BEGIN// PT0002.begin// VendBalance := VendBalance + "Remaining Amount";VendBalance := VendBalance + "Original Amount";// PT0002.end// End of the deleted lines.                           END;          DataItemLinkReference=Vendor;          DataItemLink=Vendor No.=FIELD(No.);...

    替换代码 2

    ... END ELSE                            CurrencyCode3 := Currency2.Code                        END;// Add the following lines.OnAfterGetRecord=VARVendLedgEntry@1000 : Record 25;DtldVendLedgEntry1@1001 : Record 380;BEGINRemainingAmount := 0;PrintLine := TRUE;CASE "Entry Type" OF"Entry Type"::"Initial Entry":BEGINVendLedgEntry.GET("Vendor Ledger Entry No.");Description := VendLedgEntry.Description;DueDate := VendLedgEntry."Due Date";VendLedgEntry.SETRANGE("Date Filter",0D, EndDate);VendLedgEntry.CALCFIELDS("Remaining Amount");RemainingAmount := VendLedgEntry."Remaining Amount";END;"Entry Type"::"Payment Discount","Entry Type"::"Payment Discount (VAT Excl.)","Entry Type"::"Payment Discount (VAT Adjustment)","Entry Type"::"Payment Discount Tolerance","Entry Type"::"Payment Discount Tolerance (VAT Excl.)","Entry Type"::"Payment Discount Tolerance (VAT Adjustment)":BEGINDescription := Text006;DueDate := 0D;END;"Entry Type"::"Payment Tolerance","Entry Type"::"Payment Tolerance (VAT Excl.)","Entry Type"::"Payment Tolerance (VAT Adjustment)":BEGINDescription := Text014;DueDate := 0D;END;"Entry Type"::"Appln. Rounding","Entry Type"::"Correction of Remaining Amount":BEGINDescription := Text007;DueDate := 0D;END; END;IF PrintLine THENVendBalance := VendBalance + Amount;// End of the added lines.                           END;          DataItemLinkReference=Vendor;          DataItemLink=Vendor No.=FIELD(No.);...
  3. 更改数据项目数 4 节中供应商的帐单报表 (13377) 中的代码,如下所示︰现有代码 1

    ... DataSetFieldName=Vendor_Ledger_Entry_Description }              { 47  ;TextBox      ;7980 ;0    ;1680 ;423  ;HorzAlign=Left;                                                           FontSize=9;                                                           CaptionML=ENU=Due Date;// Delete the following lines.SourceExpr=FORMAT("Due Date",0,4);DataSetFieldName=Vendor_Ledger_Entry__Due_Date_ }{ 48  ;TextBox      ;13230;0    ;2310 ;423  ;FontSize=9;CaptionML=ENU=Remaining Amount;SourceExpr="Remaining Amount";// End of the deleted lines.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=Vendor_Ledger_Entry__Remaining_Amount_ }              { 49  ;TextBox      ;15750;0    ;2310 ;423  ;FontSize=9;...

    替换代码 1

    ...  DataSetFieldName=Vendor_Ledger_Entry_Description }              { 47  ;TextBox      ;7980 ;0    ;1680 ;423  ;HorzAlign=Left;                                                           FontSize=9;                                                           CaptionML=ENU=Due Date;// Add the following lines.SourceExpr=FORMAT(DueDate,0,4);DataSetFieldName=Vendor_Ledger_Entry__Due_Date_ }{ 48  ;TextBox      ;13230;0    ;2310 ;423  ;FontSize=9;CaptionML=ENU=Remaining Amount;SourceExpr=RemainingAmount;// End of the added lines.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=Vendor_Ledger_Entry__Remaining_Amount_ }              { 49  ;TextBox      ;15750;0    ;2310 ;423  ;FontSize=9;...

    现有代码 2

    ...AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=VendBalance_Control49 }              { 54  ;TextBox      ;10710;0    ;2310 ;423  ;FontSize=9;// Delete the following line.SourceExpr="Original Amount";// End of the deleted line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=Vendor_Ledger_Entry__Original_Amount_ }              { 78  ;TextBox      ;9870 ;0    ;840  ;423  ;FontSize=9;...

    替换代码 2

    ...   AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=VendBalance_Control49 }              { 54  ;TextBox      ;10710;0    ;2310 ;423  ;FontSize=9;// Add the following line.SourceExpr=Amount;// End of the added line.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=Vendor_Ledger_Entry__Original_Amount_ }              { 78  ;TextBox      ;9870 ;0    ;840  ;423  ;FontSize=9;...
  4. 更改供应商帐单报表 (13377) 中的数据项目数 5 中的代码,如下所示︰现有代码

    ...END;          OnAfterGetRecord=BEGIN                             IF ISSERVICETIER THEN// Delete the following lines.VendBalance2 := VendBalance2 + "Remaining Amount"ELSEVendBalance := VendBalance + "Remaining Amount";// End of the deleted lines.                           END;          DataItemLinkReference=Vendor;          DataItemLink=Vendor No.=FIELD(No.);...

    替换代码

    ... END;          OnAfterGetRecord=BEGIN                             IF ISSERVICETIER THEN// Add the following lines.VendBalance2 := VendBalance2 + RemainingAmountELSEVendBalance := VendBalance + RemainingAmount;// End of the added lines.                           END;          DataItemLinkReference=Vendor;          DataItemLink=Vendor No.=FIELD(No.);...
  5. 更改数据项目数 5 节中供应商的帐单报表 (13377) 中的代码,如下所示︰现有代码

    ...SourceExpr=Description;                                                           DataSetFieldName=VendorLedgEntry2_Description }              { 60  ;TextBox      ;7980 ;0    ;1680 ;423  ;HorzAlign=Left;                                                           FontSize=9;// Delete the following lines.SourceExpr=FORMAT("Due Date",0,4);DataSetFieldName=VendorLedgEntry2__Due_Date_ }{ 61  ;TextBox      ;13230;0    ;2310 ;423  ;FontSize=9;SourceExpr="Remaining Amount";// End of the deleted lines.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=VendorLedgEntry2__Remaining_Amount_ }              { 62  ;TextBox      ;15750;0    ;2310 ;423  ;FontSize=9;...

    替换代码

    ...  SourceExpr=Description;                                                           DataSetFieldName=VendorLedgEntry2_Description }              { 60  ;TextBox      ;7980 ;0    ;1680 ;423  ;HorzAlign=Left;                                                           FontSize=9;// Add the following lines.SourceExpr=FORMAT(DueDate,0,4);DataSetFieldName=VendorLedgEntry2__Due_Date_ }{ 61  ;TextBox      ;13230;0    ;2310 ;423  ;FontSize=9;SourceExpr=RemainingAmount;// End of the added lines.                                                           AutoFormatType=1;                                                           AutoFormatExpr="Currency Code";                                                           DataSetFieldName=VendorLedgEntry2__Remaining_Amount_ }              { 62  ;TextBox      ;15750;0    ;2310 ;423  ;FontSize=9;...
  6. 更改供应商的帐单报表 (13377) 中的全局变量中的代码,如下所示︰现有代码 1

    ...Text000@1000 : TextConst 'ENU=Page %1';        Text001@1001 : TextConst 'ENU=Open Entries %1';        Text002@1002 : TextConst 'ENU=Overdue Entries %1';        Text003@1003 : TextConst 'ENU="Statement "';        GLSetup@1004 : Record 98;        CompanyInfo@1005 : Record 79;        Vend2@1006 : Record 23;        Currency@1007 : Record 4;...

    替换代码 1

    ...Text000@1000 : TextConst 'ENU=Page %1';        Text001@1001 : TextConst 'ENU=Open Entries %1';        Text002@1002 : TextConst 'ENU=Overdue Entries %1';        Text003@1003 : TextConst 'ENU="Statement "';// Add the following lines.Text005@1030 : TextConst 'ENU=Multicurrency Application';Text006@1031 : TextConst 'ENU=Payment Discount';Text007@1032 : TextConst 'ENU=Rounding';Text014@1033 : TextConst 'ENU=Application Writeoffs';// End of the added lines.        GLSetup@1004 : Record 98;        CompanyInfo@1005 : Record 79;        Vend2@1006 : Record 23;        Currency@1007 : Record 4;...

    现有代码 2

    ...PrintAllHavingEntry@1010 : Boolean;        PrintAllHavingBal@1011 : Boolean;        PrintEntriesDue@1012 : Boolean;        PrintLine@1013 : Boolean;        StartDate@1014 : Date;        EndDate@1015 : Date;        VendAddr@1016 : ARRAY [8] OF Text[50];        CompanyAddr@1017 : ARRAY [8] OF Text[50];...

    替换代码 2

    ...PrintAllHavingEntry@1010 : Boolean;        PrintAllHavingBal@1011 : Boolean;        PrintEntriesDue@1012 : Boolean;        PrintLine@1013 : Boolean;// Add the following line.DueDate@1038 : Date;// End of the added line.        StartDate@1014 : Date;        EndDate@1015 : Date;        VendAddr@1016 : ARRAY [8] OF Text[50];        CompanyAddr@1017 : ARRAY [8] OF Text[50];...

    现有代码 3

    ...StartDate@1014 : Date;        EndDate@1015 : Date;        VendAddr@1016 : ARRAY [8] OF Text[50];        CompanyAddr@1017 : ARRAY [8] OF Text[50];        StartBalance@1018 : Decimal;        VendBalance@1019 : Decimal;        FormatAddr@1020 : Codeunit 365;        CurrencyCode3@1022 : Code[10];...

    替换代码 3

    ...StartDate@1014 : Date;        EndDate@1015 : Date;        VendAddr@1016 : ARRAY [8] OF Text[50];        CompanyAddr@1017 : ARRAY [8] OF Text[50];// Add the following lines.Description@1039 : Text[50];RemainingAmount@1040 : Decimal;// End of the added lines.        StartBalance@1018 : Decimal;        VendBalance@1019 : Decimal;        FormatAddr@1020 : Codeunit 365;        CurrencyCode3@1022 : Code[10];...

    现有代码 4

    ... </ReportItems>                      </TableCell>                    </TableCells>                    <Visibility>// Delete the following line.<Hidden>=IIF(Fields!Vendor_Ledger_Entry_Vendor_No_.Value = "",TRUE,FALSE)</Hidden>// End of the deleted line.                    </Visibility>                  </TableRow>                </TableRows>              </Details>...

    替换代码 4

    ...</ReportItems>                      </TableCell>                    </TableCells>                    <Visibility>// Add the following line.<Hidden>=IIF(Fields!DtldVendLedgEntry_Vendor_No_.Value = "",TRUE,FALSE)</Hidden>// End of the added line.                    </Visibility>                  </TableRow>                </TableRows>              </Details>...

    现有代码 5

    ...<FontWeight>700</FontWeight>                                  <TextAlign>Right</TextAlign>                                  <VerticalAlign>Middle</VerticalAlign>                                </Style>// Delete the following line.<Value>=iif(Last(Fields!Vendor_Ledger_Entry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control66Caption.Value),// End of the deleted line.  Last(Fields!VendBalance_Control53Caption.Value))</Value>                              </Textbox>                            </ReportItems>                          </TableCell>...

    替换代码 5

    ...<FontWeight>700</FontWeight>                                  <TextAlign>Right</TextAlign>                                  <VerticalAlign>Middle</VerticalAlign>                                </Style>// Add the following line.<Value>=iif(Last(Fields!DtldVendLedgEntry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control66Caption.Value),// End of the added line.  Last(Fields!VendBalance_Control53Caption.Value))</Value>                              </Textbox>                            </ReportItems>                          </TableCell>...

    现有代码 6

    ...<FontWeight>700</FontWeight>                                  <TextAlign>Right</TextAlign>                                  <VerticalAlign>Middle</VerticalAlign>                                </Style>// Delete the following line.<Value>=iif(Last(Fields!Vendor_Ledger_Entry_Vendor_No_.Value) = "" ,Last(Fields!CurrencyCode3_Control73.Value),// End of the deleted line.  Last(Fields!CurrencyCode3.Value))</Value>                              </Textbox>                            </ReportItems>                          </TableCell>...

    替换代码 6

    ... <FontWeight>700</FontWeight>                                  <TextAlign>Right</TextAlign>                                  <VerticalAlign>Middle</VerticalAlign>                                </Style>// Add the following line.<Value>=iif(Last(Fields!DtldVendLedgEntry_Vendor_No_.Value) = "" ,Last(Fields!CurrencyCode3_Control73.Value),// End of the added line.  Last(Fields!CurrencyCode3.Value))</Value>                              </Textbox>                            </ReportItems>                          </TableCell>...

    现有代码 7

    ...FontWeight>700</FontWeight>                                  <Format>=Fields!VendBalance_Control49Format.Value</Format>                                  <VerticalAlign>Middle</VerticalAlign>                                </Style>// Delete the following line.<Value>=iif(Last(Fields!Vendor_Ledger_Entry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control56.Value),// End of the deleted line.  LAST(Fields!VendBalance.Value))</Value>                              </Textbox>                            </ReportItems>                          </TableCell>...

    替换代码 7

    ...<FontWeight>700</FontWeight>                                  <Format>=Fields!VendBalance_Control49Format.Value</Format>                                  <VerticalAlign>Middle</VerticalAlign>                                </Style>// Add the following line.<Value>=iif(Last(Fields!DtldVendLedgEntry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control56.Value),// End of the added line.  LAST(Fields!VendBalance.Value))</Value>                              </Textbox>                            </ReportItems>                          </TableCell>...

    现有代码 8

    ...</Field>          <Field Name="CurrencyCode3">            <DataField>CurrencyCode3</DataField>          </Field>// Delete the following lines.<Field Name="Vendor_Ledger_Entry_Entry_No_"><DataField>Vendor_Ledger_Entry_Entry_No_</DataField></Field><Field Name="Vendor_Ledger_Entry_Vendor_No_"><DataField>Vendor_Ledger_Entry_Vendor_No_</DataField>// End of the deleted lines.          </Field>          <Field Name="STRSUBSTNO_Text002_Currency2_Code_">            <DataField>STRSUBSTNO_Text002_Currency2_Code_</DataField>          </Field>...

    替换代码 8

    ...</Field>          <Field Name="CurrencyCode3">            <DataField>CurrencyCode3</DataField>          </Field>// Add the following lines.<Field Name="DtldVendLedgEntry_Entry_No_"><DataField>DtldVendLedgEntry_Entry_No_</DataField></Field><Field Name="DtldVendLedgEntry_Vendor_No_"><DataField>DtldVendLedgEntry_Vendor_No_</DataField>// End of the added lines.          </Field>          <Field Name="STRSUBSTNO_Text002_Currency2_Code_">            <DataField>STRSUBSTNO_Text002_Currency2_Code_</DataField>          </Field>...

系统必备组件

您必须具有要应用此修补程序的安装以下产品之一︰

  • 葡萄牙语版本的 Microsoft Dynamics 导航 2009 R2

  • 葡萄牙语版本的 Microsoft Dynamics 导航 2009 SP1

删除信息

您不能删除此修补程序。

状态

Microsoft 已经确认这是“适用于”一节中列出的 Microsoft 产品中的问题。

注意:这是直接从创建 Microsoft 支持部门内的"快速发布"的文章。此处包含的信息是作为为了响应新出现的问题而提供的。由于以使其可用的速度,而材料可能包含印刷错误,恕不另行通知,随时可能进行修订。其他考虑因素,请参阅使用条款

需要更多帮助?

需要更多选项?

了解订阅权益、浏览培训课程、了解如何保护设备等。