summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Conf.pm10
-rwxr-xr-xFS/bin/freeside-daily4
2 files changed, 12 insertions, 2 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index ac479da1e..b45cdd797 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -566,11 +566,19 @@ worry that config_items is freeside-specific and icky.
},
{
+ 'key' => 'alert_expiration',
+ 'section' => 'billing',
+ 'description' => 'Enable alerts about billing method expiration.',
+ 'type' => 'checkbox',
+ 'per_agent' => 1,
+ },
+
+ {
'key' => 'alerter_template',
'section' => 'billing',
'description' => 'Template file for billing method expiration alerts. See the <a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Administration#Credit_cards_and_Electronic_checks">billing documentation</a> for details.',
'type' => 'textarea',
- 'per-agent' => 1,
+ 'per_agent' => 1,
},
{
diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily
index acf795087..271c436c6 100755
--- a/FS/bin/freeside-daily
+++ b/FS/bin/freeside-daily
@@ -3,6 +3,7 @@
use strict;
use Getopt::Std;
use FS::UID qw(adminsuidsetup);
+use FS::Conf;
&untaint_argv; #what it sounds like (eww)
use vars qw(%opt);
@@ -16,7 +17,8 @@ bill(%opt);
# Send alerts about upcoming credit card expiration.
use FS::Cron::alert_expiration qw(alert_expiration);
-alert_expiration(%opt);
+my $conf = new FS::Conf;
+alert_expiration(%opt) if($conf->exists('alert_expiration'));
#what to do about the below when using -m? that is the question.