Sintomi
L'importo totale in un sollecito è errato se il conto di addebito commissioni promemoria viene impostato sul valore aggiunto (IVA), in Microsoft Dynamics NAV 2009. Ciò si verifica anche se la tassa di promemoria non è registrata e il cliente è un cliente UE. Seguire i passaggi nella sezione modifiche al codice per risolvere questo problema. Questo problema si verifica nei seguenti prodotti:
-
Microsoft Dynamics NAV 2009 R2
-
Microsoft Dynamics NAV 2009 SP1
Risoluzione
Informazioni sull'hotfix
Un hotfix supportato è ora disponibile da Microsoft. Tuttavia, è destinato esclusivamente alla risoluzione del problema descritto in questo articolo. Applicarlo solo ai sistemi in cui si verificano questo problema specifico. Questo hotfix potrebbe essere sottoposto ad ulteriori test. Pertanto, se il problema non causa gravi difficoltà, consiglia di attendere il prossimo service pack di Microsoft Dynamics NAV 2009 o versione successiva di Microsoft Dynamics NAV contenente tale hotfix.
Nota: In casi particolari, le spese normalmente addebitate per le chiamate potrebbero essere annullate qualora un aggiornamento del supporto tecnico di Microsoft Dynamics e prodotti correlati di supporto determina che uno specifico aggiornamento risolverà il problema. I costi di supporto normale verranno applicati per eventuali ulteriori domande e problemi che non dovessero rientrare nello specifico aggiornamento in questione.
Informazioni sull'installazione
Microsoft fornisce esempi di programmazione a scopo puramente illustrativo, senza alcuna garanzia espressa o implicita. Ciò include, ma non limitato a, le garanzie implicite di commerciabilità o idoneità per uno scopo particolare. In questo articolo si presuppone che si abbia familiarità con il linguaggio di programmazione in questione e gli strumenti utilizzati per creare ed eseguire la procedura di debug. Tecnici del supporto Microsoft consentono di spiegare la funzionalità di una particolare procedura. Tuttavia, essi non modificherà questi esempi per fornire funzionalità aggiuntive o creare procedure atte a soddisfare specifiche esigenze.
Nota: Prima di installare questo hotfix, verificare che tutti gli utenti di client di Microsoft Dynamics NAV sono disconnessi dal sistema. Sono inclusi i servizi di Microsoft Dynamics NAV Application Server (NAS). Dovrebbe essere il solo l'utente client connesso quando si implementa questo hotfix.
Per implementare questo hotfix, è necessario disporre di una licenza di sviluppatore.
È consigliabile che l'account utente nella finestra Login Windows o Login Database assegnare l'ID di ruolo "SUPER". Se l'account utente non può essere assegnato l'ID ruolo "SUPER", è necessario verificare che l'account utente disponga delle autorizzazioni seguenti:
-
Autorizzazione alla modifica dell'oggetto che si desidera modificare.
-
L'autorizzazione di esecuzione per l'oggetto System Object ID 5210 e per il sistema oggetto ID 9015
oggetto.
Nota: Non è necessario disporre dei diritti per gli archivi dati a meno che non è necessario eseguire il ripristino di dati.
Modifiche al codice
Nota: Sempre il codice di test consente di correggere in un ambiente controllato prima di applicare le correzioni per i computer di produzione.
Per risolvere questo problema, attenersi alla seguente procedura:
-
Modificare il codice nelle proprietà del modulo Statistiche sollecito (437) come segue:
Codice esistente... 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
...Codice di sostituzione
... 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
... -
Modificare il codice nelle proprietà del modulo Statistiche sollecito (441) come segue:
Codice esistente...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
...Codice di sostituzione
...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
... -
Modificare il codice in 1 numero elemento dati nel Report Statistiche sollecito (117) come segue:
Codice esistente...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;
...Codice di sostituzione
... 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;
... -
Modificare il codice nelle sezioni 4 numero elemento dati nel Report Statistiche sollecito (117) come segue:
Codice esistente 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;
...Codice sostitutivo 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;
...Codice esistente 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;
...Codice di sostituzione 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;
... -
Modificare il codice in 1 numero elemento dati nel Report Statistiche sollecito (122) come segue:
Codice esistente...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;
...Codice di sostituzione
...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;
... -
Modificare il codice in 2 numero elemento dati nel Report Statistiche sollecito (122) come segue:
Codice esistente... }
{ 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
...Codice di sostituzione
...}
{ 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
... -
Modificare il codice di 3 numero elemento dati nel Report Statistiche sollecito (122) come segue:
Codice esistente...}
{ 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");
...Codice di sostituzione
...}
{ 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");
... -
Modificare il codice di 5 numero elemento dati nel Report Statistiche sollecito (122) come segue:
Codice esistente... }
{ 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
...Codice di sostituzione
...}
{ 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
... -
Modificare il codice nelle sezioni 5 numero elemento dati nel Report Statistiche sollecito (122) come segue:
Codice esistente 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;
...Codice sostitutivo 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;
...Codice esistente 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;
...Codice di sostituzione 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;
...
Prerequisiti
Deve avere uno dei seguenti prodotti per applicare questo hotfix:
-
Microsoft Dynamics NAV 2009 R2
-
Microsoft Dynamics NAV 2009 SP1
Informazioni sulla rimozione
Non è possibile rimuovere questo hotfix.
Stato
Microsoft ha confermato che questo è un problema dei prodotti Microsoft elencati nella sezione "Si applica a".
Nota: Si tratta di un articolo a "Pubblicazione Veloce" creato direttamente all'interno dell'organizzazione di supporto Microsoft. Le informazioni contenute nel presente documento sono fornite così come sono in risposta a problemi urgenti. Per la velocità in rendendo disponibili, i materiali possono includere errori tipografici e possono essere modificati in qualsiasi momento senza preavviso. Per altre considerazioni, vedere Condizioni di utilizzo.