From fb64abae07da986319e65ce5d027d2dab60c34fd Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Apr 2009 16:57:23 +0000 Subject: [PATCH] add cust_main.archived field, skip billing if Y, RT#4412 --- FS/FS/Cron/bill.pm | 2 ++ FS/FS/Schema.pm | 2 ++ 2 files changed, 4 insertions(+) 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' ], ], }, -- 2.11.0