re-repurpose cust_bill_pkg
[freeside.git] / FS / FS / Schema.pm
index 2043b45..c0fd466 100644 (file)
@@ -500,9 +500,6 @@ sub tables_hashref {
         'quantity',  'int', 'NULL', '', '', '',
         'unitsetup', @money_typen, '', '', 
         'unitrecur', @money_typen, '', '', 
-        'duplicate',  'char', 'NULL', 1, '', '',
-        'post_total', 'char', 'NULL', 1, '', '',
-        'type',       'char', 'NULL', 1, '', '',
       ],
       'primary_key' => 'billpkgnum',
       'unique' => [],
@@ -522,7 +519,23 @@ sub tables_hashref {
       ],
       'primary_key' => 'detailnum',
       'unique' => [],
-      'index' => [ [ 'billpkgnum' ], [ 'pkgnum', 'invnum' ] ],
+      'index' => [ [ 'billpkgnum' ], [ 'classnum' ], [ 'pkgnum', 'invnum' ] ],
+    },
+
+    'cust_bill_pkg_display' => {
+      'columns' => [
+        'billpkgdisplaynum', 'serial', '', '', '', '', 
+        'billpkgnum', 'int', '', '', '', '', 
+        'section',  'varchar', 'NULL', $char_d, '', '', 
+        #'unitsetup', @money_typen, '', '',     #override the linked real one?
+        #'unitrecur', @money_typen, '', '',     #this too?
+        'post_total', 'char', 'NULL', 1, '', '',
+        'type',       'char', 'NULL', 1, '', '',
+        'summary',    'char', 'NULL', 1, '', '',
+      ],
+      'primary_key' => 'billpkgdisplaynum',
+      'unique' => [],
+      'index' => [ ['billpkgnum'], ],
     },
 
     'cust_credit' => {
@@ -945,6 +958,19 @@ sub tables_hashref {
       'index'       => [ [ 'pkgnum' ], [ 'optionname' ] ],
     },
 
+    'cust_pkg_detail' => {
+      'columns' => [
+        'pkgdetailnum', 'serial', '',      '', '', '',
+        'pkgnum',          'int', '',      '', '', '',
+        'detail',      'varchar', '', $char_d, '', '', 
+        'detailtype',     'char', '',       1, '', '', # "I"nvoice or "C"omment
+        'weight',          'int', '',      '', '', '',
+      ],
+      'primary_key' => 'pkgdetailnum',
+      'unique' => [],
+      'index'  => [ [ 'pkgnum', 'detailtype' ] ],
+    },
+
     'cust_pkg_reason' => {
       'columns' => [
         'num',      'serial',    '',   '', '', '', 
@@ -956,7 +982,7 @@ sub tables_hashref {
       ],
       'primary_key' => 'num',
       'unique' => [],
-      'index' => [],
+      'index' => [ [ 'pkgnum' ], [ 'reasonnum' ], ['action'], ],
     },
 
     'cust_refund' => {
@@ -1921,10 +1947,12 @@ sub tables_hashref {
         #NULL, done (or something)
         'freesidestatus', 'varchar',   'NULL',     32,   '', '', 
 
+        'cdrbatch', 'varchar', 'NULL', $char_d, '', '',
+
       ],
       'primary_key' => 'acctid',
       'unique' => [],
-      'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ] ],
+      'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ], [ 'cdrbatch' ], ],
     },
 
     'cdr_calltype' => {