select DISTINCT a.ID as ID from StoreDocuments a join StoreDocuments2 d on a.ID=d.Parent_ID where a.documenttype = '28' and a.docdate$date <= :InDate and d.completeprices = 'N' and d.productiontask_id = :PT_ID
Generated by ABRA Software a.s. 27.10.2021 16:34:10