From e3e4763e500169faa7ce8bd3dba787da82edff2e Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 8 Jan 2015 14:36:16 -0800 Subject: [PATCH] fix reason selector under mysql, #31702 --- httemplate/elements/tr-select-reason.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 => '' }, -- 2.11.0