fix reason selector under mysql, #31702
authorMark Wells <mark@freeside.biz>
Thu, 8 Jan 2015 22:36:16 +0000 (14:36 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 8 Jan 2015 22:36:25 +0000 (14:36 -0800)
httemplate/elements/tr-select-reason.html

index 52dc956..8b43dd3 100755 (executable)
@@ -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 => '' },