...
RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
ReturnRcptLine."Quantity Invoiced" :=
ReturnRcptLine."Quantity Invoiced" + QtyToBeInvoiced;
ReturnRcptLine."Qty. Invoiced (Base)" :=
ReturnRcptLine."Qty. Invoiced (Base)" + QtyToBeInvoicedBase;
ReturnRcptLine."Return Qty. Rcd. Not Invd." :=
ReturnRcptLine.Quantity - ReturnRcptLine."Quantity Invoiced";
ReturnRcptLine.MODIFY;
IF SalesLine.Type = SalesLine.Type::Item THEN
PostItemJnlLine(
SalesLine,
0,0,
QtyToBeInvoiced,
QtyToBeInvoicedBase,
// Delete the following line.
{ReturnRcptLine."Item Rcpt. Entry No."}
ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
IF TrackingSpecificationExists THEN
EndLoop := (TempInvoicingSpecification.NEXT = 0)
ELSE
EndLoop :=
(ReturnRcptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Return Qty. to Receive"));
UNTIL EndLoop;
END ELSE
ERROR(
Text025,
SalesLine."Return Receipt Line No.",SalesLine."Return Receipt No.");
END;
...
...
RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
ReturnRcptLine."Quantity Invoiced" :=
ReturnRcptLine."Quantity Invoiced" + QtyToBeInvoiced;
ReturnRcptLine."Qty. Invoiced (Base)" :=
ReturnRcptLine."Qty. Invoiced (Base)" + QtyToBeInvoicedBase;
ReturnRcptLine."Return Qty. Rcd. Not Invd." :=
ReturnRcptLine.Quantity - ReturnRcptLine."Quantity Invoiced";
ReturnRcptLine.MODIFY;
IF SalesLine.Type = SalesLine.Type::Item THEN
PostItemJnlLine(
SalesLine,
0,0,
QtyToBeInvoiced,
QtyToBeInvoicedBase,
ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
IF TrackingSpecificationExists THEN
EndLoop := (TempInvoicingSpecification.NEXT = 0)
ELSE
EndLoop :=
(ReturnRcptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Return Qty. to Receive"));
UNTIL EndLoop;
END ELSE
ERROR(
Text025,
SalesLine."Return Receipt Line No.",SalesLine."Return Receipt No.");
END;
...
...
RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
SalesShptLine."Quantity Invoiced" :=
SalesShptLine."Quantity Invoiced" - QtyToBeInvoiced;
SalesShptLine."Qty. Invoiced (Base)" :=
SalesShptLine."Qty. Invoiced (Base)" - QtyToBeInvoicedBase;
SalesShptLine."Qty. Shipped Not Invoiced" :=
SalesShptLine.Quantity - SalesShptLine."Quantity Invoiced";
SalesShptLine.MODIFY;
IF SalesLine.Type = SalesLine.Type::Item THEN
PostItemJnlLine(
SalesLine,
0,0,
QtyToBeInvoiced,
QtyToBeInvoicedBase,
// Delete the following line.
{SalesShptLine."Item Shpt. Entry No."}
ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
IF TrackingSpecificationExists THEN
EndLoop := (TempInvoicingSpecification.NEXT = 0)
ELSE
EndLoop :=
(SalesShptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Qty. to Ship"))
UNTIL EndLoop;
END ELSE
ERROR(
Text026,
SalesLine."Shipment Line No.",SalesLine."Shipment No.");
END;
...
RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
SalesShptLine."Quantity Invoiced" :=
SalesShptLine."Quantity Invoiced" - QtyToBeInvoiced;
SalesShptLine."Qty. Invoiced (Base)" :=
SalesShptLine."Qty. Invoiced (Base)" - QtyToBeInvoicedBase;
SalesShptLine."Qty. Shipped Not Invoiced" :=
SalesShptLine.Quantity - SalesShptLine."Quantity Invoiced";
SalesShptLine.MODIFY;
IF SalesLine.Type = SalesLine.Type::Item THEN
PostItemJnlLine(
SalesLine,
0,0,
QtyToBeInvoiced,
QtyToBeInvoicedBase,
ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
IF TrackingSpecificationExists THEN
EndLoop := (TempInvoicingSpecification.NEXT = 0)
ELSE
EndLoop :=
(SalesShptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Qty. to Ship"))
UNTIL EndLoop;
END ELSE
ERROR(
Text026,
SalesLine."Shipment Line No.",SalesLine."Shipment No.");
END;
...