fix bug with manual notices directly to customers
authorMark Wells <mark@freeside.biz>
Thu, 23 Feb 2012 18:29:30 +0000 (10:29 -0800)
committerMark Wells <mark@freeside.biz>
Thu, 23 Feb 2012 18:29:30 +0000 (10:29 -0800)
FS/FS/cust_main_Mixin.pm
httemplate/misc/email-customers.html

index 7fcb5b5..a067706 100644 (file)
@@ -410,6 +410,7 @@ sub email_search_result {
   }
 
   my $sql_query = $class->search($param->{'search'});
+  $sql_query->{'select'} = $sql_query->{'table'} . '.*';
 
   my $count_query   = delete($sql_query->{'count_query'});
   my $count_sth = dbh->prepare($count_query)
index b87a1bf..d26e402 100644 (file)
@@ -188,6 +188,7 @@ if ( $cgi->param('action') eq 'preview' ) {
                              { msgnum => $cgi->param('msgnum') } )
         or die "template not found: ".$cgi->param('msgnum');
     $sql_query->{'extra_sql'} .= ' LIMIT 1';
+    $sql_query->{'select'} = "$table.*";
     $sql_query->{'order_by'} = '';
     my $object = qsearchs($sql_query);
     my $cust = $object->cust_main;