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

In questo articolo si applica a Microsoft Dynamics NAV per tutti i paesi e tutte le lingue.

Sintomi

È possibile creare un ordine di vendita per un elemento non sia un'offerta di vendita in Microsoft Dynamics 2009 in modo imprevisto. Quando si registra l'ordine di vendita, viene visualizzato il seguente messaggio di errore:

Quantità fornite nell'ordine programmato associato non deve essere maggiore della quantità nel tipo di documento di vendita riga = 'Ordine di copertura','Numero1' Nr. di documento, Nr. riga ='numero2'.

Questo problema si verifica nei seguenti prodotti:

  • Microsoft Dynamics NAV 2009 Service Pack 1

  • Microsoft Dynamics NAV 2009 R2


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:

  1. Cambiare il codice nelle proprietà dell'offerta di vendita in ordine Codeunit (86) come segue:
    Codice esistente 1

    ...Opp@1004 : Record 5092;

    OpportunityEntry@1006 : Record 5093;

    TempOpportunityEntry@1005 : TEMPORARY Record 5093;

    Cust@1008 : Record 18;

    BEGIN

    TESTFIELD("Document Type","Document Type"::Quote);

    Cust.GET("Sell-to Customer No.");

    Cust.CheckBlockedCustOnDocs(Cust,"Document Type"::Order,TRUE,FALSE);
    ...

    Codice di sostituzione 2

    ...Opp@1004 : Record 5092;

    OpportunityEntry@1006 : Record 5093;

    TempOpportunityEntry@1005 : TEMPORARY Record 5093;

    Cust@1008 : Record 18;

    // Add the following line.
    Item@1010 : Record 27;
    // End of the added line.

    BEGIN

    TESTFIELD("Document Type","Document Type"::Quote);

    Cust.GET("Sell-to Customer No.");

    Cust.CheckBlockedCustOnDocs(Cust,"Document Type"::Order,TRUE,FALSE);
    ...

    Codice esistente 2

    ...SalesQuoteLine.SETRANGE(Type,SalesQuoteLine.Type::Item);

    SalesQuoteLine.SETFILTER("No.",'<>%1','');

    IF SalesQuoteLine.FINDSET THEN

    REPEAT

    IF (SalesQuoteLine."Outstanding Quantity" > 0) THEN BEGIN

    SalesLine := SalesQuoteLine;

    SalesLine.VALIDATE("Reserved Qty. (Base)",0);

    SalesLine."Line No." := 0;
    ...

    Codice di sostituzione 2

    ...SalesQuoteLine.SETRANGE(Type,SalesQuoteLine.Type::Item);

    SalesQuoteLine.SETFILTER("No.",'<>%1','');

    IF SalesQuoteLine.FINDSET THEN

    REPEAT

    IF Item.GET(SalesQuoteLine."No.") THEN //add line

    // Add the following line.
    Item.TESTFIELD(Blocked,FALSE);
    // End of the added line.

    IF (SalesQuoteLine."Outstanding Quantity" > 0) THEN BEGIN

    SalesLine := SalesQuoteLine;

    SalesLine.VALIDATE("Reserved Qty. (Base)",0);

    SalesLine."Line No." := 0;
    ...
  2. Cambiare il codice nelle proprietà dell'ordine di vendita programmato in ordine Codeunit (87) come segue:
    Codice esistente 1

    ...Cust@1001 : Record 18;

    TempSalesLine@1002 : TEMPORARY Record 37;

    Reservation@1005 : Form 498;

    PrepmtMgt@1004 : Codeunit 441;

    BEGIN

    TESTFIELD("Document Type","Document Type"::"Blanket Order");

    Cust.GET("Sell-to Customer No.");

    Cust.CheckBlockedCustOnDocs(Cust,"Document Type"::Order,TRUE,FALSE);
    ...

    Codice sostitutivo 1

    ...Cust@1001 : Record 18;

    TempSalesLine@1002 : TEMPORARY Record 37;

    Reservation@1005 : Form 498;

    PrepmtMgt@1004 : Codeunit 441;

    // Add the following line.
    Item@1006 : Record 27;
    // End of the added line.

    BEGIN

    TESTFIELD("Document Type","Document Type"::"Blanket Order");

    Cust.GET("Sell-to Customer No.");

    Cust.CheckBlockedCustOnDocs(Cust,"Document Type"::Order,TRUE,FALSE);
    ...

    Codice esistente 2

    ...SalesLine.SETRANGE("Blanket Order Line No.",BlanketOrderSalesLine."Line No.");

    QuantityOnOrders := 0;

    IF SalesLine.FINDSET THEN

    REPEAT

    IF SalesLine."Document Type" IN

    [SalesLine."Document Type"::"Return Order",

    SalesLine."Document Type"::"Credit Memo"]

    THEN
    ...

    Codice di sostituzione 2

    ...SalesLine.SETRANGE("Blanket Order Line No.",BlanketOrderSalesLine."Line No.");

    QuantityOnOrders := 0;

    IF SalesLine.FINDSET THEN

    REPEAT

    // Add the following lines.
    IF Item.GET(SalesLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    // End of the added lines.

    IF SalesLine."Document Type" IN

    [SalesLine."Document Type"::"Return Order",

    SalesLine."Document Type"::"Credit Memo"]

    THEN
    ...

    3 il codice esistente

    ...TempSalesLine.DELETEALL;

    REPEAT

    SalesLine.SETCURRENTKEY("Document Type","Blanket Order No.","Blanket Order Line No.");

    SalesLine.SETRANGE("Blanket Order No.",BlanketOrderSalesLine."Document No.");

    SalesLine.SETRANGE("Blanket Order Line No.",BlanketOrderSalesLine."Line No.");

    // Delete the following lines.

    SalesLine.SETFILTER(

    "Document Type",'<>%1 & <>%2',SalesLine."Document Type"::Invoice,SalesLine."Document Type"::"Credit Memo");

    // End of the deleted lines.

    QuantityOnOrders := 0;

    IF SalesLine.FINDSET THEN

    REPEAT

    IF Item.GET(SalesLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    ...

    Codice di sostituzione 3

    ...TempSalesLine.DELETEALL;

    REPEAT

    SalesLine.SETCURRENTKEY("Document Type","Blanket Order No.","Blanket Order Line No.");

    SalesLine.SETRANGE("Blanket Order No.",BlanketOrderSalesLine."Document No.");

    SalesLine.SETRANGE("Blanket Order Line No.",BlanketOrderSalesLine."Line No.");

    QuantityOnOrders := 0;

    IF SalesLine.FINDSET THEN

    REPEAT

    IF Item.GET(SalesLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    ...

    4 il codice esistente

    ...QuantityOnOrders := 0;

    IF SalesLine.FINDSET THEN

    REPEAT

    IF Item.GET(SalesLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);

    // Delete the following lines.
    IF SalesLine."Document Type" = SalesLine."Document Type"::"Return Order" THEN
    QuantityOnOrders := QuantityOnOrders - SalesLine."Outstanding Qty. (Base)"

    ELSE //Remove line

    QuantityOnOrders := QuantityOnOrders + SalesLine."Outstanding Qty. (Base)";
    // End of the deleted lines.

    UNTIL SalesLine.NEXT = 0;

    IF (ABS(BlanketOrderSalesLine."Qty. to Ship (Base)" + QuantityOnOrders +

    BlanketOrderSalesLine."Qty. Shipped (Base)") >

    ABS(BlanketOrderSalesLine."Quantity (Base)")) OR

    (BlanketOrderSalesLine."Quantity (Base)" * BlanketOrderSalesLine."Outstanding Qty. (Base)" < 0)
    ...

    Codice di sostituzione 4

    ...QuantityOnOrders := 0;

    IF SalesLine.FINDSET THEN

    REPEAT

    IF Item.GET(SalesLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);

    // Add the following lines.

    IF (SalesLine."Document Type" = SalesLine."Document Type"::"Return Order") OR

    ((SalesLine."Document Type" = SalesLine."Document Type"::"Credit Memo") AND

    (SalesLine."Return Receipt No." = ''))

    THEN

    QuantityOnOrders := QuantityOnOrders - SalesLine."Outstanding Qty. (Base)"

    ELSE

    IF (SalesLine."Document Type" = SalesLine."Document Type"::Order) OR

    ((SalesLine."Document Type" = SalesLine."Document Type"::Invoice) AND

    (SalesLine."Shipment No." = ''))

    THEN

    QuantityOnOrders := QuantityOnOrders + SalesLine."Outstanding Qty. (Base)";

    // End of the added lines.

    UNTIL SalesLine.NEXT = 0;

    IF (ABS(BlanketOrderSalesLine."Qty. to Ship (Base)" + QuantityOnOrders +

    BlanketOrderSalesLine."Qty. Shipped (Base)") >

    ABS(BlanketOrderSalesLine."Quantity (Base)")) OR

    (BlanketOrderSalesLine."Quantity (Base)" * BlanketOrderSalesLine."Outstanding Qty. (Base)" < 0)
    ...
  3. Modificare il codice nella proprietà Purch.-offerta a ordine Codeunit (96) come segue:
    Codice esistente 1

    ...OldPurchCommentLine@1001 : Record 43;

    FromDocDim@1000 : Record 357;

    ToDocDim@1003 : Record 357;

    Vend@1002 : Record 23;

    BEGIN

    TESTFIELD("Document Type","Document Type"::Quote);

    Vend.GET("Buy-from Vendor No.");

    Vend.CheckBlockedVendOnDocs(Vend,FALSE);
    ...

    Codice sostitutivo 1

    ...OldPurchCommentLine@1001 : Record 43;

    FromDocDim@1000 : Record 357;

    ToDocDim@1003 : Record 357;

    Vend@1002 : Record 23;

    // Add the following line.
    Item@1004 : Record 27;
    // End of the added line.

    BEGIN

    TESTFIELD("Document Type","Document Type"::Quote);

    Vend.GET("Buy-from Vendor No.");

    Vend.CheckBlockedVendOnDocs(Vend,FALSE);

    Codice esistente 2

    ...ToDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");



    IF PurchQuoteLine.FINDSET THEN

    REPEAT

    PurchOrderLine := PurchQuoteLine;

    PurchOrderLine."Document Type" := PurchOrderHeader."Document Type";

    PurchOrderLine."Document No." := PurchOrderHeader."No.";

    ReservePurchLine.TransferPurchLineToPurchLine(
    ...

    Codice di sostituzione 2

    ...ToDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");



    IF PurchQuoteLine.FINDSET THEN

    REPEAT

    // Add the following lines.
    IF Item.GET(PurchQuoteLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    // End of the added lines.

    PurchOrderLine := PurchQuoteLine;

    PurchOrderLine."Document Type" := PurchOrderHeader."Document Type";

    PurchOrderLine."Document No." := PurchOrderHeader."No.";

    ReservePurchLine.TransferPurchLineToPurchLine(
    ...
  4. Modificare il codice nella finestra delle proprietà nell'ordine di Acq. Ordine per ordine Codeunit (97) come segue:
    Codice esistente 1

    ...FromDocDim@1000 : Record 357;

    ToDocDim@1002 : Record 357;

    Vend@1001 : Record 23;

    PrepmtMgt@1003 : Codeunit 441;

    BEGIN

    TESTFIELD("Document Type","Document Type"::"Blanket Order");

    Vend.GET("Buy-from Vendor No.");

    Vend.CheckBlockedVendOnDocs(Vend,FALSE);
    ...

    Codice sostitutivo 1

    ...FromDocDim@1000 : Record 357;

    ToDocDim@1002 : Record 357;

    Vend@1001 : Record 23;

    PrepmtMgt@1003 : Codeunit 441;

    // Add the following line.
    Item@1004 : Record 27;
    // End of the added line.

    BEGIN

    TESTFIELD("Document Type","Document Type"::"Blanket Order");

    Vend.GET("Buy-from Vendor No.");

    Vend.CheckBlockedVendOnDocs(Vend,FALSE);
    ...

    Codice esistente 2

    ...PurchLine.SETRANGE("Blanket Order Line No.",PurchBlanketOrderLine."Line No.");

    QuantityOnOrders := 0;

    IF PurchLine.FINDSET THEN

    REPEAT

    IF PurchLine."Document Type" IN

    [PurchLine."Document Type"::"Return Order",

    PurchLine."Document Type"::"Credit Memo"] THEN

    QuantityOnOrders := QuantityOnOrders - PurchLine."Outstanding Qty. (Base)"
    ...

    Codice di sostituzione 2

    ...PurchLine.SETRANGE("Blanket Order Line No.",PurchBlanketOrderLine."Line No.");

    QuantityOnOrders := 0;

    IF PurchLine.FINDSET THEN

    REPEAT

    // Add the following lines.
    IF Item.GET(PurchLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    // End of the added lines.

    IF PurchLine."Document Type" IN

    [PurchLine."Document Type"::"Return Order",

    PurchLine."Document Type"::"Credit Memo"] THEN

    QuantityOnOrders := QuantityOnOrders - PurchLine."Outstanding Qty. (Base)"
    ...

    3 il codice esistente

    ...IF PurchBlanketOrderLine.FINDSET THEN

    REPEAT

    PurchLine.SETCURRENTKEY("Document Type","Blanket Order No.","Blanket Order Line No.");

    PurchLine.SETRANGE("Blanket Order No.",PurchBlanketOrderLine."Document No.");

    PurchLine.SETRANGE("Blanket Order Line No.",PurchBlanketOrderLine."Line No.");

    // Delete the following lines.

    PurchLine.SETFILTER(

    "Document Type",'<>%1 & <>%2',PurchLine."Document Type"::Invoice,PurchLine."Document Type"::"Credit Memo");

    // End of the deleted lines.

    QuantityOnOrders := 0;

    IF PurchLine.FINDSET THEN

    REPEAT

    IF Item.GET(PurchLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    ...

    Codice di sostituzione 3

    ...IF PurchBlanketOrderLine.FINDSET THEN

    REPEAT

    PurchLine.SETCURRENTKEY("Document Type","Blanket Order No.","Blanket Order Line No.");

    PurchLine.SETRANGE("Blanket Order No.",PurchBlanketOrderLine."Document No.");

    PurchLine.SETRANGE("Blanket Order Line No.",PurchBlanketOrderLine."Line No.");

    QuantityOnOrders := 0;

    IF PurchLine.FINDSET THEN

    REPEAT

    IF Item.GET(PurchLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);
    ...

    4 il codice esistente

    ...QuantityOnOrders := 0;

    IF PurchLine.FINDSET THEN

    REPEAT

    IF Item.GET(PurchLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);

    // Delete the following lines.

    IF PurchLine."Document Type" = PurchLine."Document Type"::"Return Order" THEN

    QuantityOnOrders := QuantityOnOrders - PurchLine."Outstanding Qty. (Base)"

    ELSE

    QuantityOnOrders := QuantityOnOrders + PurchLine."Outstanding Qty. (Base)";

    // End of the deleted lines.

    UNTIL PurchLine.NEXT = 0;

    IF (ABS(PurchBlanketOrderLine."Qty. to Receive (Base)" + QuantityOnOrders +

    PurchBlanketOrderLine."Qty. Received (Base)") >

    ABS(PurchBlanketOrderLine."Quantity (Base)")) OR

    (PurchBlanketOrderLine."Quantity (Base)" * PurchBlanketOrderLine."Outstanding Qty. (Base)" < 0)
    ...

    Codice di sostituzione 4

    ...QuantityOnOrders := 0;

    IF PurchLine.FINDSET THEN

    REPEAT

    IF Item.GET(PurchLine."No.") THEN

    Item.TESTFIELD(Blocked,FALSE);

    // Add the following lines.

    IF (PurchLine."Document Type" = PurchLine."Document Type"::"Return Order") OR

    ((PurchLine."Document Type" = PurchLine."Document Type"::"Credit Memo") AND

    (PurchLine."Return Shipment No." = ''))

    THEN

    QuantityOnOrders := QuantityOnOrders - PurchLine."Outstanding Qty. (Base)"

    ELSE

    IF (PurchLine."Document Type" = PurchLine."Document Type"::Order) OR

    ((PurchLine."Document Type" = PurchLine."Document Type"::Invoice) AND

    (PurchLine."Receipt No." = ''))

    THEN

    QuantityOnOrders := QuantityOnOrders + PurchLine."Outstanding Qty. (Base)";
    // End of the added lines.

    UNTIL PurchLine.NEXT = 0;

    IF (ABS(PurchBlanketOrderLine."Qty. to Receive (Base)" + QuantityOnOrders +

    PurchBlanketOrderLine."Qty. Received (Base)") >

    ABS(PurchBlanketOrderLine."Quantity (Base)")) OR

    (PurchBlanketOrderLine."Quantity (Base)" * PurchBlanketOrderLine."Outstanding Qty. (Base)" < 0)
    ...


Prerequisiti

È necessario avere il seguente aggiornamento e uno dei seguenti prodotti per applicare questo hotfix:

  • Microsoft Dynamics NAV 2009 Service Pack 1

  • Microsoft Dynamics NAV 2009 R2

  • 2642368 messaggio di errore "Qtà da spedire (Base) dell'elemento riga Nr. [riga numero] [Item_Number] non può essere superiore a [numero]" quando si tenta di creare un ordine da una copertura dell'ordine in Microsoft Dynamics NAV

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!

×