The quantity to invoice does not match the quantity defined in item tracking.
• The Quantity (Base) field
• The Quantity to Invoice field
• The Quantity Handled (Base) field
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.
To implement this hotfix, you must have a developer license.
• The Modify permission for the object that you will be changing.
• The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.
Note You do not have to have rights to the data stores unless you have to perform data repair.
IF ("Job No." <> '') THEN BEGIN
ItemJnlLine2."Entry Type" := ItemJnlLine2."Entry Type"::"Negative Adjmt.";
Job.GET("Job No.");
ItemJnlLine2."Source No." := Job."Bill-to Customer No.";
ItemJnlLine2."Source Type" := ItemJnlLine2."Source Type"::Customer;
ItemJnlLine2."Discount Amount" := 0;
IF (QtyToBeReceived <> 0) THEN BEGIN
// item tracking for consumption
ReservationEntry2.RESET;
IF ReservationEntry3.FIND('-') THEN BEGIN
IF ReservationEntry2.FIND('+') THEN
NextReservationEntryNo := ReservationEntry2."Entry No." + 1
ELSE
NextReservationEntryNo := 1;
REPEAT
ReservationEntry2 := ReservationEntry3;
ReservationEntry2."Entry No." := NextReservationEntryNo;
IF ReservationEntry2.Positive THEN
ReservationEntry2.Positive := FALSE
ELSE
ReservationEntry2.Positive := TRUE;
ReservationEntry2."Quantity (Base)" := ReservationEntry2."Quantity (Base)" * -1;
ReservationEntry2."Shipment Date" := ReservationEntry2."Expected Receipt Date";
ReservationEntry2."Expected Receipt Date" := 0D;
ReservationEntry2.Quantity := ReservationEntry2.Quantity * -1;
ReservationEntry2."Qty. to Handle (Base)" := ReservationEntry2."Qty. to Handle Base)" * -1;
ReservationEntry2."Qty. to Invoice (Base)" := ReservationEntry2."Qty. to Invoice (Base)" * -1;
ReservationEntry2.INSERT;
NextReservationEntryNo := NextReservationEntryNo + 1;
UNTIL ReservationEntry3.NEXT = 0;
IF (QtyToBeReceivedBase <> 0) THEN
IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN
ReservePurchLine.TransferPurchLineToItemJnlLine(PurchLine,ItemJnlLine2,QtyToBeReceivedBase,CheckApplToItemEntry)
ELSE
ReservePurchLine.TransferPurchLineToItemJnlLine(PurchLine,ItemJnlLine2,-QtyToBeReceivedBase,CheckApplToItemEntry);
END;
JobPostLine.GetStartItemLedgEntryNo;
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchRcptHeader,PurchLine,SrcCode,TempJnlLineDim);
END;
IF (QtyToBeInvoiced <> 0) AND (QtyToBeReceived = 0) THEN BEGIN
JobPostLine.GetNextItemLedgEntryNo(ItemJnlLine2);
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
END;
END;
IF ItemJnlPostLine.CollectTrackingSpecification(TempHandlingSpecification) THEN BEGIN
IF ItemJnlLine.Subcontracting THEN
TempHandlingSpecification.DELETEALL;
IF TempHandlingSpecification.FIND('-') THEN
REPEAT
TempTrackingSpecification := TempHandlingSpecification;
TempTrackingSpecification."Source Type" := DATABASE::"Purchase Line";
TempTrackingSpecification."Source Subtype" := "Document Type";
TempTrackingSpecification."Source ID" := "Document No.";
TempTrackingSpecification."Source Batch Name" := '';
TempTrackingSpecification."Source Prod. Order Line" := 0;
TempTrackingSpecification."Source Ref. No." := "Line No.";
IF TempTrackingSpecification.INSERT THEN;
IF QtyToBeInvoiced <> 0 THEN BEGIN
TempTrackingSpecificationInv := TempTrackingSpecification;
IF TempTrackingSpecificationInv.INSERT THEN;
END;
UNTIL TempHandlingSpecification.NEXT = 0;
END;
IF PostWhseJnlLine THEN BEGIN
...
Replacement code
...
ItemJnlPostLine.RunWithCheck(ItemJnlLine,TempJnlLineDim);
IF ItemJnlPostLine.CollectTrackingSpecification(TempHandlingSpecification) THEN BEGIN
IF ItemJnlLine.Subcontracting THEN
TempHandlingSpecification.DELETEALL;
IF TempHandlingSpecification.FIND('-') THEN
REPEAT
TempTrackingSpecification := TempHandlingSpecification;
TempTrackingSpecification."Source Type" := DATABASE::"Purchase Line";
TempTrackingSpecification."Source Subtype" := "Document Type";
TempTrackingSpecification."Source ID" := "Document No.";
TempTrackingSpecification."Source Batch Name" := '';
TempTrackingSpecification."Source Prod. Order Line" := 0;
TempTrackingSpecification."Source Ref. No." := "Line No.";
IF TempTrackingSpecification.INSERT THEN;
IF QtyToBeInvoiced <> 0 THEN BEGIN
TempTrackingSpecificationInv := TempTrackingSpecification;
IF TempTrackingSpecificationInv.INSERT THEN;
END;
UNTIL TempHandlingSpecification.NEXT = 0;
END;
IF ("Job No." <> '') THEN BEGIN
ItemJnlLine2."Entry Type" := ItemJnlLine2."Entry Type"::"Negative Adjmt.";
Job.GET("Job No.");
ItemJnlLine2."Source No." := Job."Bill-to Customer No.";
ItemJnlLine2."Source Type" := ItemJnlLine2."Source Type"::Customer;
ItemJnlLine2."Discount Amount" := 0;
IF (QtyToBeReceived <> 0) THEN BEGIN
// item tracking for consumption
ReservationEntry2.RESET;
IF ReservationEntry3.FIND('-') THEN BEGIN
IF ReservationEntry2.FIND('+') THEN
NextReservationEntryNo := ReservationEntry2."Entry No." + 1
ELSE
NextReservationEntryNo := 1;
REPEAT
ReservationEntry2 := ReservationEntry3;
ReservationEntry2."Entry No." := NextReservationEntryNo;
IF ReservationEntry2.Positive THEN
ReservationEntry2.Positive := FALSE
ELSE
ReservationEntry2.Positive := TRUE;
ReservationEntry2."Quantity (Base)" := ReservationEntry2."Quantity (Base)" * -1;
ReservationEntry2."Shipment Date" := ReservationEntry2."Expected Receipt Date";
ReservationEntry2."Expected Receipt Date" := 0D;
ReservationEntry2.Quantity := ReservationEntry2.Quantity * -1;
ReservationEntry2."Qty. to Handle (Base)" := ReservationEntry2."Qty. to Handle (Base)" * -1;
ReservationEntry2."Qty. to Invoice (Base)" := ReservationEntry2."Qty. to Invoice (Base)" * -1;
ReservationEntry2.INSERT;
NextReservationEntryNo := NextReservationEntryNo + 1;
UNTIL ReservationEntry3.NEXT = 0;
IF (QtyToBeReceivedBase <> 0) THEN
IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN
ReservePurchLine.TransferPurchLineToItemJnlLine(PurchLine,ItemJnlLine2,QtyToBeReceivedBase,CheckApplToItemEntry)
ELSE
ReservePurchLine.TransferPurchLineToItemJnlLine(PurchLine,ItemJnlLine2,-QtyToBeReceivedBase,CheckApplToItemEntry);
END;
JobPostLine.GetStartItemLedgEntryNo;
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchRcptHeader,PurchLine,SrcCode,TempJnlLineDim);
END;
IF (QtyToBeInvoiced <> 0) AND (QtyToBeReceived = 0) THEN BEGIN
JobPostLine.GetNextItemLedgEntryNo(ItemJnlLine2);
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
END;
END;
...