この資料は、すべての言語ロケールには、Microsoft Dynamics NAV に適用されます。
現象
Microsoft Dynamics NAV で [日付なし] に既定の転記日付が設定されている場合、外国の通貨で販売注文を作成しようとするとき、システムを検証できません為替レート。したがって、次のエラー メッセージが表示されます。
フィルター内での通貨の為替レートはありません。
さらに、注文確認のレポート (205) を印刷することはできません。
この問題は、次の製品で発生します。
-
Microsoft Dynamics NAV 2009 サービス パック 1 (SP1)
-
Microsoft Dynamics NAV 2009 R2
解決策
修正プログラムの情報
サポートされている修正プログラムはマイクロソフトから現在入手可能です。ただし、この資料に記載されている問題を解決するためのものはのみ。この特定の問題が発生したシステムにのみ適用してください。この修正プログラムは、今後さらにテストを行うことがあります。この問題で深刻な影響を受けていない場合は、次の Microsoft Dynamics NAV 2009 サービス パックまたは修正プログラムを含む次の Microsoft Dynamics NAV バージョン待つことを勧めします。
注: かかる料金が免除されるテクニカル サポート担当者 Microsoft Dynamics および関連製品のことは、通常は特別な場合は、特定の更新プログラムは、問題を解決するにを決定します。追加の質問および問題の特定のアップデートの対象にはなりませんが、通常のサポート料金が適用されます。
インストール情報
マイクロソフトでは解説することのみを目的としてプログラミング例を提供しています。暗示あるいは明示していることに対しての保証はしておりません。ここで言う保証とは、特定の目的に対する商品性や適合性の暗示的保証を含んでいますが、それに限定されるわけではありません。この資料では、例示されているプログラミング言語およびプロシージャの作成やデバッグに使用するツールにお客様が精通していることを前提としています。マイクロソフトのサポート エンジニアは、特定のプロシージャの機能を説明することができますが、機能の追加またはお客様固有の要件を満たすようにプロシージャを作成するこれらの例は変更されません。
注: この修正プログラムをインストールする前に、Microsoft Navision のすべてのクライアント ユーザーがシステムの電源を記録することを確認します。これには、Microsoft Navision アプリケーション サービス (NAS) クライアントのユーザーが含まれます。この修正プログラムを実装すると、ログオンしている唯一のクライアント ユーザーが必要です。
この修正プログラムを実装するには、開発者用のライセンスが必要です。
ユーザー アカウントまたはデータベース ログイン ウィンドウに Windows のログイン ウィンドウにある「スーパー」ロール id を割り当てられていることをお勧めします。ユーザー アカウントには、「スーパー」ロール ID を割り当てることができません、する場合は、ユーザー アカウントが次のアクセス許可を持っているを確認する必要があります。
-
変更するオブジェクトの変更のアクセス許可。
-
システム オブジェクトの ID 5210オブジェクトおよびシステム オブジェクトの ID 9015オブジェクトの実行が許可されます。
注:
データの修復を実行する必要があるない限り、データ ストアへの権限を持っている必要はありません。
コードの変更
注: 常にテスト コードを修正、管理された環境で適用する前に、運用コンピューターに修正プログラムします。
この問題を解決するには、次の手順を実行します。
-
販売価格の計算済の管理codeunit (7000) のSalesHeaderExchDate関数内のコードを次のように変更します。
既存のコード...WITH SalesHeader DO BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT("Posting Date");
// End of the deleted lines.
END;
...置換用コード
...WITH SalesHeader DO BEGIN
// Add the following lines.
IF "Posting Date" <>0D THEN
EXIT("Posting Date");
EXIT(WORKDATE);
// End of the added lines.
END;
... -
購買の内のPurchHeaderExchDate関数内のコードを変更します。価格計算済の管理次のように codeunit (7010) にします。
既存のコード...WITH PurchHeader DO BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT("Posting Date");
// End of the deleted lines.
END;
...置換用コード
...WITH PurchHeader DO BEGIN
// Add the following lines.
IF "Posting Date" <> 0D THEN
EXIT("Posting Date");
EXIT(WORKDATE);
// End of the added lines.
END;
... -
(42) の [販売注文] フォームに次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (111) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
売上請求書フォーム (43) で次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (107) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
売上クレジットのメモ型フォーム (44) に次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (91) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
発注書フォーム (50) で次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (119) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
購買の請求書フォーム (51) で次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (104) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
購買貸方のメモ型フォーム (52) で次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (91) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
売り上げ高を返す注文フォーム (6630) のとおり、 OnAssistEdit 通貨コード] ボックスでトリガー (91) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
戻る注文フォーム (6640) で次のように、 OnAssistEdit 通貨コード] ボックスでトリガー (91) 内のコードを変更します。
既存のコード...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...置換用コード
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
販売ヘッダーテーブル (36) のUpdateCurrencyFactor関数内のコードを次のように変更します。
既存のコード...IF "Currency Code" <>'' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::Quote,"Document Type"::"Blanket Order"]) AND
("Posting Date" = 0D)
THEN
CurrencyDate := WORKDATE
ELSE
CurrencyDate := "Posting Date";
// End of the deleted lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
...置換用コード
...IF "Currency Code" <> '' THEN BEGIN
// Add the following lines.
IF "Posting Date" <> 0D THEN
CurrencyDate := "Posting Date"
ELSE
CurrencyDate := WORKDATE;
// End of the added lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
... -
販売明細行のテーブル (37) でGetDate関数のコードを次のように変更します。
既存のコード...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(SalesHeader."Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT(SalesHeader."Posting Date");
// End of the deleted lines.
...置換用コード
...// Add the following lines.
IF SalesHeader."Posting Date" <> 0D THEN
EXIT(SalesHeader."Posting Date");
EXIT(WORKDATE);
// End of the added lines.
... -
購買注文ヘッダーテーブル (38) のUpdateCurrencyFactor関数内のコードを次のように変更します。
既存のコード...IF "Currency Code" <> '' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::Quote,"Document Type"::"Blanket Order"]) AND
("Posting Date" = 0D)
THEN
CurrencyDate := WORKDATE
ELSE
CurrencyDate := "Posting Date";
// End of the deleted lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
...置換用コード
...IF "Currency Code"<>'' THEN BEGIN
// Add the following lines.
IF "Posting Date" <> 0D THEN
CurrencyDate := "Posting Date"
ELSE
CurrencyDate := WORKDATE;
// End of the added lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
... -
購買注文明細行のテーブル (39) でGetDate関数のコードを次のように変更します。
既存のコード...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(PurchHeader."Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT(PurchHeader."Posting Date")
// End of the deleted lines.
...置換用コード
...// Add the following lines.
IF PurchHeader."Posting Date"<>0D THEN
EXIT(PurchHeader."Posting Date");
EXIT(WORKDATE);
// End of the added lines.
... -
販売後の codeunit (80) 内のRoundAmount関数内のコードを次のように変更します。
既存のコード...IF SalesHeader."Currency Code" <>'' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(SalesHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
UseDate := WORKDATE
ELSE
UseDate := SalesHeader."Posting Date";
...置換用コード
...IF SalesHeader."Currency Code" <>'' THEN BEGIN
// Add the following line.
IF (SalesHeader."Posting Date" = 0D) THEN
// End of the added line.
UseDate := WORKDATE
ELSE
UseDate := SalesHeader."Posting Date";
... -
内のRoundAmount関数内のコードを変更する、購買。-投稿codeunit (90) を次のように。
既存のコード...IF PurchHeader."Currency Code" <>'' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(PurchHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
Usedate := WORKDATE
ELSE
Usedate := PurchHeader."Posting Date";
...置換用コード
...IF PurchHeader."Currency Code"<> '' THEN BEGIN
// Add the following line.
IF (PurchHeader."Posting Date" = 0D) THEN
// End of the added line.
Usedate := WORKDATE
ELSE
Usedate := PurchHeader."Posting Date";
... -
フォームで販売注文の統計(402) のUpdateHeaderInfo関数内のコードを次のように変更します。
既存のコード...IF "Prices Including VAT" THEN
TotalSalesLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalSalesLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <> '' THEN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
// End of the deleted lines.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
...置換用コード
...IF "Prices Including VAT" THEN
TotalSalesLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalSalesLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <>'' THEN
// Add the following line.
IF "Posting Date" = 0D THEN
// End of the added line.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
... -
購買注文の統計(403) フォームのUpdateHeaderInfo関数内のコードを次のように変更します。
既存のコード...IF "Prices Including VAT" THEN
TotalPurchLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalPurchLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <> '' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
// End of the deleted lines.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
...置換用コード
...IF "Prices Including VAT" THEN
TotalPurchLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalPurchLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <> '' THEN BEGIN
// Add the following line.
IF "Posting Date" = 0D THEN
// End of the added line.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
... -
売上の計算済の割引codeunit (60) のCalculateInvoiceDiscount関数内のコードを次のように変更します。
既存のコード...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(SalesHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := SalesHeader."Posting Date";
...置換用コード
...// Add the following line.
IF SalesHeader."Posting Date" = 0D THEN
// End of the added line.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := SalesHeader."Posting Date";
... -
内のCalculateInvoiceDiscount関数内のコードを変更、購入。-Calc.Discount codeunit (70) を次のようにします。
既存のコード...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(PurchHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := PurchHeader."Posting Date";
...置換用コード
...// Add the following line.
IF PurchHeader."Posting Date" = 0D THEN
// End of the added line.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := PurchHeader."Posting Date";
...
必要条件
この修正プログラムを適用するのにはインストールされている製品は次のいずれかが必要です。
-
Microsoft Dynamics NAV 2009 サービス パック 1 (SP1)
-
Microsoft Dynamics NAV 2009 R2
アンインストール情報
この修正プログラムを削除することはできません。
状況
マイクロソフトは、この問題を「対象製品」セクションに記載されているマイクロソフト製品の問題として認識しています。
関連情報
VSTF DynamicsNAV SE: 237796, 245981, 254036
注: これは、マイクロソフト サポートの組織内から直接作成した「高速公開」の資料です。ここに含まれる情報は、新たに発生している問題に応じて現状のまま提供されています。速やかに利用できるようにした結果として、内容には誤植が含まれている可能性があり、事前告知なしで改訂する場合があります。その他の考慮事項については、使用条件を参照してください。