Bugzilla – Attachment 155950 Details for
Bug 34829
Cash register report reverts to "All libraries" after every search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34829: Cash register report reverts to 'All libraries' after every search
Bug-34829-Cash-register-report-reverts-to-All-libr.patch (text/plain), 4.08 KB, created by
Laura Escamilla
on 2023-09-20 15:10:19 UTC
(
hide
)
Description:
Bug 34829: Cash register report reverts to 'All libraries' after every search
Filename:
MIME Type:
Creator:
Laura Escamilla
Created:
2023-09-20 15:10:19 UTC
Size:
4.08 KB
patch
obsolete
>From 25fd16609834dd7f9c93b7137124b18e1d9238cb Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 19 Sep 2023 21:02:06 +0000 >Subject: [PATCH] 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> >--- > .../prog/en/modules/reports/cash_register_stats.tt | 10 +++++----- > reports/cash_register_stats.pl | 14 ++++++++------ > 2 files changed, 13 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >index 5667a6defe..d234a08226 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >@@ -119,12 +119,12 @@ > <li> > <label>Transaction library</label> > <select name="branch" id="branch"> >- <option value="ALL">All</option> >- [% FOREACH branchloo IN branchloop %] >- [% IF ( branchloo.selected ) %] >- <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option> >+ <option value="">All libraries</option> >+ [% FOREACH library IN Branches.all( selected => selected_library ) %] >+ [% IF library.selected %] >+ <option value="[% library.branchcode | html %]" selected="selected">[% library.branchname | html %]</option> > [% ELSE %] >- <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option> >+ <option value="[% library.branchcode | html %]" >[% library.branchname | html %]</option> > [% END %] > [% END %] > </select> >diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl >index 1dde63b114..27c219ee3c 100755 >--- a/reports/cash_register_stats.pl >+++ b/reports/cash_register_stats.pl >@@ -39,11 +39,13 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ > flagsrequired => {reports => '*'}, > }); > >-my $do_it = $input->param('do_it'); >-my $output = $input->param("output"); >-my $basename = $input->param("basename"); >-my $transaction_type = $input->param("transaction_type") || 'ACT'; >-my $manager_branchcode = $input->param("branch") || C4::Context->userenv->{'branch'}; >+my $do_it = $input->param('do_it'); >+my $output = $input->param("output"); >+my $basename = $input->param("basename"); >+my $transaction_type = $input->param("transaction_type") || 'ACT'; >+my $branch = $input->param("branch"); >+my $manager_branchcode = $input->param("branch") || C4::Context->userenv->{'branch'}; >+ > > $template->param( > do_it => $do_it, >@@ -196,7 +198,7 @@ $template->param( > beginDate => $fromDate, > endDate => $toDate, > transaction_type => $transaction_type, >- branchloop => Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed, >+ selected_library => $branch, > debit_types => \@debit_types, > credit_types => \@credit_types, > registerid => $registerid, >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34829
:
155915
| 155950