Bugzilla – Attachment 184603 Details for
Bug 40500
Include credit/debit type code in runtime parameter selection dropdown for reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40500: Include credit and debit codes in runtime dropdown
Bug-40500-Include-credit-and-debit-codes-in-runtim.patch (text/plain), 2.53 KB, created by
Andrew Fuerste-Henry
on 2025-07-24 19:21:38 UTC
(
hide
)
Description:
Bug 40500: Include credit and debit codes in runtime dropdown
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-07-24 19:21:38 UTC
Size:
2.53 KB
patch
obsolete
>From 6906c40ead87f3ebcb3cae69c2933ebd193d5344 Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Thu, 24 Jul 2025 19:21:14 +0000 >Subject: [PATCH] Bug 40500: Include credit and debit codes in runtime dropdown > >To test: >1 - save and run a sql query using both debit type and credit type parameters >2 - run your report and see your dropdowns only include desciptions >3 - apply patch, restart services >4 - re-run your report and see your dropdowns have both the description and the code >--- > reports/guided_reports.pl | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 2c08d20cba1..8254f542ef7 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -900,22 +900,18 @@ if ( $op eq 'run' ) { > $authorised_lib{$id} = $name; > } > } elsif ( $authorised_value eq "debit_types" ) { >- my $sth = $dbh->prepare( >- "SELECT code, concat(description,' (',code,')') as display_value FROM account_debit_types ORDER BY code" >- ); >+ my $sth = $dbh->prepare("SELECT code, description FROM account_debit_types ORDER BY code"); > $sth->execute; > while ( my ( $code, $description ) = $sth->fetchrow_array ) { > push @authorised_values, $code; >- $authorised_lib{$code} = $description; >+ $authorised_lib{$code} = "$description ($code)"; > } > } elsif ( $authorised_value eq "credit_types" ) { >- my $sth = $dbh->prepare( >- "SELECT code, concat(description,' (',code,')') as display_value FROM account_credit_types ORDER BY code" >- ); >+ my $sth = $dbh->prepare("SELECT code, description FROM account_credit_types ORDER BY code"); > $sth->execute; > while ( my ( $code, $description ) = $sth->fetchrow_array ) { > push @authorised_values, $code; >- $authorised_lib{$code} = $description; >+ $authorised_lib{$code} = "$description ($code)"; > } > } else { > if ( Koha::AuthorisedValues->search( { category => $authorised_value } )->count ) { >-- >2.39.5
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 40500
:
184602
| 184603