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.

狀況

如果您套用 prepayments 更新時,增值稅項目會在匈牙利文版本的 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. 變更在變數中 codeunit (26585) 的程式碼如下所示︰
    現有的程式碼

    ... TempDocDim@1470008 : TEMPORARY Record 357;
    TempDimBuf@1470007 : TEMPORARY Record 360;
    PrepmtInvBuffer@1470009 : TEMPORARY Record 461;
    SalesSetup@1470010 : Record 311;
    PrevLineNo@1470012 : Integer;
    LineNo@1470011 : Integer;
    ...

    取代程式碼

    ...TempDocDim@1470008 : TEMPORARY Record 357;
    TempDimBuf@1470007 : TEMPORARY Record 360;
    PrepmtInvBuffer@1470009 : TEMPORARY Record 461;

    // Add the following line.
    VATClauseBuffer@1470085 : TEMPORARY Record 26511;
    // End of the added line.

    SalesSetup@1470010 : Record 311;
    PrevLineNo@1470012 : Integer;
    LineNo@1470011 : Integer;
    ...
  2. 變更 codeunit (26585) 中的PostLetter函式中的程式碼如下所示︰
    現有的程式碼 1

    ... PostingDate@1470020 : Date;
    LineAmount@1470009 : Decimal;
    PostingDescription@1470021 : Text[50];
    BEGIN
    LetterHeader := LetterHeader2;
    WITH SalesHeader DO BEGIN
    ...

    取代程式碼 1

    ...PostingDate@1470020 : Date;
    LineAmount@1470009 : Decimal;
    PostingDescription@1470021 : Text[50];

    // Add the following lines.
    CurrFactor@1360001 : Decimal;
    VATCurrFactor@1360000 : Decimal;
    // End of the added lines.

    BEGIN
    LetterHeader := LetterHeader2;
    WITH SalesHeader DO BEGIN...

    現有的程式碼 2

    ...SalesInvHeader."Posting Date" := PostingDate;
    SalesInvHeader."Document Date" := PostingDate;
    SalesInvHeader."VAT Date" := PostingDate;

    // Delete the following lines.
    SalesInvHeader."Currency Factor" := LetterHeader."Currency Factor";
    SalesInvHeader."VAT Currency Factor" := LetterHeader."VAT Currency Factor";
    // End of the deleted lines.

    SalesInvHeader."Due Date" := LetterHeader."Advance Due Date";
    SalesInvHeader."Pmt. Discount Date" := "Prepmt. Pmt. Discount Date";
    SalesInvHeader."Payment Discount %" := "Prepmt. Payment Discount %";
    ...

    取代程式碼 2

    ...SalesInvHeader."Posting Date" := PostingDate;
    SalesInvHeader."Document Date" := PostingDate;
    SalesInvHeader."VAT Date" := PostingDate;

    // Add the following lines.

    GetPrepaymentCurrFactors("No.",CurrFactor,VATCurrFactor);
    SalesInvHeader."Currency Factor" := CurrFactor;
    SalesInvHeader."VAT Currency Factor" := VATCurrFactor;

    // End of the added lines.

    SalesInvHeader."Due Date" := LetterHeader."Advance Due Date";
    SalesInvHeader."Pmt. Discount Date" := "Prepmt. Pmt. Discount Date";
    SalesInvHeader."Payment Discount %" := "Prepmt. Payment Discount %";
    ...

    現有的程式碼 3

    ...SalesCrMemoHeader."Posting Date" := PostingDate;
    SalesCrMemoHeader."VAT Date" := PostingDate;
    SalesCrMemoHeader."Document Date" := PostingDate;

    // Delete the following lines.
    SalesCrMemoHeader."Currency Factor" :=
    CurrExchRate.ExchangeRate(PostingDate,"Currency Code");
    SalesCrMemoHeader."VAT Currency Factor" := LetterHeader."VAT Currency Factor";
    // End of the deleted lines.

    SalesCrMemoHeader."Due Date" := LetterHeader."Advance Due Date";
    SalesCrMemoHeader.Correction := GLSetup."Mark Cr. Memos as Corrections";
    SalesCrMemoHeader."Date Sent" := 0D;
    ...

    取代程式碼 3

    ...SalesCrMemoHeader."Posting Date" := PostingDate;
    SalesCrMemoHeader."VAT Date" := PostingDate;
    SalesCrMemoHeader."Document Date" := PostingDate;

    // Add the following lines.
    SalesCrMemoHeader."Currency Factor" := SalesInvHeaderBuf."Currency Factor";
    SalesCrMemoHeader."VAT Currency Factor" := SalesInvHeaderBuf."VAT Currency Factor";
    // End of the added lines.

    SalesCrMemoHeader."Due Date" := LetterHeader."Advance Due Date";
    SalesCrMemoHeader.Correction := GLSetup."Mark Cr. Memos as Corrections";
    SalesCrMemoHeader."Date Sent" := 0D;
    ...

    現有的程式碼 4

    ...SalesInvHeader."Reversed By Cr. Memo No." := SalesCrMemoHeader."No.";
    SalesInvHeader.MODIFY;

    GenJnlLineDocType := GenJnlLine."Document Type"::"Credit Memo";
    PostedDocTabNo := DATABASE::"Sales Cr.Memo Header";
    Window.UPDATE(1,STRSUBSTNO(Text005,"Document Type","No.",SalesCrMemoHeader."No."));
    ...

    取代程式碼 4

    ...SalesInvHeader."Reversed By Cr. Memo No." := SalesCrMemoHeader."No.";
    SalesInvHeader.MODIFY;

    // Add the following lines.
    CurrFactor := SalesCrMemoHeader."Currency Factor";
    VATCurrFactor := SalesCrMemoHeader."VAT Currency Factor";
    // End of the added lines.

    GenJnlLineDocType := GenJnlLine."Document Type"::"Credit Memo";
    PostedDocTabNo := DATABASE::"Sales Cr.Memo Header";
    Window.UPDATE(1,STRSUBSTNO(Text005,"Document Type","No.",SalesCrMemoHeader."No."));
    ...

    現有的程式碼 5

    ...// Create Lines
    LineCount := 0;
    PrepmtInvBuffer.DELETEALL;

    // Delete the following line.
    BuildInvLineBuffer(LetterHeader,DocumentType,PrepmtInvBuffer,TempDocDim);
    // End of the deleted line.

    TempDimBuf.INIT;
    IF PrepmtInvBuffer.FINDSET THEN
    REPEAT
    ...

    取代程式碼 5

    ...// Create Lines
    LineCount := 0;
    PrepmtInvBuffer.DELETEALL;

    // Add the following line.
    BuildInvLineBuffer(LetterHeader,DocumentType,PrepmtInvBuffer,TempDocDim,VATCurrFactor);
    // End of the added line.

    TempDimBuf.INIT;
    IF PrepmtInvBuffer.FINDSET THEN
    REPEAT
    ...

    現有的程式碼 6

    ...GenJnlLine."Posting No. Series" := "Posting No. Series";
    GenJnlLine."IC Partner Code" := "Bill-to IC Partner Code";
    GenJnlLine."Group VAT ID" := "Group VAT ID"; // PS50595

    // Delete the following lines.
    GenJnlLine.VALIDATE("Currency Factor",LetterHeader."Currency Factor");
    GenJnlLine.VALIDATE("VAT Currency Factor",LetterHeader."VAT Currency Factor");
    // End of the deleted lines.

    GenJnlLine."VAT Base Amt. to Report (LCY)" := PrepmtInvBuffer."VAT Base Amt. to Report (LCY)";
    GenJnlLine."VAT Amount to Report (LCY)" := PrepmtInvBuffer."VAT Amount to Report (LCY)";
    RunGenJnlPostLine(GenJnlLine,PrepmtInvBuffer."Dimension Entry No.");
    ...

    取代程式碼 6

    ...GenJnlLine."Posting No. Series" := "Posting No. Series";
    GenJnlLine."IC Partner Code" := "Bill-to IC Partner Code";
    GenJnlLine."Group VAT ID" := "Group VAT ID"; // PS50595

    // Add the following lines.
    GenJnlLine.VALIDATE("Currency Factor",CurrFactor);
    GenJnlLine.VALIDATE("VAT Currency Factor",VATCurrFactor);

    // End of the added lines.

    GenJnlLine."VAT Base Amt. to Report (LCY)" := PrepmtInvBuffer."VAT Base Amt. to Report (LCY)";
    GenJnlLine."VAT Amount to Report (LCY)" := PrepmtInvBuffer."VAT Amount to Report (LCY)";
    RunGenJnlPostLine(GenJnlLine,PrepmtInvBuffer."Dimension Entry No.");
    ...

    現有的程式碼 7

    ...END;
    LetterHeader2 := LetterHeader;

    CLEAR(GenJnlPostLine);
    Window.CLOSE;
    EXIT(TRUE);
    ...

    取代程式碼 7

    ...END;
    LetterHeader2 := LetterHeader;

    // Add the following lines.
    SetVATClause(SalesInvHeader,SalesInvLine);
    FinalizeVATClause(SalesInvHeader,SalesInvLine);
    // End of the added lines.

    CLEAR(GenJnlPostLine);
    Window.CLOSE;
    EXIT(TRUE);
    ...
  3. 變更 codeunit (26585) 中的AddPrepmtSalesInvLine函式中的程式碼如下所示︰
    現有的程式碼 1

    ...LOCAL PROCEDURE AddPrepmtSalesInvLine@1470033(LetterLine@1470002 : Record 26586;SalesInvHeader@1470001 : Record 112;AmountInclVAT@1470005 : Decimal;VATAmount@1470000 : Decimal;VAR LastLetterNo@1470006 : Code[20]) : Boolean;
    VAR
    LetterHeader@1360000 : Record 26585;
    GenJnlLine@1360001 : Record 81;
    SalesInvLine@1470003 : Record 113;
    NextLineNo@1470004 : Integer;
    ...

    取代程式碼 1

    ...LOCAL PROCEDURE AddPrepmtSalesInvLine@1470033(LetterLine@1470002 : Record 26586;SalesInvHeader@1470001 : Record 112;AmountInclVAT@1470005 : Decimal;VATAmount@1470000 : Decimal;VAR LastLetterNo@1470006 : Code[20]) : Boolean;
    VAR

    // Delete the following line.
    LetterHeader@1360000 : Record 26585;
    // End of the deleted line.

    GenJnlLine@1360001 : Record 81;
    SalesInvLine@1470003 : Record 113;
    NextLineNo@1470004 : Integer;
    ...

    現有的程式碼 2

    ...SalesInvLine."VAT Base Amt. to Report (LCY)" := SalesInvLine."VAT Base Amount";
    SalesInvLine."VAT Amount to Report (LCY)" := -VATAmount;
    END ELSE BEGIN

    // Delete the following lines.
    LetterHeader.GET(LetterLine."Letter No.");
    GenJnlLine."Currency Code" := LetterLine."Currency Code";
    GenJnlLine."VAT Currency Factor" := LetterHeader."VAT Currency Factor";
    // End of the deleted lines.

    GenJnlLine."Posting Date" := SalesInvHeader."Posting Date";
    GenJnlLine.CalcVATToReport(SalesInvLine."VAT Base Amount",-VATAmount);
    SalesInvLine."VAT Base Amt. to Report (LCY)" := GenJnlLine."VAT Base Amt. to Report (LCY)";
    ...

    取代程式碼 2

    ...SalesInvLine."VAT Base Amt. to Report (LCY)" := SalesInvLine."VAT Base Amount";
    SalesInvLine."VAT Amount to Report (LCY)" := -VATAmount;
    END ELSE BEGIN

    // Add the following lines.
    GenJnlLine."Currency Code" := LetterLine."Currency Code";
    GenJnlLine."VAT Currency Factor" := SalesInvHeader."VAT Currency Factor";
    // End of the added lines.

    GenJnlLine."Posting Date" := SalesInvHeader."Posting Date";
    GenJnlLine.CalcVATToReport(SalesInvLine."VAT Base Amount",-VATAmount);
    SalesInvLine."VAT Base Amt. to Report (LCY)" := GenJnlLine."VAT Base Amt. to Report (LCY)";
    ...
  4. 變更 codeunit (26585) 中的BuildInvLineBuffer函式中的程式碼如下所示︰
    現有的程式碼 1

    ...LetterLine2.TABLECAPTION,LetterLine2."Letter No.",LetterLine2."Line No.",DimMgt.GetDimValuePostingErr);
    END;

    // Delete the following line.
    LOCAL PROCEDURE BuildInvLineBuffer@1470020(LetterHeader@1470000 : Record 26585;DocumentType@1470005 : 'Invoice,Credit Memo';VAR PrepmtInvBuf@1470001 : Record 461;VAR TempDocDim@1470002 : Record 357);
    // End of the deleted line.

    VAR
    LetterLine@1470003 : Record 26586;
    PrepmtInvBuf2@1470004 : Record 461;
    ...

    取代程式碼 1

    ...LetterLine2.TABLECAPTION,LetterLine2."Letter No.",LetterLine2."Line No.",DimMgt.GetDimValuePostingErr);
    END;

    // Add the following line.
    LOCAL PROCEDURE BuildInvLineBuffer@1470020(LetterHeader@1470000 : Record 26585;DocumentType@1470005 : 'Invoice,Credit Memo';VAR PrepmtInvBuf@1470001 : Record 461;VAR TempDocDim@1470002 : Record 357;VATCurrFactor@1360000 : Decimal);
    // End of the added line.

    VAR
    LetterLine@1470003 : Record 26586;
    PrepmtInvBuf2@1470004 : Record 461;
    ...

    現有的程式碼 2

    ... LetterLine.SETRANGE("Letter No.",LetterHeader."No.");
    IF LetterLine.FINDSET THEN
    REPEAT

    // Delete the following line.
    FillInvLineBuffer(LetterLine,DocumentType,LetterHeader."VAT Currency Factor",PrepmtInvBuf2,TempDocDim);
    // End of the deleted line.

    IF PrepmtInvBuf2.Amount <> 0 THEN
    PrepmtInvBuf.InsertInvLineBuffer(PrepmtInvBuf2);
    UNTIL LetterLine.NEXT = 0;
    ...

    取代程式碼 2

    ...  LetterLine.SETRANGE("Letter No.",LetterHeader."No.");
    IF LetterLine.FINDSET THEN
    REPEAT

    // Add the following line.
    FillInvLineBuffer(LetterLine,DocumentType,VATCurrFactor,PrepmtInvBuf2,TempDocDim);
    // End of the added line.

    IF PrepmtInvBuf2.Amount <> 0 THEN
    PrepmtInvBuf.InsertInvLineBuffer(PrepmtInvBuf2);
    UNTIL LetterLine.NEXT = 0;
    ...
  5. 新增函式中 codeunit (26585) 如下所示︰

    ... LOCAL PROCEDURE GetPrepaymentCurrFactors@1470049(SalesOrderNo@1470000 : Code[20];VAR CurrFactor@1360001 : Decimal;VAR VATCurrFactor@1360002 : Decimal);
    VAR
    LetterHeader@1470001 : Record 26585;
    CustLedgEntry@1470002 : Record 21;
    AdvanceLink@1470003 : Record 26590;
    BEGIN
    CurrFactor := 0;
    VATCurrFactor := 0;

    WITH AdvanceLink DO BEGIN
    LetterHeader.SETRANGE("Order No.",SalesOrderNo);
    IF LetterHeader.FINDLAST THEN BEGIN
    SETCURRENTKEY("Document No.","Line No.","Entry Type");
    SETRANGE("Entry Type","Entry Type"::"Link To Letter");
    SETRANGE("Document No.",LetterHeader."No.");
    IF FINDLAST THEN
    IF CustLedgEntry.GET("CV Ledger Entry No.") THEN
    IF CustLedgEntry."Currency Code" <> '' THEN BEGIN
    CurrFactor := CustLedgEntry."Original Currency Factor";
    VATCurrFactor := CustLedgEntry."VAT Currency Factor";
    END;
    END;
    END;
    END;

    LOCAL PROCEDURE SetVATClause@1470058(SalesInvHeader@1470001 : Record 112;SalesInvLine@1470002 : Record 113);
    BEGIN
    WITH VATClauseBuffer DO
    IF GET(SalesInvLine."VAT Bus. Posting Group",SalesInvLine."VAT Prod. Posting Group") THEN BEGIN
    "VAT Base" +=
    CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
    SalesInvHeader."Currency Code",
    PrepmtInvBuffer.Amount,
    SalesInvHeader."Currency Factor");
    "VAT Amount" +=
    (CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
    SalesInvHeader."Currency Code",
    PrepmtInvBuffer."Amount Incl. VAT",
    SalesInvHeader."Currency Factor") -
    CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
    SalesInvHeader."Currency Code",
    SalesInvLine.Amount,
    SalesInvHeader."Currency Factor"));
    MODIFY;
    END ELSE BEGIN
    "VAT Bus. Posting Group" := SalesInvLine."VAT Bus. Posting Group";
    "VAT Prod. Posting Group" := SalesInvLine."VAT Prod. Posting Group";
    "VAT Base" :=
    CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
    SalesInvHeader."Currency Code",
    PrepmtInvBuffer.Amount,
    SalesInvHeader."Currency Factor");
    "VAT Amount" :=
    CurrExchRate.ExchangeAmtFCYToLCY(SalesInvHeader."Posting Date",
    SalesInvHeader."Currency Code",
    PrepmtInvBuffer."Amount Incl. VAT",
    SalesInvHeader."Currency Factor") -
    "VAT Base";
    INSERT;
    END;
    END;

    LOCAL PROCEDURE FinalizeVATClause@1470064(SalesInvHeader@1470002 : Record 112;SalesInvLine@1470003 : Record 113);
    VAR
    TransferExtText@1470000 : Codeunit 378;
    VATClauseSetup@1470001 : Record 26512;
    BEGIN
    IF VATClauseBuffer.FINDSET THEN
    REPEAT
    VATClauseSetup.SETRANGE("VAT Bus. Posting Group",VATClauseBuffer."VAT Bus. Posting Group");
    VATClauseSetup.SETRANGE("VAT Prod. Posting Group",VATClauseBuffer."VAT Prod. Posting Group");
    IF VATClauseSetup.FINDSET THEN
    REPEAT
    VATClauseSetup.TESTFIELD("Standard Text Code");
    TransferExtText.VATCheckIfAnyExtText(SalesInvHeader,VATClauseSetup."Standard Text Code");
    TransferExtText.InsertVATExtText(SalesInvLine,VATClauseBuffer);
    UNTIL VATClauseSetup.NEXT = 0;
    UNTIL VATClauseBuffer.NEXT = 0;
    END;
    ...

先決條件

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

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

此外,您必須擁有MSDNAV2009R2Prepaymts_HungaryMSDYN_VATExchangeRateAdvancesHungarianNAV2009R2安裝。

移除資訊

您無法移除此 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!

×