[Bug 37108] New: cash register statistics wizard is wrongly sorting payment by manager_id branchcode
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Bug ID: 37108 Summary: cash register statistics wizard is wrongly sorting payment by manager_id branchcode Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: marie-luce.laflamme@inlibro.com QA Contact: testopia@bugs.koha-community.org The Cash Register Statistics wizard in Koha is currently sorting payments based on the "manager_id" branchcode rather than the "accountlines.branchcode". This means that if staff switch to a different branch while working, Koha will unfortunately record all transactions under the branchcode associated with the staff account, not the branch they are currently logged into. I'm wondering if the SQL query behind the Cash Register Statistics wizard is using the recently added "accountlines.branchcode". See the test plan in the following comment and -- 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=37108 --- Comment #1 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- I've left this query to highlight the behaviour after running your tests. SELECT debit.accountlines_id, debit.borrowernumber, debit.itemnumber, debit.date AS "Invoice date", debit.amount, debit.description, debit.debit_type_code, credit.amountoutstanding, debit.timestamp, credit.manager_id , borrowers.branchcode AS "manager branchcode", credit.register_id, credit.branchcode AS "accountlines branchcode" FROM account_offsets JOIN accountlines AS debit ON (debit.accountlines_id = account_offsets.debit_id) JOIN accountlines AS credit ON (credit.accountlines_id = account_offsets.credit_id) JOIN account_debit_types ON (debit.debit_type_code = account_debit_types.code) LEFT JOIN borrowers ON (credit.manager_id = borrowers.borrowernumber) WHERE type IN ("APPLY") AND account_offsets.debit_id IS NOT NULL AND credit.credit_type_code ="PAYMENT" AND debit.debit_type_code NOT IN ('VOID') AND DATE(created_on)='yyyy-mm-dd'; -- 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=37108 --- Comment #2 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- Setup - before test Staff accounts - have a superlibrarian account - create 2 limited access staff accounts, one by branches: e.g. - staff 1 - attached to branch A - staff 2 - attached to branch B Both restricted staff accounts should have the following permissions: - (circulate) , - (borrowers), - in the patron fines: (manual_invoice), and (remaining_permissions) - ***ability to switch login library (loggedinlibrary) Debit type - Add few debit types in your Koha (administration > debit types) to ease transactions search. e.g: "printing cost", "new card", "lost item" ***Ensure that each debit type is configured to "can be manually invoiced" Test plan 1. Login with "staff 1" in the intranet --> Koha should connect to branch A 2. Find a "branch A" patron 3. Add a manual invoice (e.g printing -- 2.50$ ) 4. Pay this invoice 5. Log out of the intranet 6. Login with "staff2" --> Koha should connect to branch B 7. Find a "branch B" patron 8. Add a manual invoice with a unique debit type and amount (e.g. lost item - 12.80$ ) 9. Pay this invoice 10. Stay connect with "staff2" account, and switch to "branch A" at the top right corner of the screen 11. Find another "branch A" patron 12. Add a manual invoice with a unique debit type and amount (e.g. new card - 5.00$ ) 13. Pay this invoice 14. Log out 15. Login with a "superlibrarian" account 16. Run the "Cash register" statistics wizards for "branch A" - Go to (Reports > Statistics wizards > Cash Registers ) - dates: select the current date - transactions types: select "all payments to the library" in the - transaction library: select "branch A" 18. Submit the search 19. Check transactions for "branch A" ---> Unfortunately, Koha is not listing the payment of step 13 in the "branch A report", even if the "staff 2" was logged to "branch A" while processing the payment. 20. Run the "Cash register" statistics wizard for "branch B" - Redo steps 16 to 19, but select "branch B" 21. Check transactions for "branch B": --> Koha is displaying the step 13 payment by mistake, this payment should be in "branch A report" -- 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=37108 Alexandre Noel <alexandre.noel@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=37108 --- Comment #3 from Alexandre Noel <alexandre.noel@inlibro.com> --- Created attachment 168297 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168297&action=edit Bug 37108 - cash register statistics wizard is wrongly sorting payment by manager_id branchcode With this patch, it displays now the accountlines branchcode and not the manager's branchcode. (cr: Marie-Luce test plan) Setup - before test Staff accounts - have a superlibrarian account - create 2 limited access staff accounts, one by branches: e.g. - staff 1 - attached to branch A - staff 2 - attached to branch B Both restricted staff accounts should have the following permissions: - (circulate) , - (borrowers), - in the patron fines: (manual_invoice), and (remaining_permissions) - ***ability to switch login library (loggedinlibrary) Debit type - Add few debit types in your Koha (administration > debit types) to ease transactions search. e.g: "printing cost", "new card", "lost item" ***Ensure that each debit type is configured to "can be manually invoiced" Test plan 1. Login with "staff 1" in the intranet --> Koha should connect to branch A 2. Find a "branch A" patron 3. Add a manual invoice (e.g printing -- 2.50$ ) 4. Pay this invoice 5. Log out of the intranet 6. Login with "staff2" --> Koha should connect to branch B 7. Find a "branch B" patron 8. Add a manual invoice with a unique debit type and amount (e.g. lost item - 12.80$ ) 9. Pay this invoice 10. Stay connect with "staff2" account, and switch to "branch A" at the top right corner of the screen 11. Find another "branch A" patron 12. Add a manual invoice with a unique debit type and amount (e.g. new card - 5.00$ ) 13. Pay this invoice 14. Log out 15. Login with a "superlibrarian" account 16. Run the "Cash register" statistics wizards for "branch A" - Go to (Reports > Statistics wizards > Cash Registers ) - dates: select the current date -- 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=37108 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |alexandre.noel@inlibro.com |ity.org | CC| |martin.renvoize@ptfs-europe | |.com -- 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=37108 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Chris Cormack <chris@bigballofwax.co.nz> 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=37108 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168297|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 168516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168516&action=edit Bug 37108: cash register statistics wizard is wrongly sorting payment by manager_id branchcode With this patch, it displays now the accountlines branchcode and not the manager's branchcode. (cr: Marie-Luce test plan) Setup - before test Staff accounts - have a superlibrarian account - create 2 limited access staff accounts, one by branches: e.g. - staff 1 - attached to branch A - staff 2 - attached to branch B Both restricted staff accounts should have the following permissions: - (circulate) , - (borrowers), - in the patron fines: (manual_invoice), and (remaining_permissions) - ***ability to switch login library (loggedinlibrary) Debit type - Add few debit types in your Koha (administration > debit types) to ease transactions search. e.g: "printing cost", "new card", "lost item" ***Ensure that each debit type is configured to "can be manually invoiced" Test plan 1. Login with "staff 1" in the intranet --> Koha should connect to branch A 2. Find a "branch A" patron 3. Add a manual invoice (e.g printing -- 2.50$ ) 4. Pay this invoice 5. Log out of the intranet 6. Login with "staff2" --> Koha should connect to branch B 7. Find a "branch B" patron 8. Add a manual invoice with a unique debit type and amount (e.g. lost item - 12.80$ ) 9. Pay this invoice 10. Stay connect with "staff2" account, and switch to "branch A" at the top right corner of the screen 11. Find another "branch A" patron 12. Add a manual invoice with a unique debit type and amount (e.g. new card - 5.00$ ) 13. Pay this invoice 14. Log out 15. Login with a "superlibrarian" account 16. Run the "Cash register" statistics wizards for "branch A" - Go to (Reports > Statistics wizards > Cash Registers ) - dates: select the current date Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|cash register statistics |Cash register statistics |wizard is wrongly sorting |wizard is wrongly sorting |payment by manager_id |payment by home library of |branchcode |the manager -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Picking this out of the QA queue - thanks for the patch Noel! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.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=37108 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37108 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldoldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz Resolution|--- |FIXED --- Comment #9 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org