Description
Tomás Cohen Arazi (tcohen)
2018-11-29 16:33:03 UTC
Created attachment 82762 [details] [review] Bug 21915: Add AccountAutoReconciliate syspref This syspref will be used to call the reconcile_balance routing as needed. Created attachment 82763 [details] [review] Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call This patch makes _FixAccountForLostAndReturned reconcile the patron's account balance, when the AccountAutoReconcile syspref is set. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Circulation.t => SUCCESS: Tests pass, peace \o/ - Sign off :-D Sponsored-by: ByWater Solutions Created attachment 82764 [details] [review] Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call This patch makes _FixAccountForLostAndReturned reconcile the patron's account balance, when the AccountAutoReconcile syspref is set. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Circulation.t => SUCCESS: Tests pass, peace \o/ - Sign off :-D Sponsored-by: ByWater Solutions Created attachment 82765 [details] [review] Bug 21915: Add AccountAutoReconciliate syspref This syspref will be used to call the reconcile_balance routing as needed. Created attachment 82781 [details] [review] Bug 21915: Call reconcile_balance on manual invoice creation This patch makes the manual invoice creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding credit - Create a manual invoice => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual invoice => SUCCESS: Reconcillation happened - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 82782 [details] [review] Bug 21915: Call reconcile_balance on manual credit creation This patch makes the manual credit creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding debits - Create a manual credit => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual credit => SUCCESS: Reconcillation happened - Sign off :-D Created attachment 82784 [details] [review] Bug 21915: Add a cli script to reconcile balances This patch adds a CLI script, reconcile_balances.pl that takes care of calling the reconcile operation for all patrons that have outstanding credits. To test: - Have patrons with outstanding credits and debits - Run the script: $ kshell k$ perl misc/cronjobs/reconcile_balances.pl --verbose => SUCCESS: Notice patrons got their balances reconciled, and useful information is output. - Add new outstanding credits and debits to patrons you con easily identify - Run: k$ perl misc/cronjobs/reconcile_balances.pl => SUCCESS: Notice balances are reconciled, but no output - Run: k$ perl misc/cronjobs/reconcile_balances.pl --help => SUCCESS: Usage information is printed. - Sign off :-D Created attachment 82789 [details] [review] Bug 21915: Add AccountAutoReconcile syspref This syspref will be used to call the reconcile_balance routing as needed. Created attachment 82790 [details] [review] Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call This patch makes _FixAccountForLostAndReturned reconcile the patron's account balance, when the AccountAutoReconcile syspref is set. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Circulation.t => SUCCESS: Tests pass, peace \o/ - Sign off :-D Sponsored-by: ByWater Solutions Created attachment 82791 [details] [review] Bug 21915: Call reconcile_balance on manual invoice creation This patch makes the manual invoice creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding credit - Create a manual invoice => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual invoice => SUCCESS: Reconcillation happened - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 82792 [details] [review] Bug 21915: Call reconcile_balance on manual credit creation This patch makes the manual credit creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding debits - Create a manual credit => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual credit => SUCCESS: Reconcillation happened - Sign off :-D Created attachment 82793 [details] [review] Bug 21915: Add a cli script to reconcile balances This patch adds a CLI script, reconcile_balances.pl that takes care of calling the reconcile operation for all patrons that have outstanding credits. To test: - Have patrons with outstanding credits and debits - Run the script: $ kshell k$ perl misc/cronjobs/reconcile_balances.pl --verbose => SUCCESS: Notice patrons got their balances reconciled, and useful information is output. - Add new outstanding credits and debits to patrons you con easily identify - Run: k$ perl misc/cronjobs/reconcile_balances.pl => SUCCESS: Notice balances are reconciled, but no output - Run: k$ perl misc/cronjobs/reconcile_balances.pl --help => SUCCESS: Usage information is printed. - Sign off :-D Created attachment 82803 [details] [review] Bug 21915: Add AccountAutoReconcile syspref This syspref will be used to call the reconcile_balance routing as needed. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82804 [details] [review] Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call This patch makes _FixAccountForLostAndReturned reconcile the patron's account balance, when the AccountAutoReconcile syspref is set. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Circulation.t => SUCCESS: Tests pass, peace \o/ - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82805 [details] [review] Bug 21915: Call reconcile_balance on manual invoice creation This patch makes the manual invoice creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding credit - Create a manual invoice => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual invoice => SUCCESS: Reconcillation happened - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82806 [details] [review] Bug 21915: Call reconcile_balance on manual credit creation This patch makes the manual credit creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding debits - Create a manual credit => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual credit => SUCCESS: Reconcillation happened - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82807 [details] [review] Bug 21915: Add a cli script to reconcile balances This patch adds a CLI script, reconcile_balances.pl that takes care of calling the reconcile operation for all patrons that have outstanding credits. To test: - Have patrons with outstanding credits and debits - Run the script: $ kshell k$ perl misc/cronjobs/reconcile_balances.pl --verbose => SUCCESS: Notice patrons got their balances reconciled, and useful information is output. - Add new outstanding credits and debits to patrons you con easily identify - Run: k$ perl misc/cronjobs/reconcile_balances.pl => SUCCESS: Notice balances are reconciled, but no output - Run: k$ perl misc/cronjobs/reconcile_balances.pl --help => SUCCESS: Usage information is printed. - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82863 [details] [review] Bug 21915: Add AccountAutoReconcile syspref This syspref will be used to call the reconcile_balance routing as needed. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82864 [details] [review] Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call This patch makes _FixAccountForLostAndReturned reconcile the patron's account balance, when the AccountAutoReconcile syspref is set. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Circulation.t => SUCCESS: Tests pass, peace \o/ - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82865 [details] [review] Bug 21915: Call reconcile_balance on manual invoice creation This patch makes the manual invoice creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding credit - Create a manual invoice => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual invoice => SUCCESS: Reconcillation happened - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82866 [details] [review] Bug 21915: Call reconcile_balance on manual credit creation This patch makes the manual credit creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding debits - Create a manual credit => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual credit => SUCCESS: Reconcillation happened - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 82867 [details] [review] Bug 21915: Add a cli script to reconcile balances This patch adds a CLI script, reconcile_balances.pl that takes care of calling the reconcile operation for all patrons that have outstanding credits. A weird situation has been spotted in the wild, in which a debit ends up actually being a credit, because amount outstanding is tweaked in dropbox-mode returns. Until we figure what to do about that (probably a new account type, etc), we catch any exceptions and warn about the situation. To test: - Have patrons with outstanding credits and debits - Run the script: $ kshell k$ perl misc/cronjobs/reconcile_balances.pl --verbose => SUCCESS: Notice patrons got their balances reconciled, and useful information is output. - Add new outstanding credits and debits to patrons you con easily identify - Run: k$ perl misc/cronjobs/reconcile_balances.pl => SUCCESS: Notice balances are reconciled, but no output - Run: k$ perl misc/cronjobs/reconcile_balances.pl --help => SUCCESS: Usage information is printed. - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> I've added bug 21969 as dependency, because some pathological use cases considered debits as credits. Those cases are explained in bug 14591, and should be dealt with on a separate bug report. Created attachment 83053 [details] [review] Bug 21915: Add AccountAutoReconcile syspref This syspref will be used to call the reconcile_balance routing as needed. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 83062 [details] [review] Bug 21915: Add AccountAutoReconcile syspref This syspref will be used to call the reconcile_balance routing as needed. Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 83063 [details] [review] Bug 21915: Reconcile balance on _FixAccountForLostAndReturned call This patch makes _FixAccountForLostAndReturned reconcile the patron's account balance, when the AccountAutoReconcile syspref is set. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Circulation.t => SUCCESS: Tests pass, peace \o/ - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 83064 [details] [review] Bug 21915: Call reconcile_balance on manual invoice creation This patch makes the manual invoice creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding credit - Create a manual invoice => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual invoice => SUCCESS: Reconcillation happened - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 83065 [details] [review] Bug 21915: Call reconcile_balance on manual credit creation This patch makes the manual credit creation step call Koha::Account::reconcile_balance when the AccountAutoReconcile syspref is set. To test: - Apply the patch - Have some outstanding debits - Create a manual credit => SUCCESS: Same behaviour as always - Set AccountAutoReconcile - Create a manual credit => SUCCESS: Reconcillation happened - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 83066 [details] [review] Bug 21915: Add a cli script to reconcile balances This patch adds a CLI script, reconcile_balances.pl that takes care of calling the reconcile operation for all patrons that have outstanding credits. A weird situation has been spotted in the wild, in which a debit ends up actually being a credit, because amount outstanding is tweaked in dropbox-mode returns. Until we figure what to do about that (probably a new account type, etc), we catch any exceptions and warn about the situation. To test: - Have patrons with outstanding credits and debits - Run the script: $ kshell k$ perl misc/cronjobs/reconcile_balances.pl --verbose => SUCCESS: Notice patrons got their balances reconciled, and useful information is output. - Add new outstanding credits and debits to patrons you con easily identify - Run: k$ perl misc/cronjobs/reconcile_balances.pl => SUCCESS: Notice balances are reconciled, but no output - Run: k$ perl misc/cronjobs/reconcile_balances.pl --help => SUCCESS: Usage information is printed. - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Minor rebase during QA was required... All tests pass, qa scripts pass and the code looks solid.. I could not find any regressions and I could not think of anywhere that we may have missed. Passing QA *** Bug 18580 has been marked as a duplicate of this bug. *** Awesome work all! Pushed to master for 19.05 We should have a dependent bug to call reconcile balance for fines (when closed, not accruing) but I think is beyond scope here (In reply to Nick Clemens from comment #33) > We should have a dependent bug to call reconcile balance for fines (when > closed, not accruing) but I think is beyond scope here Feel free to file a bug and assign it to me to deal with that. Pushed to 18.11.x for 18.11.02 Will not be in 18.05. Merge conflicts and doesn't apply cleanly. We need to build a tree of bugs to take notice of this system preference.. I keep finding cases where it's not being applied :( |