select B.ID from PaymentOrders A, PaymentOrders2 B where A.ID = B.Parent_ID and A.DocDate$Date <= :DocDate and B.VarSymbol = :VarSymbol and B.Amount = :Amount and B.BankAccount_ID = :BankAccount_ID and B.Currency_ID = :Currency_ID and B.IsNotOK = 'N' and ((B.BDocument_ID is null) or (B.BDocument_ID = :BDocument_ID))
Generated by ABRA Software a.s. 27.10.2021 16:34:10