Accrued vacation remaining
/* Courtesy MJ Brennan */
/* Employee Base */
(Select isnull(SUM(tunits),0.00) from AxTransaction
LEFT OUTER JOIN AxProject on tproject = prjkey
JOIN AxVEC on temployee = veckey
where veckey = [Employee Key]
and tiscurrent = 1
and tisDeleted = 0
and tpay = 12
and tdate between {STARTDATE} and {ENDDATE})
-
(Select isnull(SUM(tunits),0.00) from AxTransaction
JOIN AxProject on tproject = prjkey
JOIN AxVEC on temployee = veckey
where veckey = [Employee Key]
and tiscurrent = 1
and tisDeleted = 0
and tpay = 6
and tdate between {STARTDATE} and {ENDDATE})