Bug 17100: Do not display payments if patron has nothing to pay
authorMarc Véron <veron@veron.ch>
Wed, 10 Aug 2016 09:42:28 +0000 (11:42 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 18 Aug 2016 16:14:28 +0000 (16:14 +0000)
commit492a64cef95c6afb1644cbb4f1be181c2442cbd8
treeeede9dc25fcb9435eae71f1d12f2a89372c83b8a
parent761001add1a95d147a23b74e8d817890ffc08ac5
Bug 17100: Do not display payments if patron has nothing to pay

This alternative patch moves logic and formatting to the template file.

To test:
* without patch
  1/ find a patron with no lines in accountlines table : print summary shows no "account fines and payments" => OK
  2/ find a patron with some lines in accountlines table and the total amount > 0 : print summary shows a table "account fines and payments" with fines to recover => OK
  3/ find a patron with some lines in accountlines table but the total amount = 0 : print summary shows a table "account fines and payments" with nothing in it => NOK

* with the patch, same cases as before :
  1/ same as without patch
  2/ same as without patch
  3/ print summary does not show "account fines and payments"

- Additionally, verify that formatting follows syspref 'CurrencyFormat'
- Verify that amount column is right-aligned

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
members/summary-print.pl