Symptômes
Le montant total dans un rappel est erroné si le compte de frais de relance est défini avec la taxe sur la valeur ajoutée (TVA) dans le Microsoft Dynamics NAV 2009. Cela se produit même si les frais de rappel ne sont pas enregistré et que le client est un client de l’Union européenne. Suivez les étapes décrites dans la section modifications du code pour résoudre ce problème. Ce problème se produit dans les produits suivants :
-
Microsoft Dynamics NAV 2009 R2
-
Microsoft Dynamics NAV 2009 SP1
Résolution
Informations sur le correctif
Un correctif pris en charge est désormais disponible auprès de Microsoft. Toutefois, il est conçu uniquement pour corriger le problème décrit dans cet article. Il s’applique uniquement aux systèmes rencontrant ce problème spécifique. Ce correctif peut subir des tests supplémentaires. Par conséquent, si vous n’êtes pas sérieusement concerné par ce problème, nous vous recommandons d’attendre le prochain service pack Microsoft Dynamics NAV 2009 ou la prochaine version de Microsoft Dynamics NAV qui comprendra ce correctif.
Remarque Dans certains cas, les frais généralement encourus pour la prise en charge des appels peuvent être annulés si un technicien du Support technique pour Microsoft Dynamics et les produits associés détermine qu’une mise à jour spécifique peut résoudre votre problème. Les coûts habituels du support technique s’appliqueront aux autres questions et problèmes qui ne relèvent pas de la mise à jour spécifique en question.Informations sur l’installation
Microsoft fournit des exemples de programmation à titre d'illustration uniquement, sans garantie expresse ou implicite. Ceci inclut, mais n'est pas limité à, les garanties implicites de qualité marchande ou d'adéquation à un usage particulier. Cet article suppose que vous êtes familiarisé avec le langage de programmation présenté et les outils utilisés pour créer et déboguer des procédures. Les ingénieurs du support technique Microsoft peuvent aider à expliquer la fonctionnalité d'une procédure particulière. Toutefois, ils ne modifieront pas ces exemples pour fournir des fonctionnalités supplémentaires ou créer des procédures répondant à vos besoins spécifiques.
Remarque Avant d’installer ce correctif, vérifiez que tous les utilisateurs du client Microsoft Dynamics NAV sont déconnectés sur le système. Ceci comprend les services de Microsoft Dynamics NAV Application Server (NAS). Vous devez être le seul utilisateur client connecté lors de l’implémentation de ce correctif. Pour appliquer ce correctif, vous devez posséder une licence développeur. Il est recommandé que le compte d’utilisateur dans la fenêtre Logins Windows ou dans la fenêtre Logins base de données est affecté à l’ID de rôle « SUPER ». Si le compte d’utilisateur ne peut pas être affecté à l’ID de rôle « SUPER », vous devez vérifier que le compte d’utilisateur dispose des autorisations suivantes :-
L’autorisation de modification pour l’objet que vous allez modifier.
-
L’autorisation d’exécution pour l’objet ID objet système 5210 et pour l' ID objet système 9015
objet.
Remarque Vous n’êtes pas obligé de disposer des droits pour les banques de données excepté si vous devez réparer des données.
Modifications du code
Remarque Toujours tester le code des correctifs dans un environnement contrôlé, avant d'appliquer les correctifs à vos ordinateurs de production.
Pour résoudre ce problème, procédez comme suit :-
Modifiez le code dans les propriétés dans l’écran Statistiques de rappel (437) comme suit :
Code existant... CALCFIELDS("Interest Amount","VAT Amount");
ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount"; CustPostingGr.GET("Customer Posting Group"); VATInterest := 0; IF ReminderLevel.GET("Reminder Terms Code","Reminder Level") THEN // Delete the following lines. IF ReminderLevel."Calculate Interest" THEN BEGIN GLAcc.GET(CustPostingGr."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; END; IF GLAcc.GET(CustPostingGr."Additional Fee Account") THEN VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); Interest := (ReminderTotal - "Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/100 + 1))/ (VATInterest/100 + 1); VatAmount := Interest * VATInterest/100 + "Additional Fee" * VATPostingSetup."VAT %"/100; // End of the deleted lines. IF Cust.GET("Customer No.") THEN Cust.CALCFIELDS("Balance (LCY)") ELSE CLEAR(Cust); IF Cust."Credit Limit (LCY)" = 0 THEN ...Code de remplacement
... CALCFIELDS("Interest Amount","VAT Amount");
ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount"; CustPostingGr.GET("Customer Posting Group"); VATInterest := 0; IF ReminderLevel.GET("Reminder Terms Code","Reminder Level") THEN // Add the following lines. IF ReminderLevel."Calculate Interest" AND ("VAT Amount" <> 0) THEN BEGIN GLAcc.GET(CustPostingGr."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; IF GLAcc.GET(CustPostingGr."Additional Fee Account") THEN VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); Interest := (ReminderTotal - "Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/ 100 + 1)) /(VATInterest / 100 + 1); VatAmount := Interest * VATInterest / 100 + "Additional Fee" * VATPostingSetup."VAT %" / 100; END ELSE Interest := "Interest Amount"; // End of the added lines. IF Cust.GET("Customer No.") THEN Cust.CALCFIELDS("Balance (LCY)") ELSE CLEAR(Cust); IF Cust."Credit Limit (LCY)" = 0 THEN ... -
Modifiez le code dans les propriétés dans l’écran Statistiques de rappel (441) comme suit :
Code existant...BEGIN
SETRANGE("No."); CALCFIELDS("Interest Amount","VAT Amount"); ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount"; CustPostingGr.GET("Customer Posting Group"); // Delete the following lines. ReminderLevel.GET("Reminder Terms Code","Reminder Level"); IF ReminderLevel."Calculate Interest" THEN BEGIN GLAcc.GET(CustPostingGr."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; END ELSE VATInterest := 0; IF GLAcc.GET(CustPostingGr."Additional Fee Account") THEN VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); Interest := (ReminderTotal - "Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/100 + 1))/ (VATInterest/100 + 1); VatAmount := Interest * VATInterest/100 + "Additional Fee" * VATPostingSetup."VAT %"/100; // End of the deleted lines. IF Cust.GET("Customer No.") THEN Cust.CALCFIELDS("Balance (LCY)") ELSE CLEAR(Cust); IF Cust."Credit Limit (LCY)" = 0 THEN ...Code de remplacement
...BEGIN
SETRANGE("No."); CALCFIELDS("Interest Amount","VAT Amount"); ReminderTotal := "Remaining Amount" + "Additional Fee" + "Interest Amount" + "VAT Amount"; CustPostingGr.GET("Customer Posting Group"); // Add the following lines. IF ReminderLevel.GET("Reminder Terms Code","Reminder Level") THEN IF ReminderLevel."Calculate Interest" AND ("VAT Amount" <> 0) THEN BEGIN GLAcc.GET(CustPostingGr."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; IF GLAcc.GET(CustPostingGr."Additional Fee Account") THEN VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); Interest := (ReminderTotal - "Remaining Amount" - "Additional Fee" * (VATPostingSetup."VAT %"/ 100 + 1)) /(VATInterest / 100 + 1); VatAmount := Interest * VATInterest / 100 + "Additional Fee" * VATPostingSetup."VAT %" / 100; END ELSE Interest := "Interest Amount"; // End of the added lines. IF Cust.GET("Customer No.") THEN Cust.CALCFIELDS("Balance (LCY)") ELSE CLEAR(Cust); IF Cust."Credit Limit (LCY)" = 0 THEN ... -
Modifiez le code dans l’élément numéro 1 des données dans le rapport de statistiques de rappel (117) comme suit :
Code existant...IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN
VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100); END ELSE AddFeeInclVAT := "Additional Fee"; // Delete the following lines. CALCFIELDS("Interest Amount"); IF "Interest Amount" <> 0 THEN BEGIN GLAcc.GET(CustPostingGroup."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; END ELSE VATInterest := 0; // End of the deleted lines. IF ISSERVICETIER THEN BEGIN NNC_InterestAmountTotal := 0; NNC_RemainingAmountTotal := 0; NNC_VATAmountTotal := 0; ...Code de remplacement
... IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN
VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100); END ELSE AddFeeInclVAT := "Additional Fee"; // Add the following lines. CALCFIELDS("Interest Amount","VAT Amount"); IF ("Interest Amount" <> 0) AND ("VAT Amount" <> 0) THEN BEGIN GLAcc.GET(CustPostingGroup."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; Interest:= (ReminderInterestAmount + "VAT Amount" +"Issued Reminder Header"."Additional Fee" - AddFeeInclVAT) / (VATInterest / 100 + 1); END ELSE BEGIN Interest:= "Interest Amount"; VATInterest := 0; END; // End of the added lines. IF ISSERVICETIER THEN BEGIN NNC_InterestAmountTotal := 0; NNC_RemainingAmountTotal := 0; NNC_VATAmountTotal := 0; ... -
Modifiez le code dans l’article numéro 4 des Sections de données dans le rapport de statistiques de rappel (117) comme suit :
Code existant 1...}
CONTROLS { { 45 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; CaptionML=ENU=Interest Amount; // Delete the following line. SourceExpr=(ReminderInterestAmount + "VAT Amount" +"Issued Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100 +1); // End of the deleted line. AutoFormatType=1; AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ } { 47 ;Label ;6090 ;0 ;4200 ;423 ;ParentControl=45; FontSize=9; ...Code de substitution 1
...}
CONTROLS { { 45 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; CaptionML=ENU=Interest Amount; // Add the following line. SourceExpr=Interest; // End of the added line. AutoFormatType=1; AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ } { 47 ;Label ;6090 ;0 ;4200 ;423 ;ParentControl=45; FontSize=9; ...Code existant 2
...CONTROLS
{ { 44 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; FontBold=Yes; CaptionML=ENU=Total; // Delete the following line. SourceExpr="Remaining Amount" + ReminderInterestAmount + "VAT Amount"-(ReminderInterestAmount + "VAT Amount" +"Issued Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100+1)*VATInterest/100 + "Issued Reminder Header"."Additional Fee" - AddFeeInclVAT; // End of the deleted line. AutoFormatType=1; AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT } { 56 ;TextBox ;6090 ;0 ;4200 ;423 ;FontSize=9; FontBold=Yes; ...Code de substitution 2
... CONTROLS
{ { 44 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; FontBold=Yes; CaptionML=ENU=Total; // Add the following line. SourceExpr="Remaining Amount" + ReminderInterestAmount; // End of the added line. AutoFormatType=1; AutoFormatExpr="Issued Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Issued_Reminder_Header___Additional_Fee____AddFeeInclVAT } { 56 ;TextBox ;6090 ;0 ;4200 ;423 ;FontSize=9; FontBold=Yes; ... -
Modifiez le code dans l’élément numéro 1 des données dans le rapport de statistiques de rappel (122) comme suit :
Code existant...IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN
VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100); END ELSE AddFeeInclVAT := "Additional Fee"; // Delete the following lines. CALCFIELDS("Interest Amount"); IF "Interest Amount" <> 0 THEN BEGIN GLAcc.GET(CustPostingGroup."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; END ELSE VATInterest := 0; // End of the deleted lines. IF ISSERVICETIER THEN BEGIN NNC_Interest := 0; NNC_TotalLCY := 0; NNC_VATAmount := 0; NNC_TotalLCYVATAmount := 0; ...Code de remplacement
...IF GLAcc.GET(CustPostingGroup."Additional Fee Account") THEN BEGIN
VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); AddFeeInclVAT := "Additional Fee" * (1 + VATPostingSetup."VAT %"/100); END ELSE AddFeeInclVAT := "Additional Fee"; // Add the following lines. CALCFIELDS("Interest Amount","VAT Amount"); IF ("Interest Amount" <> 0) AND ("VAT Amount" <> 0) THEN BEGIN GLAcc.GET(CustPostingGroup."Interest Account"); VATPostingSetup.GET("VAT Bus. Posting Group",GLAcc."VAT Prod. Posting Group"); VATInterest := VATPostingSetup."VAT %"; Interest:= (ReminderInterestAmount + "VAT Amount" +"Reminder Header"."Additional Fee" - AddFeeInclVAT) / (VATInterest / 100 + 1); END ELSE BEGIN Interest:= "Interest Amount"; VATInterest := 0; END; IF VATInterest <> 0 THEN // End of the added lines. IF ISSERVICETIER THEN BEGIN NNC_Interest := 0; NNC_TotalLCY := 0; NNC_VATAmount := 0; NNC_TotalLCYVATAmount := 0; ... -
Modifiez le code dans l’élément numéro 2 des données dans le rapport de statistiques de rappel (122) comme suit :
Code existant... }
{ PROPERTIES { DataItemIndent=1; DataItemTable=Table2000000026; // Delete the following line. DataItemTableView=SORTING(Number) WHERE(Number=CONST(1)); // End of the deleted line. DataItemVarName=PageCounter; } SECTIONS { { PROPERTIES ...Code de remplacement
...}
{ PROPERTIES { DataItemIndent=1; DataItemTable=Table2000000026; // Add the following lines. DataItemTableView=SORTING(Number) WHERE(Number=CONST(1)); // End of the added lines. DataItemVarName=PageCounter; } SECTIONS { { PROPERTIES ... -
Modifiez le code dans l’article numéro 3 des données dans le rapport de statistiques de rappel (122) comme suit :
Code existant...}
{ PROPERTIES { DataItemIndent=2; DataItemTable=Table2000000026; // Delete the following line. DataItemTableView=SORTING(Number) WHERE(Number=FILTER(1..)); // End of the deleted line. DataItemVarName=DimensionLoop; OnPreDataItem=BEGIN IF NOT ShowDim THEN CurrReport.BREAK; DocDim.SETRANGE("Table ID",DATABASE::"Reminder Header"); ...Code de remplacement
...}
{ PROPERTIES { DataItemIndent=2; DataItemTable=Table2000000026; // Add the following lines. DataItemTableView=SORTING(Number) WHERE(Number=FILTER(1..)); // End of the added lines. DataItemVarName=DimensionLoop; OnPreDataItem=BEGIN IF NOT ShowDim THEN CurrReport.BREAK; DocDim.SETRANGE("Table ID",DATABASE::"Reminder Header"); ... -
Modifiez le code dans l’article numéro 5 des données dans le rapport de statistiques de rappel (122) comme suit :
Code existant... }
{ PROPERTIES { DataItemIndent=2; DataItemTable=Table296; // Delete the following line. DataItemTableView=SORTING(Reminder No.,Line No.) WHERE(Line Type=FILTER(<>Not Due)); // End of the deleted line. OnPreDataItem=BEGIN IF ISSERVICETIER THEN TotalVATAmount := 0; IF FIND('+') THEN BEGIN ...Code de remplacement
...}
{ PROPERTIES { DataItemIndent=2; DataItemTable=Table296; // Add the following lines. DataItemTableView=SORTING(Reminder No.,Line No.) WHERE(Line Type=FILTER(<>Not Due)); // End of the added lines. OnPreDataItem=BEGIN IF ISSERVICETIER THEN TotalVATAmount := 0; IF FIND('+') THEN BEGIN ... -
Modifiez le code dans l’article numéro 5 des Sections de données dans le rapport de statistiques de rappel (122) comme suit :
Code existant 1... }
CONTROLS { { 17 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; CaptionML=ENU=Interest Amount; // Delete the following line. SourceExpr=(ReminderInterestAmount + "VAT Amount" +"Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100 +1); // End of the deleted line. AutoFormatType=1; AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ } { 20 ;Label ;6090 ;0 ;4200 ;423 ;ParentControl=17; FontSize=9; ...Code de substitution 1
... }
CONTROLS { { 17 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; CaptionML=ENU=Interest Amount; // Add the following line. SourceExpr=Interest; // End of the added line. AutoFormatType=1; AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100__1_ } { 20 ;Label ;6090 ;0 ;4200 ;423 ;ParentControl=17; FontSize=9; ...Code existant 2
...}
CONTROLS { { 29 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; FontBold=Yes; // Delete the following line. SourceExpr="Remaining Amount" + ReminderInterestAmount + "VAT Amount"-(ReminderInterestAmount + "VAT Amount" +"Reminder Header"."Additional Fee" - AddFeeInclVAT)/(VATInterest/100+1)*VATInterest/100 + "Reminder Header"."Additional Fee" - AddFeeInclVAT; // End of the deleted line. AutoFormatType=1; AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Reminder_Header___Additional_Fee____AddFeeInclVAT } { 43 ;TextBox ;6090 ;0 ;4200 ;423 ;FontSize=9; FontBold=Yes; ...Code de substitution 2
...}
CONTROLS { { 29 ;TextBox ;10710;0 ;2520 ;423 ;FontSize=9; FontBold=Yes; // Add the following line. SourceExpr="Remaining Amount" + ReminderInterestAmount; // End of the added line. AutoFormatType=1; AutoFormatExpr="Reminder Line".GetCurrencyCodeFromHeader; DataSetFieldName=Remaining_Amount____ReminderInterestAmount____VAT_Amount___ReminderInterestAmount____VAT_Amount____Reminder_Header___Additional_Fee____AddFeeInclVAT___VATInterest_100_1__VATInterest_100____Reminder_Header___Additional_Fee____AddFeeInclVAT } { 43 ;TextBox ;6090 ;0 ;4200 ;423 ;FontSize=9; FontBold=Yes; ...
Conditions préalables
Vous devez disposer d’un des produits suivants est installé pour appliquer ce correctif :
-
Microsoft Dynamics NAV 2009 R2
-
Microsoft Dynamics NAV 2009 SP1
Informations sur la suppression
Vous ne pouvez pas supprimer ce correctif.
État
Microsoft a confirmé l'existence de ce problème dans les produits Microsoft répertoriés dans la section « S'applique à ».
Remarque Il s’agit d’un article de « Dernière minute » créé directement à partir de l’organisation de support technique de Microsoft. Les informations contenues dans ce document sont fournies en l'état, en réponse à des problèmes nouveaux. En raison de la rapidité de leur mise à disposition, les documents peuvent contenir des erreurs typographiques et peuvent être révisés à tout moment sans préavis. Consultez les Conditions d’utilisationpour d’autres considérations.