The reconcile balance cron was introduced to handle the patrons accounting where debits and credits were out of line. After this cron was introduced, a system preference, AccountAutoReconcile, was created to allow libraries to reconcile patron balances automatically as they happened. I would argue that this cron can be eliminated as the system preference can do the same thing and it gives control to the library through the staff client vs a cron.
I am not sure if the cron would still be useful for people updating from earlier versions - allowing a 'clean-up' of data created before the pref was added. We could discuss moving it into a different directory then maybe - (maintenance?) Adding Tomas as the original author and linking to the original bug.
I agree this shouldn't be a cronjob anymore. This should belong to the maintenance scripts collection (even if AutoReconcile is on, there is no other tool that traverses all patrons and calls the reconcile_balance method on their behalf). For that reason, I would keep it, not as a cronjob, but keep it.
I have tried to patch this, but running the script, I get a fatal error: SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will emit the logically correct SQL instead of raising this exception) at /home/vagrant/kohaclone/Koha/Objects.pm line 210 Tomas, can you help?
Created attachment 102954 [details] [review] Bug 25146: Move reconcile_balances.pl script into maintenance directory This moves the reconcile_balances.pl script from the cronjobs to the maintenance directory. It's still useful if you want to start using AccountAutoReconcile to clean your data up at the beginning, but is not supposed to run regularly in cron. To test: - Verify the file has been moved - Run the script and verify it still works
Created attachment 102955 [details] [review] Bug 25146: Move reconcile_balances.pl script into maintenance directory This moves the reconcile_balances.pl script from the cronjobs to the maintenance directory. It's still useful if you want to start using AccountAutoReconcile to clean your data up at the beginning, but is not supposed to run regularly in cron. To test: - Verify the file has been moved - Run the script and verify it still works