This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / FS / FS / msg_template.pm
index 071a3c4..7321351 100644 (file)
@@ -168,6 +168,11 @@ Customer object (required).
 Additional context object (currently, can be a cust_main, cust_pkg, 
 cust_bill, svc_acct, cust_pay, or cust_pay_pending object).
 
+=item to
+
+Destination address.  The default is to use the customer's 
+invoicing_list addresses.
+
 =back
 
 =cut
@@ -247,7 +252,7 @@ sub prepare {
   # and email
   ###
 
-  my @to = $cust_main->invoicing_list_emailonly;
+  my @to = ($opt{'to'}) || $cust_main->invoicing_list_emailonly;
   warn "prepared msg_template with no email destination (custnum ".
     $cust_main->custnum.")\n"
     if !@to;
@@ -311,11 +316,13 @@ sub substitutions {
       num_cancelled_pkgs num_ncancelled_pkgs num_pkgs
       classname categoryname
       balance
+      credit_limit
       invoicing_list_emailonly
       cust_status ucfirst_cust_status cust_statuscolor
 
       signupdate dundate
       expdate
+      packages recurdates
       ),
       # expdate is a special case
       [ signupdate_ymd    => sub { time2str('%Y-%m-%d', shift->signupdate) } ],