付款金额和未结付款金额混合,显示在供应商逾期付款报表的“付款超出法定限制”部分, (10748) 在西班牙语版本的 Microsoft Dynamics NAV 中不正确

应用对象
Dynamics NAV 2009 Microsoft Dynamics NAV 5.0

本文适用于西班牙 (es) 区域的 Microsoft Dynamics NAV。

症状

假设你在 Microsoft Dynamics NAV 的西班牙语版本中有两个供应商帐单。 你过帐一个帐单的付款。 在这种情况下,运行供应商逾期付款报告 (10748) 时,供应商的付款金额和未结付款金额混合,并错误地显示在“付款超出法律限制 (LYC) ”部分。 
以下产品中会出现此问题:

  • Microsoft Dynamics NAV 2009 R2 的西班牙语版本
  • Microsoft Dynamics NAV 2009 Service Pack 1 的西班牙语版本
  • Microsoft Dynamics NAV 5.0 Service Pack 1 的西班牙语版本

      

解决方法

修补程序信息

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 权限。

                
注意 除非必须执行数据修复,否则您不必拥有数据存储的权限。

代码更改

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

  1. 将供应商 - 逾期付款报告中的数据项编号 1 中的代码 (10748) 更改,如下所示:
    现有代码 1

    ...
    }
    { PROPERTIES
    {
    SectionType=GroupFooter;
    SectionWidth=17850;
    
    // Delete the following line.
    SectionHeight=2538;
    
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT(VendTotalAmount <> 0);
    END;
    }
    ...
    

    替换代码 1

    ...
    }
    { PROPERTIES
    {
    SectionType=GroupFooter;
    SectionWidth=17850;
    
    // Add the following line.
    SectionHeight=2961;
    
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT(VendTotalAmount <> 0);
    END;
    }
    ...
    

    现有代码 2

    ...
    DataSetFieldName=Vend_WeightedExceededAmount }
    { 1170000000;TextBox;13800;0 ;450 ;423 ;Visible=No;
    ForeColor=65535;
    SourceExpr=[VendWeightedExceededAmount ];
    DataSetFieldName=WeightedExceededAmount1 }
    }
    }
    { PROPERTIES
    {
    SectionType=Footer;
    ...
    

    替换代码 2

    ...
    DataSetFieldName=Vend_WeightedExceededAmount }
    { 1170000000;TextBox;13800;0 ;450 ;423 ;Visible=No;
    ForeColor=65535;
    SourceExpr=[VendWeightedExceededAmount ];
    DataSetFieldName=WeightedExceededAmount1 }
    
    // Add the following lines.
    { 1000000000;Label ;5250 ;2115 ;4950 ;423 ;ParentControl=1000000001;
    DataSetFieldName=ABS_OpenTotalPaymentOutsideDueDate_Caption }
    { 1000000001;TextBox;10350;2115 ;1800 ;423 ;CaptionML=[ENU=Open Payments outside the legal limit (LCY);
    ESP=Pagos fuera del l¡mite legal (DL):];
    SourceExpr=ABS(OpenVendPaymentOutsideDueDate);
    DataSetFieldName=OpenVend_PaymentOutsideDueDate }
    { 1000000004;TextBox;12600;2115 ;1800 ;423 ;SourceExpr=FormatRatio(OpenVendPaymentOutsideDueDate,VendTotalAmount);
    DataSetFieldName=OpenVend_PaymentOutsideDueDateRatio }
    // End of the lines.
    
    }
    }
    { PROPERTIES
    {
    SectionType=Footer;
    ...
    

    现有代码 3

    ...
    }
    { PROPERTIES
    {
    SectionType=Footer;
    SectionWidth=17850;
    
    // Delete the following line.
    SectionHeight=2115;
    
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT(TotalAmount <> 0);
    END;
    }
    ...
    

    替换代码 3

    ...
    }
    { PROPERTIES
    {
    SectionType=Footer;
    SectionWidth=17850;
    
    // Add the following line.
    SectionHeight=2538;
    
    OnPreSection=BEGIN
    CurrReport.SHOWOUTPUT(TotalAmount <> 0);
    END;
    }
    ...
    

    现有代码 4

    ...
    DataSetFieldName=Total_PaymentOutsideDueDateRatio }
    { 1100057;TextBox ;10350;846 ;1800 ;423 ;CaptionML=[ENU=Weighted average term exceeded:;
    ESP=Plazo medio ponderado superado:];
    SourceExpr=TotalWeightedExceededAmount / ABS(TotalAmount);
    DataSetFieldName=Total_WeightedExceededAmount }
    }
    }
    }
    }
    { PROPERTIES
    ...
    

    替换代码 4

    ...
    DataSetFieldName=Total_PaymentOutsideDueDateRatio }
    { 1100057;TextBox ;10350;846 ;1800 ;423 ;CaptionML=[ENU=Weighted average term exceeded:;
    ESP=Plazo medio ponderado superado:];
    SourceExpr=TotalWeightedExceededAmount / ABS(TotalAmount);
    DataSetFieldName=Total_WeightedExceededAmount }
    
    // Add the following lines.
    { 1000000002;Label ;5250 ;2115 ;4950 ;423 ;ParentControl=1000000003;
    DataSetFieldName=ABS_OpenTotalPaymentOutsideDueDate__Control1100045Caption }
    { 1000000003;TextBox;10350;2115 ;1800 ;423 ;CaptionML=[ENU=Open Payments outside the legal limit (LCY);
    ESP=Pagos fuera del l¡mite legal (DL):];
    SourceExpr=ABS(TotalOpenPaymentOutsideDueDate);
    DataSetFieldName=OpenTotal_PaymentOutsideDueDate }
    { 1000000005;TextBox;12600;2115 ;1800 ;423 ;SourceExpr=FormatRatio(TotalOpenPaymentOutsideDueDate,TotalAmount);
    DataSetFieldName=OpenTotal_PaymentOutsideDueDateRatio }
    // End of the lines.
    
    }
    }
    }
    }
    { PROPERTIES
    ...
    
  2. (10748) 更改供应商 - 逾期付款报表数据项编号 3 中的代码,如下所示:
    现有代码 1

    ...
    IF AppldVendLedgEntryTmp.NEXT = 0 THEN
    CurrReport.BREAK;
    IF AppldVendLedgEntryTmp."Posting Date" > AppldVendLedgEntryTmp."Initial Entry Due Date" THEN BEGIN
    DaysOverdue := AppldVendLedgEntryTmp."Posting Date" - AppldVendLedgEntryTmp."Initial Entry Due Date";
    
    // Delete the following lines.
    VendPaymentOutsideDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    TotalPaymentOutsideDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    // End of the lines.
    
    END ELSE BEGIN
    DaysOverdue := 0;
    VendPaymentWithinDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    TotalPaymentWithinDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    END;
    ...
    

    替换代码 1

    ...
    IF AppldVendLedgEntryTmp.NEXT = 0 THEN
    CurrReport.BREAK;
    IF AppldVendLedgEntryTmp."Posting Date" > AppldVendLedgEntryTmp."Initial Entry Due Date" THEN BEGIN
    DaysOverdue := AppldVendLedgEntryTmp."Posting Date" - AppldVendLedgEntryTmp."Initial Entry Due Date";
    
    // Add the following lines.
    IF AppldVendLedgEntryTmp."Applied Vend. Ledger Entry No." = 0 THEN BEGIN 
    OpenVendPaymentOutsideDueDate += AppldVendLedgEntryTmp."Amount (LCY)"; 
    TotalOpenPaymentOutsideDueDate += AppldVendLedgEntryTmp."Amount (LCY)"; 
    END ELSE BEGIN 
    VendPaymentOutsideDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    TotalPaymentOutsideDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    END; 
    // End of the lines.
    
    END ELSE BEGIN
    DaysOverdue := 0;
    VendPaymentWithinDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    TotalPaymentWithinDueDate += AppldVendLedgEntryTmp."Amount (LCY)";
    END;
    ...
    

    现有代码 2

    ...
    IF AppldVendLedgEntryTmp."Entry Type" = AppldVendLedgEntryTmp."Entry Type"::"Initial Entry" THEN
    AppldVendLedgEntryTmp."Posting Date" := 0D;
    VendDaysOverdue += DaysOverdue;
    VendWeightedExceededAmount += DaysOverdue * ABS(AppldVendLedgEntryTmp."Amount (LCY)");
    
    // Delete the following lines.
    VendTotalAmount := VendPaymentOutsideDueDate + VendPaymentWithinDueDate;
    TotalDaysOverdue += DaysOverdue;
    TotalWeightedExceededAmount += DaysOverdue * ABS(AppldVendLedgEntryTmp."Amount (LCY)");
    TotalAmount := TotalPaymentOutsideDueDate + TotalPaymentWithinDueDate;
    // End of the lines.
    
    END;
    }
    SECTIONS
    {
    ...
    

    替换代码 2

    ...
    IF AppldVendLedgEntryTmp."Entry Type" = AppldVendLedgEntryTmp."Entry Type"::"Initial Entry" THEN
    AppldVendLedgEntryTmp."Posting Date" := 0D;
    VendDaysOverdue += DaysOverdue;
    VendWeightedExceededAmount += DaysOverdue * ABS(AppldVendLedgEntryTmp."Amount (LCY)");
    
    // Add the following lines.
    VendTotalAmount := VendPaymentOutsideDueDate + VendPaymentWithinDueDate + OpenVendPaymentOutsideDueDate; 
    TotalDaysOverdue += DaysOverdue;
    TotalWeightedExceededAmount += DaysOverdue * ABS(AppldVendLedgEntryTmp."Amount (LCY)");
    TotalAmount := TotalPaymentOutsideDueDate + TotalPaymentWithinDueDate+TotalOpenPaymentOutsideDueDate; 
    // End of the lines.
    
    END;
    }
    SECTIONS
    {
    ...
    
  3. (10748) 更改供应商中的全局变量 - 逾期付款报告中的代码,如下所示:
    现有代码

    ...
    VendPaymentWithinDueDate@1100016 : Decimal;
    VendDaysOverdue@1100017 : Decimal;
    TotalDaysOverdue@1100018 : Decimal;
    TotalWeightedExceededAmount@1100019 : Decimal;
    ShowPayments@1100012 : 'Overdue,Legally Overdue,All';
    LOCAL PROCEDURE FindAppliedPayments@1210013(VendLedgEntryNo@1210000 : Integer);
    VAR
    DtldVendLedgEntry@1210001 : Record 380;
    InvVendLedgEntry@1100000 : Record 25;
    ...
    

    替换代码

    ...
    VendPaymentWithinDueDate@1100016 : Decimal;
    VendDaysOverdue@1100017 : Decimal;
    TotalDaysOverdue@1100018 : Decimal;
    TotalWeightedExceededAmount@1100019 : Decimal;
    ShowPayments@1100012 : 'Overdue,Legally Overdue,All';
    
    // Add the following lines.
    OpenVendPaymentOutsideDueDate@1000000000 : Decimal;
    TotalOpenPaymentOutsideDueDate@1000000001 : Decimal;
    // End of the lines.
    
    LOCAL PROCEDURE FindAppliedPayments@1210013(VendLedgEntryNo@1210000 : Integer);
    VAR
    DtldVendLedgEntry@1210001 : Record 380;
    InvVendLedgEntry@1100000 : Record 25;
    ...
    
  4. (10748) 更改供应商 - 逾期付款报表中的 ClearVendAmount 函数中的代码,如下所示:
    现有代码

    ...
    VendTotalAmount := 0;
    VendDaysOverdue := 0;
    VendWeightedExceededAmount := 0;
    VendPaymentOutsideDueDate := 0;
    VendPaymentWithinDueDate := 0;
    END;
    BEGIN
    END.
    }
    ...
    

    替换代码

    ...
    VendTotalAmount := 0;
    VendDaysOverdue := 0;
    VendWeightedExceededAmount := 0;
    VendPaymentOutsideDueDate := 0;
    VendPaymentWithinDueDate := 0;
    
    // Add the following line.
    OpenVendPaymentOutsideDueDate := 0;
    
    END;
    BEGIN
    END.
    }
    ...
    

            
          

先决条件

必须安装以下产品之一才能应用此修补程序:

  • Microsoft Dynamics NAV 2009 R2 的西班牙语版本
  • Microsoft Dynamics NAV 2009 Service Pack 1 的西班牙语版本
  • Microsoft Dynamics NAV 5.0 Service Pack 1 的西班牙语版本

删除信息

无法删除此修补程序。

状态

Microsoft 已确认在 "适用于" 部分中所列的 Microsoft 产品中存在问题。

注意这是一篇由 Microsoft 支持组织直接创建的“快速发布”文章。 本文所包含的信息是按原样提供的,以应对新出现的问题。 由于发布速度较快,这些材料可能包含印刷错误,无需通知即可随时修改。 有关其他注意事项,请参阅使用条款