In some situations the rate you wish to charge for a session will depend upon how many other sessions of the same type are present in the week.
Examples of this include:
1) Queensland Kindy Funding Scheme (QKFS) where the centre directs some or all of the funding to cover attendance charges but the child must attend
2) Multi Session Discounting where a centre may provide the parent a discount to the session rate but only if the child attends at least 4 sessions in that week
To provide this capability we have provided session formulas that allow you to set the session charge based on whether a criteria has been met or not.
There a 2 pre-defined values provided for use in the formula
session_count : this is the number of sessions of that specific session code for that enrolment in that week base_rate : this is the applicable normal rate for that session code
If the child attends 3 or more sessions of Kindy in the week then I want to apply a $30/wk discount but spread evenly over all the sessions attended.
if (session_count > 2, base_rate - 30 / session_count, base_rate)
If the child attends 4 or 5 sessions in the week then apply a 10% discount otherwise charge the full fee.
if (session_count > 3, base_rate * 0.9 , base_rate)