重繪的物料單的現金付款應該在原始的發票的年份中宣告,並不為基礎的重繪的物料單,在西班牙文版本的 Microsoft 動態航行點 2009年 347 宣告中的年份。下列產品中,就會發生這個問題︰
-
西班牙文版本的 Microsoft 動態航行點 2009 R2
-
Microsoft 動態航行點 2009 Service Pack 1 (SP1) 的西班牙文版本
原因
因為不正確的日期取自匯出 347 宣告重繪的物料單的情況下,就會發生這個問題
解決方案
Hotfix 資訊
已經可以從 Microsoft 取得支援的 hotfix。不過,它只被用來修正本文所述的問題。它只適用於發生此特定問題的系統上。此 hotfix 可能會接受其他測試。因此,如果此問題不會嚴重影響,我們建議您等候下一步的 Microsoft 動態航行點 2009 service pack 或包含此 hotfix 的下一個 Microsoft 動態航行點版本。
注意 在特殊的情況下,通常會支援呼叫可能已被取消如果技術支援專業人員的 Microsoft 動態及相關的產品所產生的費用會決定某特定更新程式可以解決您的問題。收取支援費用會套用,如果有其他支援問題是,不能限定的特定更新程式。
安裝資訊
Microsoft 會提供程式設計範例僅供說明,而不做任何明示或默示的保證。這包括,但不限於適售性或適合某特定用途之默示擔保責任。本文假設您已相當熟悉使用的我們所示範的程式設計語言以及建立和偵錯程序所使用的工具。Microsoft 技術支援工程師可以協助解釋特定程序的功能。不過,它們不會修改這些範例以提供附加功能或建構程序來滿足您特定需求。
注意套用此 hotfix 之前,請確認所有的 Microsoft 動態航行點用戶端使用者會登出系統。這包括 Microsoft 動態航行點應用程式伺服器 (NAS) 服務。您應該是唯一的用戶端使用者已登入,當您實作此 hotfix。
若要實作此 hotfix,您必須有開發人員授權。
我們建議您在 Windows 登入] 視窗中的色彩,或資料庫登入] 視窗中的使用者帳戶被指派 「 進階 」 的角色識別碼。如果使用者帳戶不能指派為 「 超級 」 的角色識別碼,您必須確認使用者帳戶具有下列權限︰
-
您將會變更物件的 [修改] 權限。
-
執行權限的系統物件 ID 5210物件和系統物件 ID 9015
物件。
注意您沒有擁有資料存放區的權限,除非您需要執行資料修復。
程式碼變更
注意一定要測試程式碼修正在受控制的環境中生產電腦套用修正程式之前。前套用變更,請匯入所有的 SEPA 更新。
若要解決這個問題,請依照下列步驟執行:
-
變更使 347 宣告報表 (10707) 中的IdentifyCashPayments函式中的程式碼如下所示︰
現有的程式碼 1...LOCAL PROCEDURE IdentifyCashPayments@1100010(CustomerNo@1100000 : Code[20];VATRegistrationNo@1100002 : Text[20]);
VAR
CustLedgerEntry@1100001 : Record 21;
BEGIN
// es0020.begin
CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
...取代程式碼 1
...LOCAL PROCEDURE IdentifyCashPayments@1100010(CustomerNo@1100000 : Code[20];VATRegistrationNo@1100002 : Text[20]);
VAR
CustLedgerEntry@1100001 : Record 21;
// Add the following line.
DocumentPostingDate@1170000000 : Date;
BEGIN
// es0020.begin
CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
...現有的程式碼 2
...CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
CustLedgerEntry.SETRANGE("Customer No.",CustomerNo);
// Delete the following lines.
CustLedgerEntry.SETRANGE("Posting Date",FromDate,ToDate);
IF CustLedgerEntry.FINDSET THEN
REPEAT
IF (CustLedgerEntry."Bal. Account Type" = CustLedgerEntry."Bal. Account Type"::"G/L Account") AND
(CustLedgerEntry."Bal. Account No." <> '')
THEN BEGIN
IF IsCashAccount(CustLedgerEntry."Bal. Account No.") THEN
CreateCashTotals(CustLedgerEntry."Entry No.",VATRegistrationNo);
END ELSE
IF ((CustLedgerEntry."Bal. Account No." = '') OR
(CustLedgerEntry."Bal. Account Type" <> CustLedgerEntry."Bal. Account Type"::"G/L Account"))
THEN BEGIN
IF IdentifyCashPaymentsFromGL(CustLedgerEntry) THEN
CreateCashTotals(CustLedgerEntry."Entry No.",VATRegistrationNo);
END;
// End of the deleted lines.
UNTIL CustLedgerEntry.NEXT = 0;
// es0020.end
END;
...取代程式碼 2
...CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
CustLedgerEntry.SETRANGE("Customer No.",CustomerNo);
// Add the following lines.
// we need payments made in future.
// CustLedgerEntry.SETRANGE("Posting Date",FromDate,ToDate);
IF CustLedgerEntry.FINDSET THEN
REPEAT
DocumentPostingDate := GetPaymentDocumentPostingDate(CustLedgerEntry);
IF (CheckCashTotalsPossibility(CustLedgerEntry,DocumentPostingDate)) THEN
CreateCashTotals(CustLedgerEntry."Entry No.",VATRegistrationNo,DocumentPostingDate);
// End of the added lines.
UNTIL CustLedgerEntry.NEXT = 0;
// es0020.end
END;
... -
變更使 347 宣告報表 (10707) 中的CreateCashTotals函式中的程式碼如下所示︰
現有的程式碼 1...UNTIL CustLedgerEntry.NEXT = 0;
// es0020.end
END;
// Delete the following line.
LOCAL PROCEDURE CreateCashTotals@2(CustLedgerEntryNo@1100000 : Integer;VATRegistrationNo@1100001 : Text[20]) : Boolean;
VAR
CustLedgerEntry@1100091 : Record 21;
DtldCustLedgEntry@1100094 : Record 379;
DtldCustLedgEntry2@1100095 : Record 379;
...取代程式碼 1
...UNTIL CustLedgerEntry.NEXT = 0;
// es0020.end
END;
// Add the following line.
LOCAL PROCEDURE CreateCashTotals@2(CustLedgerEntryNo@1100000 : Integer;VATRegistrationNo@1100001 : Text[20];DocumentPostingDate@1170000000 : Date) : Boolean;
VAR
CustLedgerEntry@1100091 : Record 21;
DtldCustLedgEntry@1100094 : Record 379;
DtldCustLedgEntry2@1100095 : Record 379;
...現有的程式碼 2
...THEN BEGIN
IF CustLedgerEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No.") THEN
UpdateCustomerCashBuffer(VATRegistrationNo,
// Delete the following line.
DATE2DMY(CustLedgerEntry."Posting Date",3),-(DtldCustLedgEntry2."Amount (LCY)"));
END;
UNTIL DtldCustLedgEntry2.NEXT = 0;
END ELSE BEGIN
...取代程式碼 2
...THEN BEGIN
IF CustLedgerEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No.") THEN
UpdateCustomerCashBuffer(VATRegistrationNo,
// Add the following line.
DATE2DMY(DocumentPostingDate,3),-(DtldCustLedgEntry2."Amount (LCY)"));
END;
UNTIL DtldCustLedgEntry2.NEXT = 0;
END ELSE BEGIN
...現有的程式碼 3
...END ELSE BEGIN
IF CustLedgerEntry.GET(DtldCustLedgEntry."Applied Cust. Ledger Entry No.") THEN
UpdateCustomerCashBuffer(VATRegistrationNo,
// Delete the following line.
DATE2DMY(CustLedgerEntry."Posting Date",3),DtldCustLedgEntry."Amount (LCY)");
END;
UNTIL DtldCustLedgEntry.NEXT = 0;
// es0020.end
...取代程式碼 3
...END ELSE BEGIN
IF CustLedgerEntry.GET(DtldCustLedgEntry."Applied Cust. Ledger Entry No.") THEN
UpdateCustomerCashBuffer(VATRegistrationNo,
// Add the following line.
DATE2DMY(DocumentPostingDate,3),DtldCustLedgEntry."Amount (LCY)");
END;
UNTIL DtldCustLedgEntry.NEXT = 0;
// es0020.end
... -
變更使 347 宣告報表 (10707) 中的GetPaymentDocumentPostingDate函式中的程式碼如下所示︰
現有的程式碼...IF Vendor."Country/Region Code" = CountryCode THEN
FromJournal := TRUE;
END;
...取代程式碼
...IF Vendor."Country/Region Code" = CountryCode THEN
FromJournal := TRUE;
END;
// Add the following lines.
LOCAL PROCEDURE GetPaymentDocumentPostingDate@1170000000(CustLedgerEntry@1170000000 : Record 21) PostingDate : Date;
VAR
CustLedgerEntryRelated@1170000001 : Record 21;
BEGIN
WITH CustLedgerEntry DO BEGIN;
TESTFIELD("Document Type","Document Type"::Payment);
PostingDate := "Posting Date";
END;
// If payment for Bill then we need get Posting Date of the Document related to the Bill
WITH CustLedgerEntryRelated DO BEGIN
SETRANGE("Closed by Entry No.",CustLedgerEntry."Entry No.");
SETRANGE("Document Type","Document Type"::Bill);
IF FINDFIRST THEN BEGIN
RESET;
SETRANGE("Document No.","Document No.");
SETFILTER("Document Type",'%1|%2',"Document Type"::Invoice,"Document Type"::"Credit Memo");
FINDFIRST;
PostingDate := "Posting Date";
END
END;
EXIT(PostingDate);
END;
PROCEDURE CheckCashTotalsPossibility@1170000008(CustLedgerEntry@1170000000 : Record 21;DocumentPostingDate@1170000001 : Date) : Boolean;
BEGIN
IF (DocumentPostingDate < FromDate) OR (DocumentPostingDate > ToDate) THEN
EXIT(FALSE);
WITH CustLedgerEntry DO
IF ("Bal. Account Type" = "Bal. Account Type"::"G/L Account") AND ("Bal. Account No." <> '') THEN BEGIN
IF IsCashAccount("Bal. Account No.") THEN
EXIT(TRUE);
END ELSE
IF ("Bal. Account No." = '') OR ("Bal. Account Type" <> "Bal. Account Type"::"G/L Account") THEN
IF IdentifyCashPaymentsFromGL(CustLedgerEntry) THEN
EXIT(TRUE);
EXIT(FALSE);
END;
// End of the added lines.
...
先決條件
您必須具備套用此 hotfix 之後安裝下列產品的其中一個︰
-
西班牙文版本的 Microsoft 動態航行點 2009 R2
-
西班牙文版本的 Microsoft 動態航行點 2009 SP1
移除資訊
您無法移除此 hotfix。
狀態
Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。
注意這是直接從 Microsoft 支援組織內建立的「快速發行」文件。本文件所包含的現狀資訊是針對新興問題的回應。為縮短使其可用的時程,資料可能會包含印刷錯誤,且可能會隨時進行修改而不另行通知。如其他考量,請參閱 「使用規定」。