[Bug 11373] New: Add a "cash register" feature to the fine payment form.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Bug ID: 11373 Summary: Add a "cash register" feature to the fine payment form. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: fcapovilla@live.ca QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 23382 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23382&action=edit Add a "cash register" feature to the fine payment form. This patch improves the fines payment form to allow automatic calculation of the amount to give back to the patron once a fine payment is received. For example, if a patron wants to pay a 3$ fine with a 5$ bill, you can set "Amount paid" to 3 and "Collect from patron" to 5. A message will then tell you to give back 2$ to the patron. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Frédérick Capovilla <fcapovilla@live.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Medium patch Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6427 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Excellent! I would like to note that the accounts rewrite ( Bug 6427 ) also has this feature. Kyle -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 26103 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26103&action=edit Bug 11373: Add a "cash register" feature to the fine payment form. If the amount received is greater than the amount to pay, a message is shown to tell the employee how much money to give back. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 aloij <aloi54@live.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23382|0 |1 is obsolete| | CC| |aloi54@live.fr -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #3 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Joel Aloi <aloi54@live.fr> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26103|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 --- Comment #4 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 26108 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26108&action=edit Bug 11373: Add a "cash register" feature to the fine payment form. If the amount received is greater than the amount to pay, a message is shown to tell the employee how much money to give back. Signed-off-by: Joel Aloi <aloi54@live.fr> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Assignee|koha-bugs@lists.koha-commun |fcapovilla@live.ca |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am worried about the changes to Accounts.pm. We need unit tests to go with this patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 --- Comment #6 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29757 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29757&action=edit Bug 11373 - Unit tests for Accounts.pm I added unit tests for the modified subs in C4/Accounts.pm. makepartialpayment() WriteOffFee() modified: t/db_dependent/Accounts.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |maxime.beaulieu@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |jonathan.druart@biblibre.co | |m --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- This last patch does not need a signoff (will be done by QA). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but this doesn't seem to work for me. I have added various fines and fees to my patron account. Then I chose "Pay amount" and changed the collected from patron value to be higher than the total amount owed. I didn't see anything telling me how much change to give back to the patron. The open fines were paid and the additional money was 'lost'. The same happens for paying individual fines. Please retest. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 --- Comment #9 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 29938 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29938&action=edit Bug 11373 - Fixed: 'Change to give back' not displaying. I tested the last patch and found that the case 'amount oustanding == amount paid' was not handled in paycollect.p . The confirmation box should now appear when those values are equal and the amount collected is higher than the amount paid. I have found another problem while testing. When paying all fines or selected fines, the 'The amount collected is greater than the total amount paid.' message would appear even when the entered data was correct. Both issues were adressed in this patch. modified: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt modified: members/paycollect.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Francois Charbonnier <francois.charbonnier@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |francois.charbonnier@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|fcapovilla@live.ca |maxime.beaulieu@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.begin@inLibro.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simith.doliveira@inlibro.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Ahmed <ahmed.sfayhi@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahmed.sfayhi@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com Status|Needs Signoff |Failed QA --- Comment #10 from Nicole C. Engard <nengard@gmail.com> --- Am I supposed to apply to all these patches? I got the following: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 11373: Add a "cash register" feature to the fine payment form. /home/nengard/kohaclone/.git/rebase-apply/patch:242: trailing whitespace. $template->param( /home/nengard/kohaclone/.git/rebase-apply/patch:247: trailing whitespace. $template->param( warning: 2 lines add whitespace errors. Using index info to reconstruct a base tree... <stdin>:242: trailing whitespace. $template->param( <stdin>:247: trailing whitespace. $template->param( warning: 2 lines applied after fixing whitespace errors. Falling back to patching base and 3-way merge... Auto-merging members/paycollect.pl Auto-merging C4/Accounts.pm CONFLICT (content): Merge conflict in C4/Accounts.pm Failed to merge in the changes. Patch failed at 0001 Bug 11373: Add a "cash register" feature to the fine payment form. When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-11373-Add-a-cash-register-feature-to-the-fine--I0lypc.patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26108|0 |1 is obsolete| | --- Comment #11 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 36875 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36875&action=edit Bug 11373: Add a "cash register" feature to the fine payment form. If the amount received is greater than the amount to pay, a message is shown to tell the employee how much money to give back. Signed-off-by: Joel Aloi <aloi54@live.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29757|0 |1 is obsolete| | --- Comment #12 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 36876 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36876&action=edit Bug 11373 - Unit tests for Accounts.pm I added unit tests for the modified subs in C4/Accounts.pm. makepartialpayment() WriteOffFee() modified: t/db_dependent/Accounts.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29938|0 |1 is obsolete| | --- Comment #13 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Created attachment 36877 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36877&action=edit Bug 11373 - Fixed: 'Change to give back' not displaying. I tested the last patch and found that the case 'amount oustanding == amount paid' was not handled in paycollect.p . The confirmation box should now appear when those values are equal and the amount collected is higher than the amount paid. I have found another problem while testing. When paying all fines or selected fines, the 'The amount collected is greater than the total amount paid.' message would appear even when the entered data was correct. Both issues were adressed in this patch. modified: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt modified: members/paycollect.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #14 from Maxime Beaulieu <maxime.beaulieu@inlibro.com> --- Fixed the conflicts. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Maxime Beaulieu <maxime.beaulieu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 36875 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36875 Bug 11373: Add a "cash register" feature to the fine payment form. Review of attachment 36875: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=11373&attachment=36875) ----------------------------------------------------------------- Changing the sign of what was there before would need something done during upgrade to change it to a new way of processing. This wasn't done, so frankly, I think the logic I highlighted is broken. Though, admittedly, I did not run this code yet. ::: C4/Accounts.pm @@ +722,5 @@
my $insert = 'INSERT INTO accountlines (borrowernumber, accountno, date, amount, ' . 'description, accounttype, amountoutstanding, itemnumber, manager_id, note) ' . ' VALUES (?, ?, now(), ?, ?, ?, 0, ?, ?, ?)';
+ $dbh->do( $insert, undef, $borrowernumber, $nextaccntno, $payment,
0-$amount is the negative of $amount. This is a vast change! Is this correct? @@ +728,5 @@
UpdateStats({ branch => $user, type => 'payment', + amount => $payment,
This is 0-$amount which is the negative of what was put here before. @@ +739,4 @@
action => 'create_payment', borrowernumber => $user, accountno => $nextaccntno, + amount => $payment,
On a positive note, by putting $payment earlier, it can be used nicely here. @@ +820,4 @@
UpdateStats({ branch => $branch, type => 'writeoff', + amount => $payment,
Again, 0-$amount is negative of what was there before. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11373 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15654 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org