SELECT A.ID FROM StoreBatches A where A.StoreCard_ID = :StoreCard_ID and not exists (select 1 from StoreSubBatches B where B.StoreBatch_ID = A.ID and B.Store_ID = :Store_ID)
Generated by ABRA Software a.s. 27.10.2021 16:34:11