...
DATABASE::"Prod. Order Line":
IF ProdOrderLine.GET(SourceSubType,SourceNo,SourceLineNo) THEN BEGIN
QtyOutstanding := ProdOrderLine."Remaining Quantity";
QtyBaseOutstanding := ProdOrderLine."Remaining Qty. (Base)";
END;
ELSE BEGIN
QtyOutstanding := 0;
QtyBaseOutstanding := 0;
END;
END;
...
...
DATABASE::"Prod. Order Line":
IF ProdOrderLine.GET(SourceSubType,SourceNo,SourceLineNo) THEN BEGIN
QtyOutstanding := ProdOrderLine."Remaining Quantity";
QtyBaseOutstanding := ProdOrderLine."Remaining Qty. (Base)";
END;
// Add the following lines.
DATABASE::"Kit Sales Line":
IF KitSalesLine.GET(SourceSubType,SourceNo,SourceLineNo,SourceSubLineNo) THEN BEGIN
QtyOutstanding := KitSalesLine."Outstanding Quantity";
QtyBaseOutstanding := KitSalesLine."Outstanding Qty. (Base)";
END;
// End of the lines.
ELSE BEGIN
QtyOutstanding := 0;
QtyBaseOutstanding := 0;
END;
END;
...