SELECT RO2.ID
FROM ReceivedOrders2 RO2
WHERE RO2.Parent_ID = :OBJID
AND (
RO2.RowType IN (0, 1)
OR (
RO2.RowType IN (2, 3)
AND (
RO2.Quantity > RO2.DeliveredQuantity
AND RO2.Quantity > 0
)
)
)Generated by ABRA Software a.s. 27.10.2021 16:34:11