X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fmsg_template.pm;h=ffb4f52fb0971553da558695fcbed75ff6d2be4d;hb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;hp=50efcdb61b9b94c3e5c2e345473ce3b6fce7bc7d;hpb=6e8323cf946ef3684a6846aa6afde7fe3692994e;p=freeside.git diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm index 50efcdb61..ffb4f52fb 100644 --- a/FS/FS/msg_template.pm +++ b/FS/FS/msg_template.pm @@ -465,14 +465,12 @@ sub substitutions { name name_short contact contact_firstlast address1 address2 city county state zip country - daytime night fax + daytime night mobile fax has_ship_address - ship_last ship_first ship_company ship_name ship_name_short ship_contact ship_contact_firstlast ship_address1 ship_address2 ship_city ship_county ship_state ship_zip ship_country - ship_daytime ship_night ship_fax paymask payname paytype payip num_cancelled_pkgs num_ncancelled_pkgs num_pkgs @@ -485,6 +483,15 @@ sub substitutions { signupdate dundate packages recurdates ), + #compatibility: obsolete ship_ fields - use the non-ship versions + map ( + { my $field = $_; + [ "ship_$field" => sub { shift->$field } ] + } + qw( last first company daytime night fax ) + ), + # ship_name, ship_name_short, ship_contact, ship_contact_firstlast + # still work, though [ expdate => sub { shift->paydate_epoch } ], #compatibility [ signupdate_ymd => sub { $ymd->(shift->signupdate) } ], [ dundate_ymd => sub { $ymd->(shift->dundate) } ], @@ -652,8 +659,7 @@ sub _upgrade_data { my $new = new FS::msg_template({ 'msgname' => $oldname, 'agentnum' => $agentnum, - 'from_addr' => ($from && $conf->config($from, $agentnum)) || - $conf->config('invoice_from', $agentnum), + 'from_addr' => ($from && $conf->config($from, $agentnum)) || '', 'bcc_addr' => ($bcc && $conf->config($from, $agentnum)) || '', 'subject' => ($subject && $conf->config($subject, $agentnum)) || '', 'mime_type' => 'text/html',