Accedi con Microsoft
Accedi o crea un account.
Salve,
Seleziona un altro account.
Hai più account
Scegli l'account con cui vuoi accedere.

Pagamenti in contanti per effetti riemessi devono essere dichiarati nell'anno della fattura originale e non in base all'anno dell'effetto ridisegnata nella dichiarazione 347 nella versione spagnola di Microsoft Dynamics NAV 2009. Questo problema si verifica nei seguenti prodotti:

  • La versione spagnola di Microsoft Dynamics NAV 2009 R2

  • La versione spagnola di Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

Causa

Questo problema si verifica perché la data corretta è tratto dall'esportazione dichiarazione 347 in caso di effetti riemessi

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 verificare sempre le correzioni di codice in un ambiente controllato prima di applicare le correzioni per i computer di produzione. Prima di applicare la modifica, importare tutti gli aggiornamenti SEPA.

Per risolvere questo problema, attenersi alla seguente procedura:

  1. Modificare il codice nella funzione IdentifyCashPayments nel rapporto di rendere dichiarazione 347 (10707) come segue:
    Codice esistente 1

    ...LOCAL PROCEDURE IdentifyCashPayments@1100010(CustomerNo@1100000 : Code[20];VATRegistrationNo@1100002 : Text[20]);
    VAR
    CustLedgerEntry@1100001 : Record 21;
    BEGIN
    // es0020.begin
    CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
    CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
    ...

    Codice sostitutivo 1

    ...LOCAL PROCEDURE IdentifyCashPayments@1100010(CustomerNo@1100000 : Code[20];VATRegistrationNo@1100002 : Text[20]);
    VAR
    CustLedgerEntry@1100001 : Record 21;

    // Add the following line.
    DocumentPostingDate@1170000000 : Date;

    BEGIN
    // es0020.begin
    CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
    CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
    ...

    Codice esistente 2

    ...CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
    CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
    CustLedgerEntry.SETRANGE("Customer No.",CustomerNo);

    // Delete the following lines.
    CustLedgerEntry.SETRANGE("Posting Date",FromDate,ToDate);
    IF CustLedgerEntry.FINDSET THEN
    REPEAT
    IF (CustLedgerEntry."Bal. Account Type" = CustLedgerEntry."Bal. Account Type"::"G/L Account") AND
    (CustLedgerEntry."Bal. Account No." <> '')
    THEN BEGIN
    IF IsCashAccount(CustLedgerEntry."Bal. Account No.") THEN
    CreateCashTotals(CustLedgerEntry."Entry No.",VATRegistrationNo);
    END ELSE
    IF ((CustLedgerEntry."Bal. Account No." = '') OR
    (CustLedgerEntry."Bal. Account Type" <> CustLedgerEntry."Bal. Account Type"::"G/L Account"))
    THEN BEGIN
    IF IdentifyCashPaymentsFromGL(CustLedgerEntry) THEN
    CreateCashTotals(CustLedgerEntry."Entry No.",VATRegistrationNo);
    END;
    // End of the deleted lines.

    UNTIL CustLedgerEntry.NEXT = 0;
    // es0020.end
    END;
    ...

    Codice di sostituzione 2

    ...CustLedgerEntry.SETCURRENTKEY("Document Type","Customer No.","Posting Date","Currency Code");
    CustLedgerEntry.SETRANGE("Document Type",CustLedgerEntry."Document Type"::Payment);
    CustLedgerEntry.SETRANGE("Customer No.",CustomerNo);

    // Add the following lines.
    // we need payments made in future.
    // CustLedgerEntry.SETRANGE("Posting Date",FromDate,ToDate);
    IF CustLedgerEntry.FINDSET THEN
    REPEAT
    DocumentPostingDate := GetPaymentDocumentPostingDate(CustLedgerEntry);
    IF (CheckCashTotalsPossibility(CustLedgerEntry,DocumentPostingDate)) THEN
    CreateCashTotals(CustLedgerEntry."Entry No.",VATRegistrationNo,DocumentPostingDate);
    // End of the added lines.

    UNTIL CustLedgerEntry.NEXT = 0;
    // es0020.end
    END;
    ...
  2. Modificare il codice nella funzione CreateCashTotals nel rapporto di rendere dichiarazione 347 (10707) come segue:
    Codice esistente 1

    ...UNTIL CustLedgerEntry.NEXT = 0;
    // es0020.end
    END;

    // Delete the following line.
    LOCAL PROCEDURE CreateCashTotals@2(CustLedgerEntryNo@1100000 : Integer;VATRegistrationNo@1100001 : Text[20]) : Boolean;

    VAR
    CustLedgerEntry@1100091 : Record 21;
    DtldCustLedgEntry@1100094 : Record 379;
    DtldCustLedgEntry2@1100095 : Record 379;
    ...

    Codice sostitutivo 1

    ...UNTIL CustLedgerEntry.NEXT = 0;
    // es0020.end
    END;

    // Add the following line.
    LOCAL PROCEDURE CreateCashTotals@2(CustLedgerEntryNo@1100000 : Integer;VATRegistrationNo@1100001 : Text[20];DocumentPostingDate@1170000000 : Date) : Boolean;

    VAR
    CustLedgerEntry@1100091 : Record 21;
    DtldCustLedgEntry@1100094 : Record 379;
    DtldCustLedgEntry2@1100095 : Record 379;
    ...

    Codice esistente 2

    ...THEN BEGIN
    IF CustLedgerEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No.") THEN
    UpdateCustomerCashBuffer(VATRegistrationNo,

    // Delete the following line.
    DATE2DMY(CustLedgerEntry."Posting Date",3),-(DtldCustLedgEntry2."Amount (LCY)"));

    END;
    UNTIL DtldCustLedgEntry2.NEXT = 0;
    END ELSE BEGIN
    ...

    Codice di sostituzione 2

    ...THEN BEGIN
    IF CustLedgerEntry.GET(DtldCustLedgEntry2."Cust. Ledger Entry No.") THEN
    UpdateCustomerCashBuffer(VATRegistrationNo,

    // Add the following line.
    DATE2DMY(DocumentPostingDate,3),-(DtldCustLedgEntry2."Amount (LCY)"));

    END;
    UNTIL DtldCustLedgEntry2.NEXT = 0;
    END ELSE BEGIN
    ...

    3 il codice esistente

    ...END ELSE BEGIN
    IF CustLedgerEntry.GET(DtldCustLedgEntry."Applied Cust. Ledger Entry No.") THEN
    UpdateCustomerCashBuffer(VATRegistrationNo,

    // Delete the following line.
    DATE2DMY(CustLedgerEntry."Posting Date",3),DtldCustLedgEntry."Amount (LCY)");

    END;
    UNTIL DtldCustLedgEntry.NEXT = 0;
    // es0020.end
    ...

    Codice di sostituzione 3

    ...END ELSE BEGIN
    IF CustLedgerEntry.GET(DtldCustLedgEntry."Applied Cust. Ledger Entry No.") THEN
    UpdateCustomerCashBuffer(VATRegistrationNo,

    // Add the following line.
    DATE2DMY(DocumentPostingDate,3),DtldCustLedgEntry."Amount (LCY)");

    END;
    UNTIL DtldCustLedgEntry.NEXT = 0;
    // es0020.end
    ...
  3. Modificare il codice nella funzione GetPaymentDocumentPostingDate nel rapporto di rendere dichiarazione 347 (10707) come segue:
    Codice esistente

    ...IF Vendor."Country/Region Code" = CountryCode THEN
    FromJournal := TRUE;
    END;
    ...

    Codice di sostituzione

    ...IF Vendor."Country/Region Code" = CountryCode THEN
    FromJournal := TRUE;
    END;

    // Add the following lines.
    LOCAL PROCEDURE GetPaymentDocumentPostingDate@1170000000(CustLedgerEntry@1170000000 : Record 21) PostingDate : Date;
    VAR
    CustLedgerEntryRelated@1170000001 : Record 21;
    BEGIN
    WITH CustLedgerEntry DO BEGIN;
    TESTFIELD("Document Type","Document Type"::Payment);
    PostingDate := "Posting Date";
    END;

    // If payment for Bill then we need get Posting Date of the Document related to the Bill
    WITH CustLedgerEntryRelated DO BEGIN
    SETRANGE("Closed by Entry No.",CustLedgerEntry."Entry No.");
    SETRANGE("Document Type","Document Type"::Bill);
    IF FINDFIRST THEN BEGIN
    RESET;
    SETRANGE("Document No.","Document No.");
    SETFILTER("Document Type",'%1|%2',"Document Type"::Invoice,"Document Type"::"Credit Memo");
    FINDFIRST;
    PostingDate := "Posting Date";
    END
    END;

    EXIT(PostingDate);
    END;

    PROCEDURE CheckCashTotalsPossibility@1170000008(CustLedgerEntry@1170000000 : Record 21;DocumentPostingDate@1170000001 : Date) : Boolean;
    BEGIN
    IF (DocumentPostingDate < FromDate) OR (DocumentPostingDate > ToDate) THEN
    EXIT(FALSE);

    WITH CustLedgerEntry DO
    IF ("Bal. Account Type" = "Bal. Account Type"::"G/L Account") AND ("Bal. Account No." <> '') THEN BEGIN
    IF IsCashAccount("Bal. Account No.") THEN
    EXIT(TRUE);
    END ELSE
    IF ("Bal. Account No." = '') OR ("Bal. Account Type" <> "Bal. Account Type"::"G/L Account") THEN
    IF IdentifyCashPaymentsFromGL(CustLedgerEntry) THEN
    EXIT(TRUE);

    EXIT(FALSE);
    END;
    // End of the added lines.
    ...


Prerequisiti

Deve avere uno dei seguenti prodotti per applicare questo hotfix:

  • La versione spagnola di Microsoft Dynamics NAV 2009 R2

  • La versione spagnola di 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.

Serve aiuto?

Vuoi altre opzioni?

Esplorare i vantaggi dell'abbonamento e i corsi di formazione, scoprire come proteggere il dispositivo e molto altro ancora.

Le community aiutano a porre e a rispondere alle domande, a fornire feedback e ad ascoltare gli esperti con approfondite conoscenze.

Queste informazioni sono risultate utili?

Come valuti la qualità della lingua?
Cosa ha influito sulla tua esperienza?
Premendo Inviare, il tuo feedback verrà usato per migliorare i prodotti e i servizi Microsoft. L'amministratore IT potrà raccogliere questi dati. Informativa sulla privacy.

Grazie per il feedback!

×