[Bug 42466] New: UseCashRegisters gets ignored on paycollect
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 Bug ID: 42466 Summary: UseCashRegisters gets ignored on paycollect Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: bibliothek@th-wildau.de QA Contact: testopia@bugs.koha-community.org - enable UseCashRegisters - go to /cgi-bin/koha/members/maninvoice.pl?borrowernumber=5 and create a manual fee f.e. 5 - go to /cgi-bin/koha/members/paycollect.pl?borrowernumber=5 -You will see: Total amount outstanding: 5.00 Amount being paid: 5.00 Amount tendered: 5.00 - Change Amount being paid: 4 Check Payment type is required. Click Confirm. The form will get sent even though the required cash register is not selected -- 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=42466 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- 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=42466 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|UseCashRegisters gets |UseCashRegisters gets |ignored on paycollect |ignored on paycollect when | |change > 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=42466 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- Another error: F.e. outstanding: 100 - enter paid: 10 - enter tendered 8 -> Please enter a value greater than or equal to 10. - set back paid to 7 -> Warning should disappear but does not. -- 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=42466 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42287 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42287 [Bug 42287] Tidy all script tags - members -- 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=42466 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff 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=42466 --- Comment #2 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 198354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198354&action=edit Bug 42466: Fix ignored form validation on paycollect When UseCashRegisters is enabled and a change value bigger than 0 exists (the amount tendered is bigger than the amount paid) the form could be submitted without a required cash register. The modal dialog informing of the change value would simply ignore missing other required fields. Also warnings on 'Amount tendered' did not disappear when 'Amount being paid' was set to a higher value and later reset to a lower value than 'Amount tendered'. This patch fixes both issues by moving the modal dialog (confirm change money) to the form validations submit handler and by validating the form on each update of 'Amount tendered' or 'Amount being paid'. Test plan: a) enable UseCashRegisters and create one under /cgi-bin/koha/admin/cash_registers.pl?op=add_form b) create a manual fee (f.e. 10) f.e. via /cgi-bin/koha/members/maninvoice.pl?borrowernumber=16 c) There are several ways to reach the 'Pay an amount toward all charges' form: - Patron -> Accounting -> (Tab) Make a payment - Patron -> Details -> Attention -> Pay all charges d) enter the follwing values - Amount being paid: 7 - Amount tendered: 6 -> a warning will appear : Please enter a value greater than or equal to 7. e) set - Amount being paid: 5 -> The warning remains visible: Please enter a value greater than or equal to 7. f) Click confirm -> Modal which wants you to confirm that there is a change left. g) Click yes. The form will be sent even though the required filed 'Payment type' is not set. h) go to the payments form again. Total amount outstanding should be 5.00 now enter the following so that change is > 0.00 - Amount being paid: 3 - Amount tendered: 4 - Payment type: Cash i) Click confirm -> Modal which wants you to confirm that there is a change left. j) Click yes. You will see an Error trace page As long as 'Change to give' is other than 0.00 you will be able to send the form. Apply patch: l) repeat b) until e) and check that the warning disappears when Amount being paid is lower or equal than Amount tendered m) check that clicking Confirm will not send the form n) check that when Payment type is set to Cash, the Cash register is required to send the form. -- 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=42466 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |bibliothek@th-wildau.de |ity.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=42466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198354|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 198381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198381&action=edit Bug 42466: Fix ignored form validation on paycollect When UseCashRegisters is enabled and a change value bigger than 0 exists (the amount tendered is bigger than the amount paid) the form could be submitted without a required cash register. The modal dialog informing of the change value would simply ignore missing other required fields. Also warnings on 'Amount tendered' did not disappear when 'Amount being paid' was set to a higher value and later reset to a lower value than 'Amount tendered'. This patch fixes both issues by moving the modal dialog (confirm change money) to the form validations submit handler and by validating the form on each update of 'Amount tendered' or 'Amount being paid'. Test plan: a) enable UseCashRegisters and create one under /cgi-bin/koha/admin/cash_registers.pl?op=add_form b) create a manual fee (f.e. 10) f.e. via /cgi-bin/koha/members/maninvoice.pl?borrowernumber=16 c) There are several ways to reach the 'Pay an amount toward all charges' form: - Patron -> Accounting -> (Tab) Make a payment - Patron -> Details -> Attention -> Pay all charges d) enter the follwing values - Amount being paid: 7 - Amount tendered: 6 -> a warning will appear : Please enter a value greater than or equal to 7. e) set - Amount being paid: 5 -> The warning remains visible: Please enter a value greater than or equal to 7. f) Click confirm -> Modal which wants you to confirm that there is a change left. g) Click yes. The form will be sent even though the required filed 'Payment type' is not set. h) go to the payments form again. Total amount outstanding should be 5.00 now enter the following so that change is > 0.00 - Amount being paid: 3 - Amount tendered: 4 - Payment type: Cash i) Click confirm -> Modal which wants you to confirm that there is a change left. j) Click yes. You will see an Error trace page As long as 'Change to give' is other than 0.00 you will be able to send the form. Apply patch: l) repeat b) until e) and check that the warning disappears when Amount being paid is lower or equal than Amount tendered m) check that clicking Confirm will not send the form n) check that when Payment type is set to Cash, the Cash register is required to send the form. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198381|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 198943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198943&action=edit Bug 42466: Fix ignored form validation on paycollect When UseCashRegisters is enabled and a change value bigger than 0 exists (the amount tendered is bigger than the amount paid) the form could be submitted without a required cash register. The modal dialog informing of the change value would simply ignore missing other required fields. Also warnings on 'Amount tendered' did not disappear when 'Amount being paid' was set to a higher value and later reset to a lower value than 'Amount tendered'. This patch fixes both issues by moving the modal dialog (confirm change money) to the form validations submit handler and by validating the form on each update of 'Amount tendered' or 'Amount being paid'. Test plan: a) enable UseCashRegisters and create one under /cgi-bin/koha/admin/cash_registers.pl?op=add_form b) create a manual fee (f.e. 10) f.e. via /cgi-bin/koha/members/maninvoice.pl?borrowernumber=16 c) There are several ways to reach the 'Pay an amount toward all charges' form: - Patron -> Accounting -> (Tab) Make a payment - Patron -> Details -> Attention -> Pay all charges d) enter the follwing values - Amount being paid: 7 - Amount tendered: 6 -> a warning will appear : Please enter a value greater than or equal to 7. e) set - Amount being paid: 5 -> The warning remains visible: Please enter a value greater than or equal to 7. f) Click confirm -> Modal which wants you to confirm that there is a change left. g) Click yes. The form will be sent even though the required filed 'Payment type' is not set. h) go to the payments form again. Total amount outstanding should be 5.00 now enter the following so that change is > 0.00 - Amount being paid: 3 - Amount tendered: 4 - Payment type: Cash i) Click confirm -> Modal which wants you to confirm that there is a change left. j) Click yes. You will see an Error trace page As long as 'Change to give' is other than 0.00 you will be able to send the form. Apply patch: l) repeat b) until e) and check that the warning disappears when Amount being paid is lower or equal than Amount tendered m) check that clicking Confirm will not send the form n) check that when Payment type is set to Cash, the Cash register is required to send the form. Signed-off-by: David Nind <david@davidnind.com> Amended-by: Jonathan Druart Tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #6 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 --- Comment #7 from Jan Kissig <bibliothek@th-wildau.de> --- *** Bug 42465 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42466 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42986 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42986 [Bug 42986] JS error when writing off selected charges -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org