...
IF PostWhseJnlLine THEN BEGIN
ItemTrackingMgt.SplitWhseJnlLine(TempWhseJnlLine,TempWhseJnlLine2,TempWhseTrackingSpecification,FALSE);
IF TempWhseJnlLine2.FIND('-') THEN
REPEAT
WhseJnlPostLine.RUN(TempWhseJnlLine2);
IF RevertWarehouseEntry(TempWhseJnlLine2,"Job No.",PostJobConsumptionBeforePurch) THEN
WhseJnlPostLine.RUN(TempWhseJnlLine2);
UNTIL TempWhseJnlLine2.NEXT = 0;
TempWhseTrackingSpecification.DELETEALL;
...
...
IF PostWhseJnlLine THEN BEGIN
ItemTrackingMgt.SplitWhseJnlLine(TempWhseJnlLine,TempWhseJnlLine2,TempWhseTrackingSpecification,FALSE);
IF TempWhseJnlLine2.FIND('-') THEN
REPEAT
// Add the following lines.
IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN
CreatePositiveEntry(TempWhseJnlLine2,"Job No.",PostJobConsumptionBeforePurch);
// End of the lines.
WhseJnlPostLine.RUN(TempWhseJnlLine2);
IF RevertWarehouseEntry(TempWhseJnlLine2,"Job No.",PostJobConsumptionBeforePurch) THEN
WhseJnlPostLine.RUN(TempWhseJnlLine2);
UNTIL TempWhseJnlLine2.NEXT = 0;
TempWhseTrackingSpecification.DELETEALL;
...