add cust_main.archived field, skip billing if Y, RT#4412
authorivan <ivan>
Mon, 20 Apr 2009 16:57:23 +0000 (16:57 +0000)
committerivan <ivan>
Mon, 20 Apr 2009 16:57:23 +0000 (16:57 +0000)
FS/FS/Cron/bill.pm
FS/FS/Schema.pm

index 2e432cd..772a9ef 100644 (file)
@@ -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'}
index 66be8b6..bce04e6 100644 (file)
@@ -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' ],
                  ],
     },