I am trying to write a script that would take a preset balance from the first day of the month and subtract a certain table until a zero balance is reached.
Then carry over the balance owed to the next business day, and so on until the balance is done.
Something like this:
@month, day (1) health_balance = 300
health_balance - chrg_tip_ttl = balance_owed
carry over balance_owed to health_balance
if health_balance_owed is > 300 then
minus chrg_tip_ttl
else if
balance_owed = 0 then
endif;
Any help appreciated