From: ivan Date: Mon, 20 Apr 2009 16:57:23 +0000 (+0000) Subject: add cust_main.archived field, skip billing if Y, RT#4412 X-Git-Tag: root_of_svc_elec_features~1254 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=fb64abae07da986319e65ce5d027d2dab60c34fd add cust_main.archived field, skip billing if Y, RT#4412 --- 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' ], ], },