Bugzilla – Attachment 184602 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.14 KB, created by
Andrew Fuerste-Henry
on 2025-07-24 18:35:01 UTC
(
hide
)
Description:
Bug 40500: Include credit and debit codes in runtime dropdown
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2025-07-24 18:35:01 UTC
Size:
2.14 KB
patch
obsolete
>From 1dd53679b4f5175aac2a86e6fd8d8787b671dc0b Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Thu, 24 Jul 2025 18:34:25 +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 | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index fe47501ee7f..2c08d20cba1 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -900,14 +900,18 @@ if ( $op eq 'run' ) { > $authorised_lib{$id} = $name; > } > } elsif ( $authorised_value eq "debit_types" ) { >- my $sth = $dbh->prepare("SELECT code, description FROM account_debit_types ORDER BY code"); >+ my $sth = $dbh->prepare( >+ "SELECT code, concat(description,' (',code,')') as display_value FROM account_debit_types ORDER BY code" >+ ); > $sth->execute; > while ( my ( $code, $description ) = $sth->fetchrow_array ) { > push @authorised_values, $code; > $authorised_lib{$code} = $description; > } > } elsif ( $authorised_value eq "credit_types" ) { >- my $sth = $dbh->prepare("SELECT code, description FROM account_credit_types ORDER BY code"); >+ my $sth = $dbh->prepare( >+ "SELECT code, concat(description,' (',code,')') as display_value FROM account_credit_types ORDER BY code" >+ ); > $sth->execute; > while ( my ( $code, $description ) = $sth->fetchrow_array ) { > push @authorised_values, $code; >-- >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