Questo articolo si applica a Microsoft Dynamics NAV per le impostazioni locali della lingua portoghese (pt).
Sintomi
Quando si registra un giornale di registrazione di incassi con una fattura e una distinta di rifiuto contemporaneamente nella versione portoghese di Microsoft Dynamics NAV 2009, tutti i movimenti di contabilità generale registrati vengono registrati utilizzando il conto rifiuta fatture. Tuttavia, per la fattura è necessario utilizzare il conto clienti e il conto fatture rifiutate per il documento rifiutato. Questo problema si verifica nei prodotti seguenti:
- Versione portoghese di Microsoft Dynamics NAV 2009 R2
- Versione portoghese di Microsoft Dynamics NAV 2009 Service Pack 1
Risoluzione
Informazioni sull'aggiornamento rapido
È ora disponibile un hotfix supportato da Microsoft. Tuttavia, è destinato solo a correggere il problema descritto in questo articolo. Applicala solo ai sistemi che stanno riscontrando questo problema specifico. Questo hotfix potrebbe ricevere ulteriori test. Pertanto, se non sei gravemente interessato da questo problema, ti consigliamo di attendere il prossimo Service Pack di Microsoft Dynamics NAV 2009 o la prossima versione di Microsoft Dynamics NAV che contiene questo hotfix.
Nota In casi speciali, gli addebiti normalmente sostenuti per le chiamate al supporto tecnico possono essere annullati se un professionista del supporto tecnico per Microsoft Dynamics e i prodotti correlati determinano che un aggiornamento specifico risolverà il problema. I soliti costi del supporto verranno applicati a domande e problemi di supporto aggiuntivi che non sono idonei per l'aggiornamento specifico in questione.
Informazioni sull'installazione
Microsoft fornisce esempi di programmazione a titolo puramente illustrativo, senza alcuna garanzia espressa o implicita. Ciò include, a titolo esemplificativo e non esaustivo, le garanzie implicite di commerciabilità o idoneità a uno scopo particolare. Questo articolo presuppone che si abbia familiarità con il linguaggio di programmazione oggetto della dimostrazione e con gli strumenti utilizzati per la creazione e il debug delle procedure. I tecnici dell'assistenza Microsoft possono aiutare a spiegare la funzionalità di una particolare procedura. Tuttavia, non modificheranno questi esempi per fornire funzionalità aggiuntive o costruire procedure che soddisfino i vostri requisiti specifici.
Nota Prima di installare questo hotfix, verificare che tutti gli utenti client di Microsoft Navision siano disconnessi dal sistema. Sono inclusi gli utenti client di Microsoft Navision Application Services (NAS). Dovresti essere l'unico utente client connesso quando implementi questo hotfix.
Per implementare questo hotfix, è necessario disporre di una licenza per sviluppatori.
È consigliabile assegnare l'ID ruolo "SUPER" all'account utente nella finestra Accessi di Windows o nella finestra Accessi database. Se all'account utente non è possibile assegnare l'ID ruolo "SUPER", è necessario verificare che l'account utente disponga delle autorizzazioni seguenti:
- Autorizzazione modifica per l'oggetto che si desidera modificare.
- Autorizzazione Execute per l'oggetto System Object ID 5210 e per l'oggetto System Object ID 9015.
Nota: non è necessario disporre dei diritti per gli archivi dati a meno che non sia necessario eseguire il ripristino dei dati.
Modifiche al codice
Nota Verifica sempre le correzioni del codice in un ambiente controllato prima di applicare le correzioni ai computer di produzione.
Per risolvere il problema, modifica il codice nella generazione. Jnl.-Post Line codeunit (12) . A questo scopo, procedere come segue:
Aggiungere la seguente variabile globale:
TempRejCustLedgEntry@1100047 : TEMPORARY Record 21;Modificare il codice nella funzione PostCust nel modo seguente:
Codice esistente 1... DiscRiskFactAmountLCY := 0; DiscUnriskFactAmountLCY := 0; CollFactAmountLCY := 0; //-------- IF Cust."No." <> "Account No." THEN Cust.GET("Account No."); Cust.CheckBlockedCustOnJnls(Cust,"Document Type",TRUE); IF "Posting Group" = '' THEN BEGIN ...Codice di sostituzione 1
... DiscRiskFactAmountLCY := 0; DiscUnriskFactAmountLCY := 0; CollFactAmountLCY := 0; //-------- // Add the following lines. TempRejCustLedgEntry.RESET; TempRejCustLedgEntry.DELETEALL; // End of the lines. IF Cust."No." <> "Account No." THEN Cust.GET("Account No."); Cust.CheckBlockedCustOnJnls(Cust,"Document Type",TRUE); IF "Posting Group" = '' THEN BEGIN ...Codice esistente 2
... END; // Post the application ApplyCustLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine,GLSetup."Appln. Rounding Precision"); // Delete the following lines. IF GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::" " THEN GenJnlLine."Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreateReceivableDoc(GenJnlLine,CVLedgEntryBuf); CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; ...Codice di sostituzione 2
... END; // Post the application ApplyCustLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine,GLSetup."Appln. Rounding Precision"); // Add the following lines. IF ("Applies-to ID" = '') AND ("Applies-to Doc. Type" = "Applies-to Doc. Type"::" ") THEN "Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreateReceivableDoc(GenJnlLine,CVLedgEntryBuf); CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera; ...Modificare il codice nella funzione PostVend nel modo seguente:
Codice esistente... // Post the application ApplyVendLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine, GLSetup."Appln. Rounding Precision"); // Delete the following lines. IF GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::" " THEN GenJnlLine."Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreatePayableDoc(GenJnlLine,CVLedgEntryBuf); VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; ...Codice sostitutivo
... // Post the application ApplyVendLedgEntry( CVLedgEntryBuf,DtldCVLedgEntryBuf,GenJnlLine, GLSetup."Appln. Rounding Precision"); // Add the following lines. IF ("Applies-to ID" = '') AND ("Applies-to Doc. Type" = "Applies-to Doc. Type"::" ") THEN "Applies-to Doc. Type" := AppliesToDocType; // End of the lines. IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN IF "Document Type" = "Document Type"::Bill THEN BEGIN DocPost.CreatePayableDoc(GenJnlLine,CVLedgEntryBuf); VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera; ...Modificare il codice nella funzione ApplyCustLedgEntry nel modo seguente:
Codice esistente... OldCustLedgEntry."Document Situation"::"Closed Documents", OldCustLedgEntry."Document Situation"::"Closed BG/PO"]) THEN FromClosedDoc := TRUE ELSE FromClosedDoc := FALSE; DocPost.UpdateReceivableDoc( OldCustLedgEntry,GenJnlLine,AppliedAmountLCY + DeltaUnrealAmount + DeltaAmountLCY, DocAmountLCY,RejDocAmountLCY,DiscDocAmountLCY,CollDocAmountLCY, DiscRiskFactAmountLCY,DiscUnriskFactAmountLCY,CollFactAmountLCY); END; ...Codice sostitutivo
... OldCustLedgEntry."Document Situation"::"Closed Documents", OldCustLedgEntry."Document Situation"::"Closed BG/PO"]) THEN FromClosedDoc := TRUE ELSE FromClosedDoc := FALSE; // Add the following lines. IF OldCustLedgEntry."Document Status" = OldCustLedgEntry."Document Status"::Rejected THEN BEGIN TempRejCustLedgEntry := OldCustLedgEntry; TempRejCustLedgEntry."Remaining Amount (LCY) stats." := AppliedAmountLCY + DeltaUnrealAmount + DeltaAmountLCY; TempRejCustLedgEntry.INSERT; END; // End of the lines. DocPost.UpdateReceivableDoc( OldCustLedgEntry,GenJnlLine,AppliedAmountLCY + DeltaUnrealAmount + DeltaAmountLCY, DocAmountLCY,RejDocAmountLCY,DiscDocAmountLCY,CollDocAmountLCY, DiscRiskFactAmountLCY,DiscUnriskFactAmountLCY,CollFactAmountLCY); END; ...Modificare il codice nella funzione PostDtldCustLedgEntries come segue:
Codice esistente... AccNo := CustPostingGr."Bills Account"; END ELSE BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; // Delete the following lines. IF DiscDocAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Discted. Bills Acc."); AccNo := CustPostingGr."Discted. Bills Acc."; END; IF CollDocAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Bills on Collection Acc."); AccNo := CustPostingGr."Bills on Collection Acc."; END; IF RejDocAmountLCY <> 0 THEN BEGIN CASE GenJnlLine."Applies-to Doc. Type" OF GenJnlLine."Applies-to Doc. Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); AccNo := CustPostingGr."Rejected Bills Acc."; END; GenJnlLine."Applies-to Doc. Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); AccNo := CustPostingGr."Rejected Factoring Acc."; END; ELSE IF (GenJnlLine."Document Type" IN [GenJnlLine."Document Type"::"Credit Memo",GenJnlLine."Document Type"::Payment]) AND (OldCVLedgEntryBuf4."Applies-to ID" <> '') THEN BEGIN CASE OldCVLedgEntryBuf4."Document Type" OF OldCVLedgEntryBuf4."Document Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; OldCVLedgEntryBuf4."Document Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; END; END; END; END; IF (DiscRiskFactAmountLCY <> 0) OR (DiscUnriskFactAmountLCY <> 0) THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Discount Acc."); AccNo := CustPostingGr."Factoring for Discount Acc."; END; IF CollFactAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Collection Acc."); AccNo := CustPostingGr."Factoring for Collection Acc."; END; // End of the lines. ReceivableAccAmtLCY := TotalAmountLCY - (DocAmountLCY + DiscDocAmountLCY + CollDocAmountLCY + RejDocAmountLCY + DiscRiskFactAmountLCY + ...Codice sostitutivo
... AccNo := CustPostingGr."Bills Account"; END ELSE BEGIN CustPostingGr.TESTFIELD("Receivables Account"); AccNo := CustPostingGr."Receivables Account"; END; ReceivableAccAmtLCY := TotalAmountLCY - (DocAmountLCY + DiscDocAmountLCY + CollDocAmountLCY + RejDocAmountLCY + DiscRiskFactAmountLCY + ...Modificare il codice nella funzione PostReceivableDocs nel modo seguente:
Codice esistente... GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; IF RejDocAmountLCY <> 0 THEN BEGIN // Delete the following lines. CASE GenJnlLine."Applies-to Doc. Type" OF GenJnlLine."Applies-to Doc. Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); InitGLEntry(CustPostingGr."Rejected Bills Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; GenJnlLine."Applies-to Doc. Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); InitGLEntry(CustPostingGr."Rejected Factoring Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; ELSE IF (GenJnlLine."Document Type" IN [GenJnlLine."Document Type"::"Credit Memo",GenJnlLine."Document Type"::Payment]) AND (OldCVLedgEntryBuf4."Applies-to ID" <> '') THEN BEGIN CASE OldCVLedgEntryBuf4."Document Type" OF OldCVLedgEntryBuf4."Document Type"::Bill: BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); InitGLEntry(CustPostingGr."Rejected Bills Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; OldCVLedgEntryBuf4."Document Type"::Invoice: BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); InitGLEntry(CustPostingGr."Rejected Factoring Acc.",RejDocAmountLCY,DocAmtCalcAddCurrency(RejDocAmountLCY),TRUE,TRUE ); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; END; END; // End of the lines. END; END; IF DiscRiskFactAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Discount Acc."); InitGLEntry(CustPostingGr."Factoring for Discount Acc.", ...Codice sostitutivo
... GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; IF RejDocAmountLCY <> 0 THEN BEGIN // Add the following lines. WITH TempRejCustLedgEntry DO BEGIN RESET; SETCURRENTKEY("Customer No.","Document Type","Document Situation","Document Status"); SETRANGE("Document Type","Document Type"::Bill); CALCSUMS("Remaining Amount (LCY) stats."); IF "Remaining Amount (LCY) stats." <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Rejected Bills Acc."); InitGLEntry( CustPostingGr."Rejected Bills Acc.","Remaining Amount (LCY) stats.", DocAmtCalcAddCurrency("Remaining Amount (LCY) stats."),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; SETRANGE("Document Type","Document Type"::Invoice); CALCSUMS("Remaining Amount (LCY) stats."); IF "Remaining Amount (LCY) stats." <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Rejected Factoring Acc."); InitGLEntry( CustPostingGr."Rejected Factoring Acc.","Remaining Amount (LCY) stats.", DocAmtCalcAddCurrency("Remaining Amount (LCY) stats."),TRUE,TRUE); GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type"; GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No."; InsertGLEntry(TRUE); END; // End of the lines. END; END; IF DiscRiskFactAmountLCY <> 0 THEN BEGIN CustPostingGr.TESTFIELD("Factoring for Discount Acc."); InitGLEntry(CustPostingGr."Factoring for Discount Acc.", ...
Prerequisiti
Per applicare questo hotfix, è necessario che sia installato uno dei prodotti seguenti:
- Versione portoghese di Microsoft Dynamics NAV 2009 R2
- Versione portoghese di Microsoft Dynamics NAV 2009 Service Pack 1
Informazioni sulla rimozione
Non è possibile rimuovere questo hotfix.
Stato
Microsoft ha confermato che si tratta di un problema relativo ai prodotti elencati nella sezione "Si applica a".
Nota Questo è un articolo "FAST PUBLISH" creato direttamente dall'organizzazione di supporto Microsoft. Le informazioni contenute nel presente documento vengono fornite così come sono in risposta ai problemi emergenti. A causa della velocità di reso disponibile, i materiali possono includere errori tipografici e possono essere modificati in qualsiasi momento senza preavviso. Per altre considerazioni, vedere Condizioni per l'utilizzo .