X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Femail-customers.html;h=d26e40298f20686c69b945727375caffb57af2a8;hb=3fb0d992932495720e9f08e386844b93519c4e14;hp=d981aeae9fbdfc0bb81947aded006ff78a643d50;hpb=4b80fe118da16b21603fcdbd090bc03d8fbf0578;p=freeside.git diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html index d981aeae9..d26e40298 100644 --- a/httemplate/misc/email-customers.html +++ b/httemplate/misc/email-customers.html @@ -188,10 +188,14 @@ 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; - my %message = $msg_template->prepare( 'cust_main' => $cust ); + my %message = $msg_template->prepare( + 'cust_main' => $cust, + 'object' => $object + ); ($from, $subject, $html_body) = @message{'from', 'subject', 'html_body'}; } }