Bug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl
authorTomas Cohen Arazi <tomascohen@theke.io>
Sat, 16 Jun 2018 12:44:19 +0000 (09:44 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 10 Jul 2018 06:42:14 +0000 (07:42 +0100)
commit734ce420bba38f6e0c93300d42d31f6495ff6c69
tree7727e92ea28eb73b508d31fe7458bdc5b057cb46
parentf91b9ec6457791623dd65b44f10cf682e00136ab
Bug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl

This patch changes the how account lines are fetched (using
Koha::Account->outstanding_debits) so credits are not picked.

To test:
- Add a $5 credit to a patron
- Add a $1 fine
- Go to the 'Pay fines' tab
=> FAIL: Credit is displayed
- Try to pay all fines
=> FAIL: You are told to enter a value less than or equal to -4.00
         (Observe you cannot do that)
- Apply this patch
- Reload
=> SUCCESS: Credit is not displayed
=> SUCCESS: You are able to pay all fines
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
members/pay.pl
members/paycollect.pl