结果在仓库卡报表 (16785) 和 (16702) 希腊版 Microsoft Dynamics NAV 中的试用余额报表中不同

应用对象
Dynamics NAV 2009 Service Pack 1 Microsoft Dynamics NAV 5.0 Service Pack 1

本文适用于希腊语 (gr) 语言区域设置的 Microsoft Dynamics NAV。

症状

如果在 Microsoft Dynamics NAV 的希腊版本中单击以同时选中“自动成本过帐检查”框和“预期成本过帐检查”框,则不会反转由预期成本金额创建的错误总帐条目。 因此,试验余额报表 (16702) 的结果与仓库卡报表 (16785) 的结果不同。 
以下产品中会出现此问题:

  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1 的希腊版本)
  • Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1 的希腊版本)

原因

出现此问题的原因是,项成本在总帐条目中计算了两次。 成本按预期成本计算一次,成本计算为另一次实际成本。

解决方法

修补程序信息

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. 将 Inventory 过帐中的 BufferInvtPosting 函数中的代码更改为 G/L 代码单元 (5802) ,如下所示:
    现有代码

    ...
    // Dionisis Calculate Cost Differently for Manufacturing Entries.
    IF "Expected Cost" THEN BEGIN
    CalcCostToPost(
    ValueEntry,ExpCostToPost,CostExpected,"Expected Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
    "Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
    "Posted Cost Component 5");
    CalcCostToPost(
    ValueEntry,ExpCostToPostACY,"Cost Amount (Expected) (ACY)","Exp. Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
    PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
    END ELSE BEGIN
    CalcCostToPost(
    ValueEntry,CostToPost,CostActual,"Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
    "Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
    "Posted Cost Component 5");
    CalcCostToPost(
    ValueEntry,CostToPostACY,"Cost Amount (Actual) (ACY)","Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
    PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
    END;
    ...
    

    替换代码

    ...
    // Dionisis Calculate Cost Differently for Manufacturing Entries.
    
    //Add the following lines.
    // IF "Expected Cost" THEN BEGIN
    IF "Expected Cost" OR InvtSetup."Expected Cost Posting to G/L" THEN BEGIN
    //End of the lines.
    
    CalcCostToPost(
    ValueEntry,ExpCostToPost,CostExpected,"Expected Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
    "Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
    "Posted Cost Component 5");
    CalcCostToPost(
    ValueEntry,ExpCostToPostACY,"Cost Amount (Expected) (ACY)","Exp. Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
    PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
    
    //Add the following lines.
    // END ELSE BEGIN
    END;
    IF NOT "Expected Cost" THEN BEGIN
    //End of the lines.
    
    CalcCostToPost(
    ValueEntry,CostToPost,CostActual,"Cost Posted to G/L",PostToGL,"Expected Cost",FALSE,
    "Posted Cost Component 1","Posted Cost Component 2","Posted Cost Component 3","Posted Cost Component 4",
    "Posted Cost Component 5");
    CalcCostToPost(
    ValueEntry,CostToPostACY,"Cost Amount (Actual) (ACY)","Cost Posted to G/L (ACY)",PostToGL,"Expected Cost",TRUE,
    PostedCost1ACY,PostedCost2ACY,PostedCost3ACY,PostedCost4ACY,PostedCost5ACY);
    END;
    ...
    
  2. 将 Inventory 过帐到 G/L 代码单元中的 BufferInvtPosting 函数中的代码 (5802) 更改为以下内容:

    …
    
    // Find Actual Cost // Dionisis changed with valuation cost
    // CASE "Item Ledger Entry Type" OF
    // "Item Ledger Entry Type"::Purchase:
    // // GR0010.begin
    // // CostActual := "Entry Valuation Cost"; // "Cost Amount (Actual)"; // GR004
    // CostActual := "Cost Amount (Actual)";
    // // GR0010.end
    // "Item Ledger Entry Type"::Sale,
    // "Item Ledger Entry Type"::"Positive Adjmt.",
    // "Item Ledger Entry Type"::"Negative Adjmt.",
    // "Item Ledger Entry Type"::Transfer,
    // "Item Ledger Entry Type"::Consumption,
    // "Item Ledger Entry Type"::Output:
    // // GR0010.begin
    // // CostActual := "Entry Valuation Cost";
    // CostActual := "Cost Amount (Actual)";
    // // GR0010.end
    // END;
    
    // Find Expected Cost // Dionisis changed with valuation cost
    // CASE "Item Ledger Entry Type" OF
    // "Item Ledger Entry Type"::Purchase:
    // // GR0010.begin
    // //CostExpected := "Valuation Expected Cost"; // "Cost Amount (Expected)"; // GR0004
    // CostExpected := "Cost Amount (Expected)";
    // // GR0010.end
    // "Item Ledger Entry Type"::Sale:
    // // GR0010.begin
    // // CostExpected := "Valuation Expected Cost";
    // CostExpected := "Cost Amount (Expected)";
    // // GR0010 end
    // "Item Ledger Entry Type"::"Positive Adjmt.",
    // "Item Ledger Entry Type"::"Negative Adjmt.",
    // "Item Ledger Entry Type"::Transfer,
    // "Item Ledger Entry Type"::Consumption,
    // "Item Ledger Entry Type"::Output:
    // // GR0010.begin
    // //CostExpected := "Entry Valuation Cost"; //CostExpected := "Invoiced Quantity" * "Valuation Cost Per Unit";
    // CostExpected := "Cost Amount (Actual)";
    // // GR0010.end
    // END;
    CostActual := "Cost Amount (Actual)";
    CostExpected := "Cost Amount (Expected)";
    …
    
  3. 将 CalcExpCost 函数中的代码更改为库存过帐到 G/L 代码单位 (5802) ,如下所示:
    现有代码

    ...
    QtyNotInv := Quantity - QtyNotInv;
    AdjdCost := ROUND(AdjdCost * QtyNotInv / Quantity,RoundPrecision);
    ...
    

    替换代码

    ...
    QtyNotInv := Quantity - QtyNotInv;
    
    //Add the following line.
    IF QtyNotInv <> 0 THEN
    
    AdjdCost := ROUND(AdjdCost * QtyNotInv / Quantity,RoundPrecision);
    ...
    
  4. 更改估值管理代码单元 (16783) CalcPeriodAverageCost 函数中的代码,如下所示:
    现有代码

    ...
    WITH Item DO BEGIN
    SETRANGE("Date Filter",InventoryPeriod."Starting Date",InventoryPeriod."Ending Date");
    SETFILTER("Location Filter",LocationFilter);
    CALCFIELDS("Valuation Purchases Qty","Valuation Purchases (LCY)","Valuation Expd. Cost (Purch.)",
    "Valuation Output Cost","Output Qty","Assembled Qty","Valuation Assembly Cost",
    "Valuation Transfers Qty","Valuation Transfers (LCY)");
    CurrPeriodCost := "Valuation Purchases (LCY)" + "Valuation Expd. Cost (Purch.)" + "Valuation Output Cost" +
    "Valuation Assembly Cost" + "Valuation Transfers (LCY)";
    CurrPeriodQty := "Valuation Purchases Qty" + "Output Qty" + "Assembled Qty" + "Valuation Transfers Qty";
    IF "Production Method" <> "Production Method"::" " THEN
    CalcCostPerCostComp;
    END;
    
    CalcValuationCostPerUnit;
    ...
    

    替换代码

    ...
    WITH Item DO BEGIN
    SETRANGE("Date Filter",InventoryPeriod."Starting Date",InventoryPeriod."Ending Date");
    SETFILTER("Location Filter",LocationFilter);
    
    //Add the following lines.
    //CALCFIELDS("Valuation Purchases Qty","Valuation Purchases (LCY)","Valuation Expd. Cost (Purch.)",
    // "Valuation Output Cost","Output Qty","Assembled Qty","Valuation Assembly Cost",
    // "Valuation Transfers Qty","Valuation Transfers (LCY)");
    // CurrPeriodCost := "Valuation Purchases (LCY)" + "Valuation Expd. Cost (Purch.)" + "Valuation Output Cost" +
    // "Valuation Assembly Cost" + "Valuation Transfers (LCY)";
    // CurrPeriodQty := "Valuation Purchases Qty" + "Output Qty" + "Assembled Qty" + "Valuation Transfers Qty";
    CALCFIELDS("Valuation Purchases Qty","Valuation Purchases (LCY)","Valuation Expd. Cost (Purch.)",
    "Valuation Output Cost","Output Qty","Assembled Qty","Valuation Assembly Cost",
    "Inbound Transfer Qty","Inbound Transfers (LCY)");
    IF IsAvgCostCalcTypeItem THEN BEGIN
    CurrPeriodCost := "Valuation Purchases (LCY)" + "Valuation Expd. Cost (Purch.)" + "Valuation Output Cost" +
    "Valuation Assembly Cost";
    CurrPeriodQty := "Valuation Purchases Qty" + "Output Qty" + "Assembled Qty";
    END ELSE BEGIN
    CurrPeriodCost := "Valuation Purchases (LCY)" + "Valuation Expd. Cost (Purch.)" + "Valuation Output Cost" +
    "Valuation Assembly Cost" + "Inbound Transfers (LCY)";
    CurrPeriodQty := "Valuation Purchases Qty" + "Output Qty" + "Assembled Qty" + "Inbound Transfer Qty";
    END;
    //End of the lines.
    
    IF "Production Method" <> "Production Method"::" " THEN
    CalcCostPerCostComp;
    END;
    
    CalcValuationCostPerUnit;
    ...
    

            
          

先决条件

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

  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1 的希腊版本)
  • Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1 的希腊版本)

删除信息

无法删除此修补程序。

状态

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

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