Bookkeeping
Logic
When bookkeeping is crashing for one reason or another. It gets to a point where some data has been handled but some other hasnt.
if something important for a customer is missed we would like to be able to run book keeping again to fix that issue.
However, when bookkeeping runs more than once for the same day. duplicates of data can happen.
Classes and Objects
A job tracker class where a new object is created in the top of book keeping and updated at each stage.
Column | type | Usage |
---|---|---|
id | int | Primary key |
job | string | Identifier for which job it is. |
stage | int | Identifier for how far it has gotten |
When running the Script again. steps which has been finished should be skipped in next run. Shortening the time and preventing double data.
Part of bookkeeping
A list of all parts of bookkeeping and which functions are used.
All parts will need rework to properly work in the past dates. Some are safe to run and some outright give bad data at the moment if run for the past dates. Some even sends mails to people that was sent already.
Title | Function | Handles dates? | Handles other dates? | Current Consequences of running in the past. |
---|---|---|---|---|
Migration | Check if database is up-to-date and dirs are created. | No | No | No harm |
Inform Thy leaders | Platform gathering stats if such a contract exists! | Yes | No | No harm |
Handle Expiration | Handles expiration of customers, person, users, project, project2 | Yes, but looks safe. | No | No harm |
CustomerSubscription | Handles expiration and bookkeeping of customer subscriptions. | Yes | No | Maybe bad data. |
Plan all on date | Adds future plans on a specific date in the future. | Yes | No | If missed missing data. |
Lock Workplan | Lock the workplan down by burning todays registrations | Yes | No | is missed. old data is stacking up. |
Auto Invoice Customer | Handles customerinvoices. | Yes | No | Maybe bad data. |
Sync | Handles sync objects | No | No | No harm |
Transactions | Post transactions | Yes | No | Maybe bad data. |
Run Automatic Transactions | Checks account transactions on the date and runs them. | Yes | No | Bad data if missed. |
Project Deadlines | Check if deadline has passed | Yes | No | Maybe bad data. |
Redo changed todos invoices | Update the 'pendinginvoicing' flag for all tasks | No | No | Not needed to run in the past. |
Auto Start Todos | Start all todos that isn't started and where start date is today | Yes | No | Bad data if missed. |
Check Deadline | Check if we've passed the deadline of any task | Yes | No | Bad data if missed. |
Temperature checks | Do a temperature update for all todos. | Yes, but should only run on todays date. Any previous run will give a nicer temperature than we need on the date. | No | Should not be called with previous days in mind. |
Action Handling | Create Tasks Via past actions | Only relevant to run on at latest date. | No | Should not be called with previous days in mind. |
Planahead | Do a global planahead for all existing repeating todos. | Might actually handle old dates info aswell as the new. | Yes | Should not be called with previous days in mind. |
Workpool processing | Process all workpools | Yes | No | Maybe bad data. |
Request forms | Go through all projects and milestones and process wether a questionobject assignment should be created. | Yes | No | Maybe bad data. |
Invoice handling of todos | auto invoices | No | No | Should not be called with previous days in mind. |
Notify on todos. | The day before a todo has a deadline notify by email. | Yes | No | Should not be called with previous days in mind.
Would give expired emails. confuse customers and their customers. |
Force app to download todos | Updates changedate and changetime to now | Yes | No | No harm |
Send premails | CourseTemplateLesson is updated and emails are sent. | Yes | No | Would give expired emails. confuse customers and their customers. |
Expire passwords mail | Send warning mail of expired passwords. | No | No | No harm |
Sales Alerts | Processing sales alerts. By sending mails. | Yes | No | Will send alert mails. |
Open day | Opens the registrations and registrationplan for certain users on the date | Yes | No | Should not run with past days in mind. |
Automatic registrations | Create registrations from plans | Yes | Can do | Small change would let this one be handle past dates. |
Auto close | close and approve past dates | Yes | No | Bad data if missed. |
Project Checkpoint | Check if dealines has passed and send mails. | Yes | No | Bad data if missed. |
Start projects. | Check if project is ready to advance then advance. | Yes | No | No harm |
Advance Inspectschedule | Advances information for the inspecschedule of today and before. | Yes | Yes | No harm |
Escase expire | Expire warnings | Yes | No | No harm |
Maintain tool | Expire old data and List current | Yes | Not completely. | No harm, just run for today. |
Close tickets | Tickets which has been in a state for a week is automatically closed. | Yes | No | No harm, just run for today. |
Stodo Handling | Delete old notifications, create new for those which needs new | No | No | No Harm |
Handle Warnings | Deletes old data Handles calls Trigger updates in various objects
| Yes | Not completely. | Handle calls part will create object information based on today. Changing this could give failed data. but not doing anything will also give failed data, |
Cleanup | Cleans Record2Export: delete old files. Mailqueue: Delete old mailqueues FilterExport: Cleanup temp files Logprofile: Delete old data. Log: delete old logs.
| Yes | No | No harm. |