summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-01-08 14:36:16 -0800
committerMark Wells <mark@freeside.biz>2015-01-08 14:36:25 -0800
commite3e4763e500169faa7ce8bd3dba787da82edff2e (patch)
tree0fa7562a47c68fcc37aebc23be10acae950d704e
parent26491da90aa6a1870d88be044c419be6d0b8dec0 (diff)
fix reason selector under mysql, #31702
-rwxr-xr-xhttemplate/elements/tr-select-reason.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/elements/tr-select-reason.html b/httemplate/elements/tr-select-reason.html
index 52dc956d5..8b43dd3b4 100755
--- a/httemplate/elements/tr-select-reason.html
+++ b/httemplate/elements/tr-select-reason.html
@@ -174,9 +174,14 @@ if ($class eq 'C') {
die "illegal class: $class";
}
+my $select = join(',',
+ 'reason.*',
+ FS::Record::concat_sql([ 'type', "' : '", 'reason' ]) . ' AS label',
+);
+
my @reasons = qsearch({
'table' => 'reason',
- 'select' => "reason.*, (type || ' : ' || reason) AS label",
+ 'select' => $select,
'addl_from' => ' LEFT JOIN reason_type'.
' ON (reason.reason_type = reason_type.typenum)',
'hashref' => { disabled => '' },