pass correct arguments to msg_template::prepare, #24659
[freeside.git] / FS / FS / Cron / alert_expiration.pm
index eb53ea8..5961e61 100644 (file)
@@ -100,7 +100,8 @@ sub alert_expiration {
       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);