結果在倉庫卡報告 (16785) 及試算表報告 (16702) 希臘版Microsoft Dynamics NAV中有所不同

套用到
Dynamics NAV 2009 Service Pack 1 Microsoft Dynamics NAV 5.0 Service Pack 1

本文適用於希臘語 (格) 語言地點的 Microsoft Dynamics NAV。

症狀

如果你在 Microsoft Dynamics NAV 希臘版中同時勾選「 自動成本帳帳 」和「 預期成本帳」 勾選框,預期成本金額所產生的錯誤總帳分錄不會被逆轉。 因此,16702 (試算報告的結果與 16785) (倉庫卡報告的結果不同) 。 
此問題發生於以下產品:

  • Microsoft Dynamics 2009 服務包 1 (SP1) 的希臘版本
  • Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1) 的希臘語版本

原因

此問題發生於總帳分錄中項目成本計算兩次。 成本有時以預期成本計算,另一次則以實際成本計算。

解決方式

Hotfix 資訊

Microsoft 現在已經支援熱修補程式。 然而,這僅是為了修正本文所描述的問題。 只應用在遇到這個特定問題的系統上。 此熱修補可能會進行額外測試。 因此,如果您未受到此問題嚴重影響,我們建議您等待下一個 Microsoft Dynamics NAV 2009 服務包或包含此熱修補的 Microsoft Dynamics NAV 版本。

注意:在特殊情況下,若 Microsoft Dynamics 及相關產品的技術支援專業人員判斷特定更新能解決您的問題,通常因支援電話而產生的費用可能會被取消。 一般來說,如果有所描述之特定更新無法解決的其他支援問題,才會收取支援費用。

            
          

安裝資訊

Microsoft 僅提供圖例的程式設計範例,不含明示或暗示的擔保。 這包括 (但不限於) 適用于特定目的之可操作性或適用性的暗示擔保。 本文假設您熟悉正在示範的程式設計語言,以及用來建立和進行程式偵錯工具的工具。 Microsoft 技術支援工程師可以協助說明特定程序的功能,但不會修改這些範例以提供附加功能或建構程序來滿足您的特定需求。

注意:安裝此熱修補程式前,請確認所有 Microsoft Navision 用戶端使用者都已登出系統。 這包括Microsoft Navision 應用服務 (NAS) 用戶端使用者。 當你實施這個熱修補時,應該只有你一個登入的客戶端使用者。

要實作這個熱修補,你必須擁有開發者授權。

我們建議在 Windows 登入視窗或資料庫登入視窗中,將使用者帳號分配「SUPER」角色 ID。 若使用者帳號無法被指派「SUPER」角色 ID,您必須驗證該帳號擁有以下權限:

  • 你要更改的物件的修改權限。
  • 系統物件 ID 5210 的執行權限,以及系統物件 ID 9015 的執行權限。

                
注意:除非你必須進行資料修復,否則你不必擁有資料儲存的權利。

法規變更

注意:在將修正程式套用到生產電腦之前,務必在受控環境中測試修正。
如果要解決這個問題,請依照下列步驟執行。

  1. 在庫存張貼 G/L 代碼單元 (5802) 中,請在 BufferInvtPosting 函式中更改代碼如下:
    現有程式碼

    ...
    // 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. 在庫存張貼到 G/L 代碼單元 (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 2009 服務包 1 (SP1) 的希臘版本
  • Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1) 的希臘語版本

移除資訊

你無法移除這個熱修正。

狀態

Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。

注意本文為 Microsoft 支援單位內部直接建立的「快速發佈」文章。 此處包含的資訊是以其現況提供,用於回應新產生的問題。 由於快速發佈,資料可能包含拼字錯誤,並可能會隨時修訂,不另行通知。 請參閱使用條款以瞭解其他相關考量。