[Bug 17100] New: On summary print, "Account fines and payments" is displaid even if there is nothing to pay
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Bug ID: 17100 Summary: On summary print, "Account fines and payments" is displaid even if there is nothing to pay Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: sophie.meynieux@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If a patron got fines but the total is null (lost items then returned for example), on print summary, there is a table "Account fines and payments" with no lines in it. There should be not table at all -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 --- Comment #1 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 54260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54260&action=edit Bug 17100 : Fix "Account fines and payments" diplay on patron's summary print -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Test plan : * 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" -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #3 from Marc Véron <veron@veron.ch> --- Hi Sophie, Your patch did not work for me becuase some more logic is needed in the template file. Additionally, I encountred formatting problems. Alternative patch follows. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 54261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54261&action=edit Bug 17100: [Alternative patch] Fix issues for on summary print This alternative patch moves logic and formatting to the template file. To test: - Follow test plan in comment #2 - Additionally, verify that formatting follows syspref 'CurrencyFormat' - Verify that amount column is right-aligned -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|On summary print, "Account |On summary print, "Account |fines and payments" is |fines and payments" is |displaid even if there is |displayed even if there is |nothing to pay |nothing to pay -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54261|0 |1 is obsolete| | --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 54270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54270&action=edit Bug 17100: [Alternative patch] Fix issues for on summary print This alternative patch moves logic and formatting to the template file. To test: - Follow test plan in comment #2 - Additionally, verify that formatting follows syspref 'CurrencyFormat' - Verify that amount column is right-aligned -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54270|0 |1 is obsolete| | --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 54312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54312&action=edit [SIGNED-OFF] Bug 17100: [Alternative patch] Fix issues for on summary print This alternative patch moves logic and formatting to the template file. To test: - Follow test plan in comment #2 - Additionally, verify that formatting follows syspref 'CurrencyFormat' - Verify that amount column is right-aligned Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 54312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54312 [SIGNED-OFF] Bug 17100: [Alternative patch] Fix issues for on summary print Review of attachment 54312: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17100&attachment=54312) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ +105,4 @@
</tr>
[% FOREACH account IN accounts %] + [% IF ( account.amountoutstanding < 0 ) || ( account.amountoutstanding > 0 ) %]
Marc, why did you replace next if amount == 0 with this lines? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 --- Comment #8 from Marc Véron <veron@veron.ch> --- (In reply to Jonathan Druart from comment #7)
Comment on attachment 54312 [details] [review] [SIGNED-OFF] Bug 17100: [Alternative patch] Fix issues for on summary print
Review of attachment 54312 [details] [review]: -----------------------------------------------------------------
::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ +105,4 @@
</tr>
[% FOREACH account IN accounts %] + [% IF ( account.amountoutstanding < 0 ) || ( account.amountoutstanding > 0 ) %]
Marc, why did you replace next if amount == 0 with this lines?
It did not work with amount == 0 because the amount comes as '0.00' (not sure how much decimals tough) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #54260|0 |1 is obsolete| | Attachment #54312|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54478&action=edit 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> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 54479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54479&action=edit Bug 17100: Restore previous logic There is no need to change the previous logic here, so let's restore it. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marc Véron from comment #8)
(In reply to Jonathan Druart from comment #7)
Comment on attachment 54312 [details] [review] [review] [SIGNED-OFF] Bug 17100: [Alternative patch] Fix issues for on summary print
Review of attachment 54312 [details] [review] [review]: -----------------------------------------------------------------
::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ +105,4 @@
</tr>
[% FOREACH account IN accounts %] + [% IF ( account.amountoutstanding < 0 ) || ( account.amountoutstanding > 0 ) %]
Marc, why did you replace next if amount == 0 with this lines?
It did not work with amount == 0 because the amount comes as '0.00' (not sure how much decimals tough)
It's because you compared string "0.00", instead of integer 0. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Marc, Jonathan! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #13 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.03. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #14 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.10 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17100 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20656 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20656 [Bug 20656] Print summary for patron shows paid fines and formats payments badly -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org