Hello Chadwick,
I created a relatively quick and simple library for you and uploaded it to Memento 'Catalog Templates'. It is called 'CS-ATO Tracker' so you can perform a search for it (or open by url within catalog templates
http://libs.mobi/t/5450512195387392) . I don't have any experience using triggers or javascript within Memento so the library is quite elementary, but it might help point you in the right direction. The intention of this library is that you would enter your work status on a daily basis.
You will notice the running total of ATO days available at the bottom of the list of entries (where aggregation is displayed when specified). I thought it would also be useful for aggregation to the total of days worked, days off, and the number of ATO's you've sold.
The library was created on the assumption that when you work a full day, you earn a full ATO day, and when you have a day-off you use a full ATO day. Furthermore, within any given work day or day-off, you can sell an ATO day.
I used a couple of dependencies to reveal the fields of input to you depending on the status of your day (I use dependencies a lot to give a 'faux-app' sort of feel to inputting data). Obviously feel free to modify the library as you see fit for your needs in terms of complexity of data you need to capture.
Monte