Třídová akce

Kód:
15
Tělo:
SELECT {FIELDS}
 FROM SickBenefits2 A
 JOIN SickBenefits B ON B.ID = A.Parent_ID
 JOIN WorkingRelations W ON W.ID = B.WorkingRelation_ID
 WHERE B.WorkingRelation_ID = :WorkingRelation
  AND A.ROWTYPE IN (1,2)
  AND (
  ((A.PaidFrom$DATE <> 0) and (A.PaidFrom$DATE BETWEEN :DATEFROM and :DATETO)) OR
  ((A.PaidTo$DATE <> 0) and (A.PaidTo$DATE BETWEEN :DATEFROM and :DATETO)) OR
  ((A.PaidTo$DATE <> 0) and (A.PaidFrom$DATE <> 0) and (A.PaidFrom$DATE < :DATEFROM) and (A.PaidTo$DATE > :DATETO))
  )
  AND B.BASESICKTYPE IN ({SICKTYPE})
  AND {EXCLDAYS}
  AND {DELETEDINCLOSEDPERIOD}

Generated by ABRA Software a.s. 27.10.2021 16:34:36