option to force one-time charges to be billed separately, #32866
[freeside.git] / FS / FS / Schema.pm
index 133b6d8..44f09d6 100644 (file)
@@ -794,58 +794,6 @@ sub tables_hashref {
                         ],
     },
 
-    #old "invoice" events, deprecated
-    'cust_bill_event' => {
-      'columns' => [
-        'eventnum',    'serial',  '', '', '', '', 
-        'invnum',   'int',  '', '', '', '', 
-        'eventpart',   'int',  '', '', '', '', 
-        '_date',     @date_type, '', '', 
-        'status', 'varchar', '', $char_d, '', '', 
-        'statustext', 'text', 'NULL', '', '', '', 
-      ],
-      'primary_key'  => 'eventnum',
-      #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ],
-      'unique'       => [],
-      'index'        => [ ['invnum'], ['status'], ['eventpart'],
-                          ['statustext'], ['_date'],
-                        ],
-      'foreign_keys' => [
-                          { columns    => [ 'invnum' ],
-                            table      => 'cust_bill',
-                          },
-                          { columns    => [ 'eventpart' ],
-                            table      => 'part_bill_event',
-                          },
-                        ],
-    },
-
-    #old "invoice" events, deprecated
-    'part_bill_event' => {
-      'columns' => [
-        'eventpart',    'serial',  '', '', '', '', 
-        'freq',        'varchar',       'NULL',     $char_d, '', '', 
-        'payby',       'char',  '', 4, '', '', 
-        'event',       'varchar',           '',     $char_d, '', '', 
-        'eventcode',    @perl_type, '', '', 
-        'seconds',     'int', 'NULL', '', '', '', 
-        'weight',      'int', '', '', '', '', 
-        'plan',       'varchar', 'NULL', $char_d, '', '', 
-        'plandata',   'text', 'NULL', '', '', '', 
-        'reason',     'int', 'NULL', '', '', '', 
-        'disabled',     'char', 'NULL', 1, '', '', 
-      ],
-      'primary_key'  => 'eventpart',
-      'unique'       => [],
-      'index'        => [ ['payby'], ['disabled'], ],
-      'foreign_keys' => [
-                          { columns    => [ 'reason' ],
-                            table      => 'reason',
-                            references => [ 'reasonnum' ],
-                          },
-                        ],
-    },
-
     'part_event' => {
       'columns' => [
         'eventpart',   'serial',      '',      '', '', '', 
@@ -1423,6 +1371,7 @@ sub tables_hashref {
         #void fields
         'void_date',  @date_type,                  '', '', 
         'void_reason', 'varchar', 'NULL', $char_d, '', '', 
+        'void_reasonnum', 'int', 'NULL', '', '', '', 
         'void_usernum',    'int', 'NULL',      '', '', '',
       ],
       'primary_key'  => 'crednum',
@@ -1458,6 +1407,10 @@ sub tables_hashref {
                             table      => 'cust_pkg',
                             references => [ 'pkgnum' ],
                           },
+                          { columns    => [ 'void_reasonnum' ],
+                            table      => 'reason',
+                            references => [ 'reasonnum' ],
+                          },
                           { columns    => [ 'void_usernum' ],
                             table      => 'access_user',
                             references => [ 'usernum' ],
@@ -1651,6 +1604,9 @@ sub tables_hashref {
         'bill_locationnum', 'int', 'NULL', '', '', '',
         'ship_locationnum', 'int', 'NULL', '', '', '',
         'taxstatusnum',   'char', 'NULL',      32, '', '',
+        'complimentary', 'char', 'NULL', 1, '', '',
+        'po_number', 'varchar', 'NULL', $char_d, '', '',
+        'invoice_attn', 'varchar', 'NULL', $char_d, '', '',
       ],
       'primary_key'  => 'custnum',
       'unique'       => [ [ 'agentnum', 'agent_custid' ] ],
@@ -1699,7 +1655,7 @@ sub tables_hashref {
       'columns' => [
         'custpaybynum', 'serial',     '',        '', '', '', 
         'custnum',         'int',     '',        '', '', '',
-        'weight',          'int',     '',        '', '', '', 
+        'weight',          'int', 'NULL',        '', '', '', 
         'payby',          'char',     '',         4, '', '', 
         'payinfo',     'varchar', 'NULL',       512, '', '', 
         'cardtype',    'varchar', 'NULL',   $char_d, '', '',
@@ -2703,6 +2659,7 @@ sub tables_hashref {
         'recur_show_zero',    'char', 'NULL',  1, '', '',
         'setup_show_zero',    'char', 'NULL',  1, '', '',
         'change_to_pkgnum',    'int', 'NULL', '', '', '',
+        'separate_bill',      'char', 'NULL',  1, '', '',
       ],
       'primary_key'  => 'pkgnum',
       'unique'       => [],