summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-04-20 16:57:23 +0000
committerivan <ivan>2009-04-20 16:57:23 +0000
commitfb64abae07da986319e65ce5d027d2dab60c34fd (patch)
treebdf9888de86961d51ef84e25c5f9d2ddf702edb8
parent591abf0ef3819c892a61a71042b285b4215ebb1a (diff)
add cust_main.archived field, skip billing if Y, RT#4412
-rw-r--r--FS/FS/Cron/bill.pm2
-rw-r--r--FS/FS/Schema.pm2
2 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/Cron/bill.pm b/FS/FS/Cron/bill.pm
index 2e432cd27..772a9efcc 100644
--- a/FS/FS/Cron/bill.pm
+++ b/FS/FS/Cron/bill.pm
@@ -28,6 +28,8 @@ sub bill {
my @search = ();
+ push @search, "cust_main.archived != 'Y' "; #disable?
+
push @search, "cust_main.payby = '". $opt{'p'}. "'"
if $opt{'p'};
push @search, "cust_main.agentnum = ". $opt{'a'}
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 66be8b6d4..bce04e6f0 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -678,6 +678,7 @@ sub tables_hashref {
'spool_cdr','char', 'NULL', 1, '', '',
'squelch_cdr','char', 'NULL', 1, '', '',
'invoice_terms', 'varchar', 'NULL', $char_d, '', '',
+ 'archived', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'custnum',
'unique' => [ [ 'agentnum', 'agent_custid' ] ],
@@ -696,6 +697,7 @@ sub tables_hashref {
[ 'ship_county' ], [ 'ship_state' ], [ 'ship_country' ],
[ 'ship_zip' ],
[ 'ship_daytime' ], [ 'ship_night' ], [ 'ship_fax' ],
+ [ 'archived' ],
],
},