select A.ID from PaymentOrders2 A where A.BDocument_ID = :OBJID and A.IsNotOK = 'N'
Generated by ABRA Software a.s. 27.10.2021 16:34:08