if ( $msgnum ) { # new hotness
my $msg_template = qsearchs('msg_template', { msgnum => $msgnum } );
$customer->setfield('expdate', $expire_time);
- $error = $msg_template->send('cust_main' => $customer);
+ $error = $msg_template->send('cust_main' => $customer,
+ 'object' => $customer);
}
else { #!$msgnum, the hard way
$mail_sender = $conf->config('invoice_from', $agentnum);