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
$_
} @$guts;
- $body = '';
+ $body = '{ use Date::Format qw(time2str); "" }';
while(@$skin || @$guts) {
$body .= shift(@$skin) || '';
$body .= shift(@$guts) || '';
# 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;
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) } ],
[ dundate_ymd => sub { time2str('%Y-%m-%d', shift->dundate) } ],
[ paydate_my => sub { sprintf('%02d/%04d', shift->paydate_monthyear) } ],