select PD.ID from POSDocuments PD join POSReceipts PR on PD.POSReceipt_ID = PR.ID where PD.Opened = 'N' and PD.IsPayChange = 'N' and PD.POSStation_ID = :POSStation_ID and (PD.SELLINGSTAND_ID is null) and (PD.POSSummaredDocument_ID is null) and PR.Stoped = 'N' order by PD.OrdNumber
Generated by ABRA Software a.s. 27.10.2021 16:34:30