...
END;
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
IF (QtyToBeInvoiced <> 0) THEN BEGIN
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchLine,SrcCode,TempJnlLineDim);
END;
END;
END;
END;
...
...
END;
ItemJnlPostLine.RunWithCheck(ItemJnlLine2,TempJnlLineDim);
IF (QtyToBeInvoiced <> 0) THEN BEGIN
// Add the following line.
Item.GET("No.");
IF Item."No Stockkeeping" THEN BEGIN
PurchLine2 := PurchLine;
PurchLine2."Qty. to Invoice" := QtyToBeInvoiced;
PurchLine2."Qty. to Invoice (Base)" := QtyToBeInvoicedBase;
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchLine2,SrcCode,TempJnlLineDim);
END ELSE
// End of the lines.
JobPostLine.InsertPurchLine(PurchHeader,PurchInvHeader,PurchCrMemoHeader,PurchLine,SrcCode,TempJnlLineDim);
END;
END;
END;
END;
...