Well you may try to store Total Months days as a value in constant table like below where constant values are actually total days in a month
And call the constant in your rule as below, I have used the time type YA01 which is 0933 in your case. Then used ZAJUN constant for comparing if the current date is 30th June and matches with etc then check the following and make time type YA01 as zero. You need to create it for all 12 months like it did it for 06(june) and 07 (july) ....
This rule will read the month and then compare the date on 06/30/2014 with the constant. The time type YA01 have all accumulated hrs in SALDO table on 06/30/2014 and on 07/01/2014 the YA01 will be blank for further use. Hope this works for you.
Thx
Ashish