Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

狀況

當您建立更正的發票,如果價格 inc.增值稅欄位已變更時,單位價格值不正確的 Microsoft 動態航行點 2009 R2 匈牙利文版本中。請依照下列程式碼變更一節,若要解決這個問題的步驟。下列產品中,就會發生這個問題︰

  • 匈牙利文版本的 Microsoft 動態航行點 2009 R2

解決方案

Hotfix 資訊

已經可以從 Microsoft 取得支援的 hotfix。不過,它只被用來修正本文所述的問題。它只適用於發生此特定問題的系統上。此 hotfix 可能會接受其他測試。因此,如果此問題不會嚴重影響,我們建議您等候下一步的 Microsoft 動態航行點 2009 service pack 或包含此 hotfix 的下一個 Microsoft 動態航行點版本。

注意 在特殊的情況下,通常會支援呼叫可能已被取消如果技術支援專業人員的 Microsoft 動態及相關的產品所產生的費用會決定某特定更新程式可以解決您的問題。收取支援費用會套用,如果有其他支援問題是,不能限定的特定更新程式。

安裝資訊

Microsoft 會提供程式設計範例僅供說明,而不做任何明示或默示的保證。這包括,但不限於適售性或適合某特定用途之默示擔保責任。本文假設您已相當熟悉使用的我們所示範的程式設計語言以及建立和偵錯程序所使用的工具。Microsoft 技術支援工程師可以協助解釋特定程序的功能。不過,它們不會修改這些範例以提供附加功能或建構程序來滿足您特定需求。

注意套用此 hotfix 之前,請確認所有的 Microsoft 動態航行點用戶端使用者會登出系統。這包括 Microsoft 動態航行點應用程式伺服器 (NAS) 服務。您應該是唯一的用戶端使用者已登入,當您實作此 hotfix。

若要實作此 hotfix,您必須有開發人員授權。

我們建議您在 Windows 登入] 視窗中的色彩,或資料庫登入] 視窗中的使用者帳戶被指派 「 進階 」 的角色識別碼。如果使用者帳戶不能指派為 「 超級 」 的角色識別碼,您必須確認使用者帳戶具有下列權限︰

  • 您將會變更物件的 [修改] 權限。

  • 執行權限的系統物件 ID 5210物件和系統物件 ID 9015

    物件。

注意您沒有擁有資料存放區的權限,除非您需要執行資料修復。

程式碼變更

注意永遠測試程式碼修正在受控制的環境中才能套用到實際執行電腦的修正程式。

若要解決這個問題,請依照下列步驟執行:

  1. 變更銷售修正行資料表 (14536) 中的UpdateVATAmounts函式中的程式碼如下所示︰
    現有的程式碼

    ...Amount * (1 - SalesHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision");
    "Amount Including VAT" :=
    ROUND(
    Amount * (1 - SalesHeader."VAT Base Discount %" / 100) * "VAT %" / 100,
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    END;
    "VAT Calculation Type"::"Full VAT":
    BEGIN
    ...

    取代程式碼

    ...Amount * (1 - SalesHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision");
    "Amount Including VAT" :=

    // Add the following line.
    Amount +
    // End of the added line.

    ROUND(
    Amount * (1 - SalesHeader."VAT Base Discount %" / 100) * "VAT %" / 100,
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    END;
    "VAT Calculation Type"::"Full VAT":
    BEGIN
    ...
  2. 變更銷售修正行資料表 (14536) 中的CheckLineAmount函式中的程式碼如下所示︰
    現有的程式碼 1

    ..."Unit Price Incl. Discount" := "Unit Price" - "Unit Price" * "Line Discount %" / 100;
    END;

    // Delete the following line.
    PROCEDURE CheckLineAmount@1360000();
    // End of the deleted line.

    BEGIN
    // PS16433.begin
    IF "Before/ After correction" = "Before/ After correction"::After THEN BEGIN
    ...

    取代程式碼 1

    ..."Unit Price Incl. Discount" := "Unit Price" - "Unit Price" * "Line Discount %" / 100;
    END;

    // Add the following lines.
    PROCEDURE CheckLineAmount@1170219();
    VAR
    SalesinvHeader@1170001 : Record 112;
    // End of the added lines.

    BEGIN
    // PS16433.begin
    IF "Before/ After correction" = "Before/ After correction"::After THEN BEGIN
    ...

    現有的程式碼 2

    ...// PS16433.begin
    IF "Before/ After correction" = "Before/ After correction"::After THEN BEGIN
    SalesCorrLine.GET("Document Type","Document No.","Correction Line No.","Before/ After correction"::Before);
    GetCorrType;
    IF (SalesCorrLine."Line Amount" > "Line Amount") AND
    ("Document Type" = "Document Type"::Invoice) AND
    (SalesCorrectionType."Correction Type" = SalesCorrectionType."Correction Type"::"Quantity and Value")
    THEN
    ...

    取代程式碼 2

    ... // PS16433.begin
    IF "Before/ After correction" = "Before/ After correction"::After THEN BEGIN
    SalesCorrLine.GET("Document Type","Document No.","Correction Line No.","Before/ After correction"::Before);

    // Add the following line.
    SalesinvHeader.GET(SalesHeader."Corr. Document No.");
    // End of the added line.

    GetCorrType;
    IF (SalesCorrLine."Line Amount" > "Line Amount") AND

    // Add the following line.
    (SalesHeader."Prices Including VAT" = SalesinvHeader."Prices Including VAT") AND
    // End of the added line.

    ("Document Type" = "Document Type"::Invoice) AND
    (SalesCorrectionType."Correction Type" = SalesCorrectionType."Correction Type"::"Quantity and Value")
    THEN
    ...
  3. 變更資料的項目編號 5 銷售額的發票 (HU) 報表 (14516) 中的程式碼如下所示︰
    現有的程式碼

    ...DataItemTable=Table14537;
    DataItemTableView=SORTING(Document No.,Correction Line No.,Before/ After correction,Document Type)
    WHERE(Before/ After correction=FILTER(Before),
    Document Type=CONST(Posted Invoice));
    DataItemVarName=PostedSalesCorrLineBefore;
    DataItemLinkReference=Sales Invoice Header;
    DataItemLink=Document No.=FIELD(No.);
    }
    SECTIONS
    {
    ...

    取代程式碼

    ...DataItemTable=Table14537;
    DataItemTableView=SORTING(Document No.,Correction Line No.,Before/ After correction,Document Type)
    WHERE(Before/ After correction=FILTER(Before),
    Document Type=CONST(Posted Invoice));
    DataItemVarName=PostedSalesCorrLineBefore;

    // Add the following lines.
    OnAfterGetRecord=BEGIN
    IF SalesInvHeader.GET("Sales Invoice Header"."Corr. Document No.") THEN
    IF SalesInvHeader."Prices Including VAT" <> "Sales Invoice Header"."Prices Including VAT" THEN
    "Unit Price Incl. Discount" := "VAT Base Amount" / Quantity;
    END;

    // End of the added lines.

    DataItemLinkReference=Sales Invoice Header;
    DataItemLink=Document No.=FIELD(No.);
    }
    SECTIONS
    {
    ...
  4. 變更資料的項目編號 6 銷售額的發票 (HU) 報表 (14516) 中的程式碼如下所示︰
    現有的程式碼

    ...DataItemTable=Table14537;
    DataItemTableView=SORTING(Document No.,Correction Line No.,Before/ After correction,Document Type)
    WHERE(Before/ After correction=FILTER(After),
    Document Type=CONST(Posted Invoice));
    DataItemVarName=PostedSalesCorrLineAfter;
    DataItemLinkReference=PostedSalesCorrLineBefore;
    DataItemLink=Document No.=FIELD(Document No.),
    Correction Line No.=FIELD(Correction Line No.);
    }
    SECTIONS
    ...

    取代程式碼

    ...DataItemTable=Table14537;
    DataItemTableView=SORTING(Document No.,Correction Line No.,Before/ After correction,Document Type)
    WHERE(Before/ After correction=FILTER(After),
    Document Type=CONST(Posted Invoice));
    DataItemVarName=PostedSalesCorrLineAfter;

    // Add the following lines.
    OnAfterGetRecord=BEGIN
    IF SalesInvHeader."Prices Including VAT" <> "Sales Invoice Header"."Prices Including VAT" THEN
    "Unit Price Incl. Discount" := "VAT Base Amount" / Quantity;
    END;

    // End of the added lines.

    DataItemLinkReference=PostedSalesCorrLineBefore;
    DataItemLink=Document No.=FIELD(Document No.),
    Correction Line No.=FIELD(Correction Line No.);
    }
    SECTIONS
    ...
  5. 變更 [業務人員的發票 (HU) 報表 (14516) 中的全域變數中的程式碼如下所示︰
    現有的程式碼

    ...VALExchRate@1360016 : Text[50];
    Text14530@1360017 : TextConst 'ENU=%1/%2;HUN=%1/%2';
    GroupVATText@13600018 : Text[30];
    CorrInvText@1360018 : TextConst 'ENU=C O R R E C T I V E I N V O I C E;HUN=H E L Y E S B Ö T Š S Z µ M L A';
    LogInteractionEnable@19003940 : Boolean INDATASET;

    PROCEDURE InitLogInteraction@1360000();
    BEGIN
    LogInteraction := SegManagement.FindInteractTmplCode(4) <> '';
    END;
    ...

    取代程式碼

    ...VALExchRate@1360016 : Text[50];
    Text14530@1360017 : TextConst 'ENU=%1/%2;HUN=%1/%2';
    GroupVATText@13600018 : Text[30];
    CorrInvText@1360018 : TextConst 'ENU=C O R R E C T I V E I N V O I C E;HUN=H E L Y E S B Ö T Š S Z µ M L A';
    LogInteractionEnable@19003940 : Boolean INDATASET;

    // Add the following line.
    SalesInvHeader@13600019 : Record 112;
    // End of the added line.

    PROCEDURE InitLogInteraction@1360000();
    BEGIN
    LogInteraction := SegManagement.FindInteractTmplCode(4) <> '';
    END;
    ...
  6. 變更 VATCorrectionManagement codeunit (14535) 中的InitSalesLineOnCharge函式中的程式碼如下所示︰
    現有的程式碼 1

    ...SalesLine.INSERT;
    CopyDim(SalesLine,SalesCorrLine);
    END;

    PROCEDURE InitSalesLineOnCharge@1360001(VAR SalesLine@1360000 : Record 37;SalesCorrLine@1360001 : Record 14536;QtyOnSalesLine@1360002 : Decimal);
    BEGIN
    InitSalesLine(SalesCorrLine,SalesLine);
    SalesLine.Type := SalesLine.Type::"Charge (Item)";
    SalesLine."No." := SalesCorrType."Item Charge Code";
    SalesLine.VALIDATE("Unit of Measure Code",'');
    ...

    取代程式碼 1

    ...SalesLine.INSERT;
    CopyDim(SalesLine,SalesCorrLine);
    END;

    PROCEDURE InitSalesLineOnCharge@1360001(VAR SalesLine@1360000 : Record 37;SalesCorrLine@1360001 : Record 14536;QtyOnSalesLine@1360002 : Decimal);

    // Add the following lines.
    VAR
    SalesInvHeader@1360003 : Record 112;
    // End of the added lines.

    BEGIN
    InitSalesLine(SalesCorrLine,SalesLine);
    SalesLine.Type := SalesLine.Type::"Charge (Item)";
    SalesLine."No." := SalesCorrType."Item Charge Code";
    SalesLine.VALIDATE("Unit of Measure Code",'');
    ...

    現有的程式碼 2

    ...InitSalesLine(SalesCorrLine,SalesLine);
    SalesLine.Type := SalesLine.Type::"Charge (Item)";
    SalesLine."No." := SalesCorrType."Item Charge Code";
    SalesLine.VALIDATE("Unit of Measure Code",'');
    SalesLine.VALIDATE(Quantity,QtyOnSalesLine);
    SalesLine.VALIDATE("Unit Price",SalesCorrLine."Unit Price");
    IF SalesLine.Quantity <> 0 THEN
    SalesLine.VALIDATE("Line Discount %",SalesCorrLine."Line Discount %");
    SalesLine.UpdateAmounts;
    SalesLine.VALIDATE("Unit Cost (LCY)",0);
    ...

    取代程式碼 2

    ...InitSalesLine(SalesCorrLine,SalesLine);
    SalesLine.Type := SalesLine.Type::"Charge (Item)";
    SalesLine."No." := SalesCorrType."Item Charge Code";
    SalesLine.VALIDATE("Unit of Measure Code",'');
    SalesLine.VALIDATE(Quantity,QtyOnSalesLine);

    // Add the following lines.
    IF (SalesCorrLine."Before/ After correction" = SalesCorrLine."Before/ After correction"::Before) AND
    (SalesInvHeader.GET(SalesCorrLine."Source Document No.")) AND
    (SalesHeader."Prices Including VAT" <> SalesInvHeader."Prices Including VAT")
    THEN BEGIN
    IF SalesHeader."Prices Including VAT" THEN
    SalesLine.VALIDATE("Unit Price",SalesCorrLine."Amount Including VAT" / SalesCorrLine.Quantity)
    ELSE
    SalesLine.VALIDATE("Unit Price",SalesCorrLine."VAT Base Amount" / SalesCorrLine.Quantity);
    END ELSE
    // End of the added lines.

    SalesLine.VALIDATE("Unit Price",SalesCorrLine."Unit Price");
    IF SalesLine.Quantity <> 0 THEN
    SalesLine.VALIDATE("Line Discount %",SalesCorrLine."Line Discount %");
    SalesLine.UpdateAmounts;
    SalesLine.VALIDATE("Unit Cost (LCY)",0);
    ...


先決條件

您必須具備套用此 hotfix 之後安裝下列產品的其中一個︰

  • 匈牙利文版本的 Microsoft 動態航行點 2009 R2

移除資訊

您無法移除此 hotfix。

狀態

Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。

注意這是直接從 Microsoft 支援組織內建立的「快速發行」文件。本文件所包含的現狀資訊是針對新興問題的回應。為縮短使其可用的時程,資料可能會包含印刷錯誤,且可能會隨時進行修改而不另行通知。如其他考量,請參閱 「使用規定」。

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×