1. Dan Connolly
  2. hh-office

Commits

Dan Connolly  committed f508a56

use batch cutoff for income report

  • Participants
  • Parent commits c98c413
  • Branches etree26

Comments (0)

Files changed (1)

File templates/income_by_therapist.html

View file
   join `Session` sn on vt.Session_id = sn.id
   join `Group` gp on sn.Group_id = gp.id
   join Therapist th on sn.Therapist_id = th.id
-where sn.session_date > last_day(current_date + interval -60 day)
+where sn.session_date > where c.recent >= (
+ select cutoff from Batch
+ where name = 'income')
 group by
  year(sn.session_date), month(sn.session_date),
  sn.session_date, sn.id, th.id, th.name