summaryrefslogtreecommitdiff
path: root/FS/FS/msg_template.pm
diff options
context:
space:
mode:
authormark <mark>2010-09-01 17:50:54 +0000
committermark <mark>2010-09-01 17:50:54 +0000
commit51f402605a8742284f81d1097f3e6df29ee6e2dc (patch)
tree2b55440bc56b66d96fe05e7f061ce111f01514d2 /FS/FS/msg_template.pm
parentf48936de00e81e89ea0f84b28e9c7b213fe898a8 (diff)
make expdate available in new alerter templates, RT#9786
Diffstat (limited to 'FS/FS/msg_template.pm')
-rw-r--r--FS/FS/msg_template.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm
index 1217421..071a3c4 100644
--- a/FS/FS/msg_template.pm
+++ b/FS/FS/msg_template.pm
@@ -226,7 +226,7 @@ sub prepare {
$_
} @$guts;
- $body = '';
+ $body = '{ use Date::Format qw(time2str); "" }';
while(@$skin || @$guts) {
$body .= shift(@$skin) || '';
$body .= shift(@$guts) || '';
@@ -315,7 +315,9 @@ sub substitutions {
cust_status ucfirst_cust_status cust_statuscolor
signupdate dundate
+ expdate
),
+ # 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) } ],