[Bug 34829] New: Cash register report is reverting to All Libraries when viewing the Writeoff report
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Bug ID: 34829 Summary: Cash register report is reverting to All Libraries when viewing the Writeoff report Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: Laura.escamilla@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1. Have at least two libraries (Library A & Library B) and at least two patrons. One patron for Library A & one for Library B. 2. Create a manual fee for both patrons and write them off. 3. Go to the cash register statistics report and change the transaction type to "Write off" and your transaction library to Library A. 4. Notice that when you submit the report the transaction library defaults back to "All" and shows both patrons instead of just the patron from Library A. -- 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=34829 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.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=34829 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 155915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155915&action=edit Bug 34829: Cash register report reverts to 'All libraries' after every search To test: 1. Have at least two libraries (Library A & Library B) and at least two patrons. One patron for Library A & one for Library B. 2. Create a manual fee for both patrons and write them off. 3. Go to the cash register statistics report and change the transaction type to "Write off" and your transaction library to Library A. 4. Notice that when you submit the report the transaction library defaults back to "All" and shows both patrons instead of just the patron from Library A. 5. Apply patch 6. Verify that the library chosen now remains selected Note: the export format is faulty, but this is unrelated to this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Cash register report is |Cash register report |reverting to All Libraries |reverts to "All libraries" |when viewing the Writeoff |after every search |report | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Laura Escamilla <Laura.escamilla@bywatersolutions.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=34829 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155915|0 |1 is obsolete| | --- Comment #2 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 155950 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155950&action=edit Bug 34829: Cash register report reverts to 'All libraries' after every search To test: 1. Have at least two libraries (Library A & Library B) and at least two patrons. One patron for Library A & one for Library B. 2. Create a manual fee for both patrons and write them off. 3. Go to the cash register statistics report and change the transaction type to "Write off" and your transaction library to Library A. 4. Notice that when you submit the report the transaction library defaults back to "All" and shows both patrons instead of just the patron from Library A. 5. Apply patch 6. Verify that the library chosen now remains selected Note: the export format is faulty, but this is unrelated to this patch. Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 --- Comment #3 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Works as described! Thanks for the patch, Katrin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- my $branch = $input->param("branch"); my $manager_branchcode = $input->param("branch") || C4::Context->userenv->{'branch'}; This does not look good. And this looks bad: - <option value="ALL">All</option> Script still has it: if ($manager_branchcode ne 'ALL') { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |minor QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #4)
my $branch = $input->param("branch"); my $manager_branchcode = $input->param("branch") || C4::Context->userenv->{'branch'}; This does not look good.
I am sorry, but this is not constructive. Especially since I didn't change this line. It only appears in the patch because of the perltidy.
And this looks bad: - <option value="ALL">All</option> Script still has it: if ($manager_branchcode ne 'ALL') {
Still, no explanation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not an expert programmer, I am happy to change things around, but I need a little bit more insight in why you think something is wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #6)
I am not an expert programmer, I am happy to change things around, but I need a little bit more insight in why you think something is wrong.
I will try. Should not be very hard? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #4)
my $branch = $input->param("branch"); my $manager_branchcode = $input->param("branch") || C4::Context->userenv->{'branch'}; This does not look good.
You added $branch here, but we already have $manager_branchcode using the same CGI parameter. We should not do that. It will create confusion. If you need to know the branch code passed, use the existing variable. Change that etc. Do not clone it.
And this looks bad: - <option value="ALL">All</option> Script still has it: if ($manager_branchcode ne 'ALL') {
In the template you remove the ALL value of a combo box. You replace it by: + <option value="">All libraries</option> But the script still contains reference to the old value ALL. You should also solve those references. HTH -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34829 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39952 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org