"廠商陳述式 」 報告會顯示不正確的總金額時付款套用發票付款折扣已換取葡萄牙文版本的 Microsoft 動態航行點 2009年中的位置。付款的折扣金額會顯示為總餘額。請依照下列程式碼變更一節,若要解決這個問題的步驟。下列產品中,就會發生這個問題︰
-
葡萄牙文版本的 Microsoft 動態航行點 2009 R2
-
葡萄牙文版本的 Microsoft 動態航行點 2009 SP1
解決方案
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 更新。
若要解決這個問題,請依照下列步驟執行:
-
變更廠商陳述式報表 (13377) 中資料的項目編號 1 中的程式碼如下所示︰
現有的程式碼 1... Currency2.INSERT;
UNTIL Currency.NEXT = 0;
END;
// Delete the following line.
OnAfterGetRecord=BEGIN
// End of the deleted line.
CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");
PrintLine := FALSE;
Vend2 := Vendor;
COPYFILTER("Currency Filter",Currency2.Code);
...取代程式碼 1
... Currency2.INSERT;
UNTIL Currency.NEXT = 0;
END;
// Add the following lines.
OnAfterGetRecord=VAR
VendLedgEntry@1000 : Record 25;
BEGIN
// End of the added lines.
CurrReport.LANGUAGE := Language.GetLanguageID("Language Code");
PrintLine := FALSE;
Vend2 := Vendor;
COPYFILTER("Currency Filter",Currency2.Code);
...現有的程式碼 2
...PrintLine := Vend2."Net Change" <> 0;
UNTIL (Currency2.NEXT = 0) OR PrintLine;
END;
IF (NOT PrintLine) AND PrintAllHavingEntry THEN BEGIN
// Delete the following lines.
"Vendor Ledger Entry".RESET;
"Vendor Ledger Entry".SETCURRENTKEY("Vendor No.","Posting Date");
"Vendor Ledger Entry".SETRANGE("Vendor No.",Vendor."No.");
"Vendor Ledger Entry".SETRANGE("Posting Date",StartDate,EndDate);
Vendor.COPYFILTER("Currency Filter","Vendor Ledger Entry"."Currency Code");
PrintLine := "Vendor Ledger Entry".FIND('-');
// End of the deleted lines.
END;
IF NOT PrintLine THEN
CurrReport.SKIP;
...取代程式碼 2
... PrintLine := Vend2."Net Change" <> 0;
UNTIL (Currency2.NEXT = 0) OR PrintLine;
END;
IF (NOT PrintLine) AND PrintAllHavingEntry THEN BEGIN
// Add the following lines.
VendLedgEntry.SETCURRENTKEY("Vendor No.","Posting Date");
VendLedgEntry.SETRANGE("Vendor No.",Vendor."No.");
VendLedgEntry.SETRANGE("Posting Date",StartDate,EndDate);
Vendor.COPYFILTER("Currency Filter",VendLedgEntry."Currency Code");
PrintLine := NOT VendLedgEntry.ISEMPTY;
// End of the added lines.
END;
IF NOT PrintLine THEN
CurrReport.SKIP;
... -
變更中資料的項目編號 4,廠商陳述式報表 (13377) 中的程式碼如下所示︰
現有的程式碼 1... }
{ PROPERTIES
{
DataItemIndent=3;
// Delete the following lines.
DataItemTable=Table25;
DataItemTableView=SORTING(Vendor No.,Posting Date);
OnPreDataItem=BEGIN
SETRANGE("Posting Date",StartDate,EndDate);
SETRANGE("Currency Code",Currency2.Code);
CurrReport.CREATETOTALS("Remaining Amount");
// End of the deleted lines.
IF Currency2.Code = '' THEN BEGIN
GLSetup.TESTFIELD("LCY Code");
CurrencyCode3 := GLSetup."LCY Code"
END ELSE
...取代程式碼 1
... }
{ PROPERTIES
{
DataItemIndent=3;
// Add the following lines.
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
WHERE(Number=CONST(1));
DataItemVarName=VendLedEntryHdr;
PrintOnlyIfDetail=Yes;
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=4;
DataItemTable=Table380;
DataItemTableView=SORTING(Vendor No.,Posting Date,Entry Type,Currency Code)
WHERE(Excluded from calculation=CONST(No),
Entry Type=FILTER(<>Application&<>Redrawal));
DataItemVarName=DtldVendLedgEntry;
PrintOnlyIfDetail=No;
OnPreDataItem=BEGIN
SETRANGE("Vendor No.",Vendor."No.");
SETRANGE("Posting Date",StartDate,EndDate);
SETRANGE("Currency Code",Currency2.Code);
// End of the added lines.
IF Currency2.Code = '' THEN BEGIN
GLSetup.TESTFIELD("LCY Code");
CurrencyCode3 := GLSetup."LCY Code"
END ELSE
...現有的程式碼 2
...END ELSE
CurrencyCode3 := Currency2.Code
END;
// Delete the following lines.
OnAfterGetRecord=BEGIN
// PT0002.begin
// VendBalance := VendBalance + "Remaining Amount";
VendBalance := VendBalance + "Original Amount";
// PT0002.end
// End of the deleted lines.
END;
DataItemLinkReference=Vendor;
DataItemLink=Vendor No.=FIELD(No.);
...取代程式碼 2
... END ELSE
CurrencyCode3 := Currency2.Code
END;
// Add the following lines.
OnAfterGetRecord=VAR
VendLedgEntry@1000 : Record 25;
DtldVendLedgEntry1@1001 : Record 380;
BEGIN
RemainingAmount := 0;
PrintLine := TRUE;
CASE "Entry Type" OF
"Entry Type"::"Initial Entry":
BEGIN
VendLedgEntry.GET("Vendor Ledger Entry No.");
Description := VendLedgEntry.Description;
DueDate := VendLedgEntry."Due Date";
VendLedgEntry.SETRANGE("Date Filter",0D, EndDate);
VendLedgEntry.CALCFIELDS("Remaining Amount");
RemainingAmount := VendLedgEntry."Remaining Amount";
END;
"Entry Type"::"Payment Discount",
"Entry Type"::"Payment Discount (VAT Excl.)",
"Entry Type"::"Payment Discount (VAT Adjustment)",
"Entry Type"::"Payment Discount Tolerance",
"Entry Type"::"Payment Discount Tolerance (VAT Excl.)",
"Entry Type"::"Payment Discount Tolerance (VAT Adjustment)":
BEGIN
Description := Text006;
DueDate := 0D;
END;
"Entry Type"::"Payment Tolerance",
"Entry Type"::"Payment Tolerance (VAT Excl.)",
"Entry Type"::"Payment Tolerance (VAT Adjustment)":
BEGIN
Description := Text014;
DueDate := 0D;
END;
"Entry Type"::"Appln. Rounding",
"Entry Type"::"Correction of Remaining Amount":
BEGIN
Description := Text007;
DueDate := 0D;
END;
END;
IF PrintLine THEN
VendBalance := VendBalance + Amount;
// End of the added lines.
END;
DataItemLinkReference=Vendor;
DataItemLink=Vendor No.=FIELD(No.);
... -
變更資料的項目編號 4 章節,廠商陳述式報表 (13377) 中的程式碼如下所示︰
現有的程式碼 1... DataSetFieldName=Vendor_Ledger_Entry_Description }
{ 47 ;TextBox ;7980 ;0 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
CaptionML=ENU=Due Date;
// Delete the following lines.
SourceExpr=FORMAT("Due Date",0,4);
DataSetFieldName=Vendor_Ledger_Entry__Due_Date_ }
{ 48 ;TextBox ;13230;0 ;2310 ;423 ;FontSize=9;
CaptionML=ENU=Remaining Amount;
SourceExpr="Remaining Amount";
// End of the deleted lines.
AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=Vendor_Ledger_Entry__Remaining_Amount_ }
{ 49 ;TextBox ;15750;0 ;2310 ;423 ;FontSize=9;
...取代程式碼 1
... DataSetFieldName=Vendor_Ledger_Entry_Description }
{ 47 ;TextBox ;7980 ;0 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
CaptionML=ENU=Due Date;
// Add the following lines.
SourceExpr=FORMAT(DueDate,0,4);
DataSetFieldName=Vendor_Ledger_Entry__Due_Date_ }
{ 48 ;TextBox ;13230;0 ;2310 ;423 ;FontSize=9;
CaptionML=ENU=Remaining Amount;
SourceExpr=RemainingAmount;
// End of the added lines.
AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=Vendor_Ledger_Entry__Remaining_Amount_ }
{ 49 ;TextBox ;15750;0 ;2310 ;423 ;FontSize=9;
...現有的程式碼 2
...AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=VendBalance_Control49 }
{ 54 ;TextBox ;10710;0 ;2310 ;423 ;FontSize=9;
// Delete the following line.
SourceExpr="Original Amount";
// End of the deleted line.
AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=Vendor_Ledger_Entry__Original_Amount_ }
{ 78 ;TextBox ;9870 ;0 ;840 ;423 ;FontSize=9;
...取代程式碼 2
... AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=VendBalance_Control49 }
{ 54 ;TextBox ;10710;0 ;2310 ;423 ;FontSize=9;
// Add the following line.
SourceExpr=Amount;
// End of the added line.
AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=Vendor_Ledger_Entry__Original_Amount_ }
{ 78 ;TextBox ;9870 ;0 ;840 ;423 ;FontSize=9;
... -
變更資料的項目編號中的 5 廠商陳述式報表 (13377) 中的程式碼如下所示︰
現有的程式碼...END;
OnAfterGetRecord=BEGIN
IF ISSERVICETIER THEN
// Delete the following lines.
VendBalance2 := VendBalance2 + "Remaining Amount"
ELSE
VendBalance := VendBalance + "Remaining Amount";
// End of the deleted lines.
END;
DataItemLinkReference=Vendor;
DataItemLink=Vendor No.=FIELD(No.);
...取代程式碼
... END;
OnAfterGetRecord=BEGIN
IF ISSERVICETIER THEN
// Add the following lines.
VendBalance2 := VendBalance2 + RemainingAmount
ELSE
VendBalance := VendBalance + RemainingAmount;
// End of the added lines.
END;
DataItemLinkReference=Vendor;
DataItemLink=Vendor No.=FIELD(No.);
... -
變更資料的項目編號 5 章節,廠商陳述式報表 (13377) 中的程式碼如下所示︰
現有的程式碼...SourceExpr=Description;
DataSetFieldName=VendorLedgEntry2_Description }
{ 60 ;TextBox ;7980 ;0 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
// Delete the following lines.
SourceExpr=FORMAT("Due Date",0,4);
DataSetFieldName=VendorLedgEntry2__Due_Date_ }
{ 61 ;TextBox ;13230;0 ;2310 ;423 ;FontSize=9;
SourceExpr="Remaining Amount";
// End of the deleted lines.
AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=VendorLedgEntry2__Remaining_Amount_ }
{ 62 ;TextBox ;15750;0 ;2310 ;423 ;FontSize=9;
...取代程式碼
... SourceExpr=Description;
DataSetFieldName=VendorLedgEntry2_Description }
{ 60 ;TextBox ;7980 ;0 ;1680 ;423 ;HorzAlign=Left;
FontSize=9;
// Add the following lines.
SourceExpr=FORMAT(DueDate,0,4);
DataSetFieldName=VendorLedgEntry2__Due_Date_ }
{ 61 ;TextBox ;13230;0 ;2310 ;423 ;FontSize=9;
SourceExpr=RemainingAmount;
// End of the added lines.
AutoFormatType=1;
AutoFormatExpr="Currency Code";
DataSetFieldName=VendorLedgEntry2__Remaining_Amount_ }
{ 62 ;TextBox ;15750;0 ;2310 ;423 ;FontSize=9;
... -
變更廠商陳述式報表 (13377) 中的全域變數中的程式碼如下所示︰
現有的程式碼 1...Text000@1000 : TextConst 'ENU=Page %1';
Text001@1001 : TextConst 'ENU=Open Entries %1';
Text002@1002 : TextConst 'ENU=Overdue Entries %1';
Text003@1003 : TextConst 'ENU="Statement "';
GLSetup@1004 : Record 98;
CompanyInfo@1005 : Record 79;
Vend2@1006 : Record 23;
Currency@1007 : Record 4;
...取代程式碼 1
...Text000@1000 : TextConst 'ENU=Page %1';
Text001@1001 : TextConst 'ENU=Open Entries %1';
Text002@1002 : TextConst 'ENU=Overdue Entries %1';
Text003@1003 : TextConst 'ENU="Statement "';
// Add the following lines.
Text005@1030 : TextConst 'ENU=Multicurrency Application';
Text006@1031 : TextConst 'ENU=Payment Discount';
Text007@1032 : TextConst 'ENU=Rounding';
Text014@1033 : TextConst 'ENU=Application Writeoffs';
// End of the added lines.
GLSetup@1004 : Record 98;
CompanyInfo@1005 : Record 79;
Vend2@1006 : Record 23;
Currency@1007 : Record 4;
...現有的程式碼 2
...PrintAllHavingEntry@1010 : Boolean;
PrintAllHavingBal@1011 : Boolean;
PrintEntriesDue@1012 : Boolean;
PrintLine@1013 : Boolean;
StartDate@1014 : Date;
EndDate@1015 : Date;
VendAddr@1016 : ARRAY [8] OF Text[50];
CompanyAddr@1017 : ARRAY [8] OF Text[50];
...取代程式碼 2
...
PrintAllHavingEntry@1010 : Boolean;
PrintAllHavingBal@1011 : Boolean;
PrintEntriesDue@1012 : Boolean;
PrintLine@1013 : Boolean;
// Add the following line.
DueDate@1038 : Date;
// End of the added line.
StartDate@1014 : Date;
EndDate@1015 : Date;
VendAddr@1016 : ARRAY [8] OF Text[50];
CompanyAddr@1017 : ARRAY [8] OF Text[50];
...現有的程式碼 3
...StartDate@1014 : Date;
EndDate@1015 : Date;
VendAddr@1016 : ARRAY [8] OF Text[50];
CompanyAddr@1017 : ARRAY [8] OF Text[50];
StartBalance@1018 : Decimal;
VendBalance@1019 : Decimal;
FormatAddr@1020 : Codeunit 365;
CurrencyCode3@1022 : Code[10];
...取代程式碼 3
...StartDate@1014 : Date;
EndDate@1015 : Date;
VendAddr@1016 : ARRAY [8] OF Text[50];
CompanyAddr@1017 : ARRAY [8] OF Text[50];
// Add the following lines.
Description@1039 : Text[50];
RemainingAmount@1040 : Decimal;
// End of the added lines.
StartBalance@1018 : Decimal;
VendBalance@1019 : Decimal;
FormatAddr@1020 : Codeunit 365;
CurrencyCode3@1022 : Code[10];
...現有的程式碼 4
... </ReportItems>
</TableCell>
</TableCells>
<Visibility>
// Delete the following line.
<Hidden>=IIF(Fields!Vendor_Ledger_Entry_Vendor_No_.Value = "",TRUE,FALSE)</Hidden>
// End of the deleted line.
</Visibility>
</TableRow>
</TableRows>
</Details>
...取代程式碼 4
...</ReportItems>
</TableCell>
</TableCells>
<Visibility>
// Add the following line.
<Hidden>=IIF(Fields!DtldVendLedgEntry_Vendor_No_.Value = "",TRUE,FALSE)</Hidden>
// End of the added line.
</Visibility>
</TableRow>
</TableRows>
</Details>
...現有的程式碼 5
...<FontWeight>700</FontWeight>
<TextAlign>Right</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=iif(Last(Fields!Vendor_Ledger_Entry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control66Caption.Value),
// End of the deleted line.
Last(Fields!VendBalance_Control53Caption.Value))</Value>
</Textbox>
</ReportItems>
</TableCell>
...取代程式碼 5
...<FontWeight>700</FontWeight>
<TextAlign>Right</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=iif(Last(Fields!DtldVendLedgEntry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control66Caption.Value),
// End of the added line.
Last(Fields!VendBalance_Control53Caption.Value))</Value>
</Textbox>
</ReportItems>
</TableCell>
...現有的程式碼 6
...<FontWeight>700</FontWeight>
<TextAlign>Right</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=iif(Last(Fields!Vendor_Ledger_Entry_Vendor_No_.Value) = "" ,Last(Fields!CurrencyCode3_Control73.Value),
// End of the deleted line.
Last(Fields!CurrencyCode3.Value))</Value>
</Textbox>
</ReportItems>
</TableCell>
...取代程式碼 6
... <FontWeight>700</FontWeight>
<TextAlign>Right</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=iif(Last(Fields!DtldVendLedgEntry_Vendor_No_.Value) = "" ,Last(Fields!CurrencyCode3_Control73.Value),
// End of the added line.
Last(Fields!CurrencyCode3.Value))</Value>
</Textbox>
</ReportItems>
</TableCell>
...現有的程式碼 7
...FontWeight>700</FontWeight>
<Format>=Fields!VendBalance_Control49Format.Value</Format>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Delete the following line.
<Value>=iif(Last(Fields!Vendor_Ledger_Entry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control56.Value),
// End of the deleted line.
LAST(Fields!VendBalance.Value))</Value>
</Textbox>
</ReportItems>
</TableCell>
...取代程式碼 7
...<FontWeight>700</FontWeight>
<Format>=Fields!VendBalance_Control49Format.Value</Format>
<VerticalAlign>Middle</VerticalAlign>
</Style>
// Add the following line.
<Value>=iif(Last(Fields!DtldVendLedgEntry_Vendor_No_.Value) = "" ,Last(Fields!VendBalance_Control56.Value),
// End of the added line.
LAST(Fields!VendBalance.Value))</Value>
</Textbox>
</ReportItems>
</TableCell>
...現有的程式碼 8
...</Field>
<Field Name="CurrencyCode3">
<DataField>CurrencyCode3</DataField>
</Field>
// Delete the following lines.
<Field Name="Vendor_Ledger_Entry_Entry_No_">
<DataField>Vendor_Ledger_Entry_Entry_No_</DataField>
</Field>
<Field Name="Vendor_Ledger_Entry_Vendor_No_">
<DataField>Vendor_Ledger_Entry_Vendor_No_</DataField>
// End of the deleted lines.
</Field>
<Field Name="STRSUBSTNO_Text002_Currency2_Code_">
<DataField>STRSUBSTNO_Text002_Currency2_Code_</DataField>
</Field>
...取代程式碼 8
...</Field>
<Field Name="CurrencyCode3">
<DataField>CurrencyCode3</DataField>
</Field>
// Add the following lines.
<Field Name="DtldVendLedgEntry_Entry_No_">
<DataField>DtldVendLedgEntry_Entry_No_</DataField>
</Field>
<Field Name="DtldVendLedgEntry_Vendor_No_">
<DataField>DtldVendLedgEntry_Vendor_No_</DataField>
// End of the added lines.
</Field>
<Field Name="STRSUBSTNO_Text002_Currency2_Code_">
<DataField>STRSUBSTNO_Text002_Currency2_Code_</DataField>
</Field>
...
先決條件
您必須具備套用此 hotfix 之後安裝下列產品的其中一個︰
-
葡萄牙文版本的 Microsoft 動態航行點 2009 R2
-
葡萄牙文版本的 Microsoft 動態航行點 2009 SP1
移除資訊
您無法移除此 hotfix。
狀態
Microsoft 已確認這是<套用>一節所列出的 Microsoft 產品的問題。
注意這是直接從 Microsoft 支援組織內建立的「快速發行」文件。本文件所包含的現狀資訊是針對新興問題的回應。為縮短使其可用的時程,資料可能會包含印刷錯誤,且可能會隨時進行修改而不另行通知。如其他考量,請參閱 「使用規定」。