projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9fcab66
)
packages and recurdates for impending_recur templates
author
mark
<mark>
Wed, 1 Sep 2010 18:45:31 +0000
(18:45 +0000)
committer
mark
<mark>
Wed, 1 Sep 2010 18:45:31 +0000
(18:45 +0000)
FS/FS/Cron/notify.pm
patch
|
blob
|
history
FS/FS/msg_template.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Cron/notify.pm
b/FS/FS/Cron/notify.pm
index
7664ff2
..
f3eb960
100644
(file)
--- a/
FS/FS/Cron/notify.pm
+++ b/
FS/FS/Cron/notify.pm
@@
-4,7
+4,7
@@
use strict;
use vars qw( @ISA @EXPORT_OK $DEBUG );
use Exporter;
use FS::UID qw( dbh driver_name );
use vars qw( @ISA @EXPORT_OK $DEBUG );
use Exporter;
use FS::UID qw( dbh driver_name );
-use FS::Record qw(qsearch);
+use FS::Record qw(qsearch
qsearchs
);
use FS::cust_main;
use FS::cust_pkg;
use FS::cust_main;
use FS::cust_pkg;
@@
-106,7
+106,9
@@
END
my $msgnum = $conf->config('impending_recur_msgnum',$cust_main->agentnum);
if ( $msgnum ) {
my $msg_template = qsearchs('msg_template', { msgnum => $msgnum });
my $msgnum = $conf->config('impending_recur_msgnum',$cust_main->agentnum);
if ( $msgnum ) {
my $msg_template = qsearchs('msg_template', { msgnum => $msgnum });
- $error = $msg_template->send($cust_main);
+ $cust_main->setfield('packages', \\@packages);
+ $cust_main->setfield('recurdates', \\@recurdates);
+ $error = $msg_template->send('cust_main' => $cust_main);
}
else {
$error = $cust_main->notify( 'impending_recur_template',
}
else {
$error = $cust_main->notify( 'impending_recur_template',
diff --git
a/FS/FS/msg_template.pm
b/FS/FS/msg_template.pm
index
b1ae6be
..
ec3416d
100644
(file)
--- a/
FS/FS/msg_template.pm
+++ b/
FS/FS/msg_template.pm
@@
-316,6
+316,7
@@
sub substitutions {
signupdate dundate
expdate
signupdate dundate
expdate
+ packages recurdates
),
# expdate is a special case
[ signupdate_ymd => sub { time2str('%Y-%m-%d', shift->signupdate) } ],
),
# expdate is a special case
[ signupdate_ymd => sub { time2str('%Y-%m-%d', shift->signupdate) } ],