credits return taxes, but the magic calculation button does not yet work properly...
[freeside.git] / FS / FS / Schema.pm
index 946cf7f..2b0ea90 100644 (file)
@@ -664,6 +664,8 @@ sub tables_hashref {
         'creditbillpkgnum', 'serial', '',      '', '', '',
         'creditbillnum',       'int', '',      '', '', '',
         'billpkgnum',          'int', '',      '', '', '',
+        'billpkgtaxlocationnum', 'int', 'NULL', '', '', '',
+        'billpkgtaxratelocationnum', 'int', 'NULL', '', '', '',
         'amount',            @money_type,          '', '',
         'setuprecur',      'varchar', '', $char_d, '', '',
         'sdate',   @date_type, '', '', 
@@ -671,7 +673,11 @@ sub tables_hashref {
       ],
       'primary_key' => 'creditbillpkgnum',
       'unique'      => [],
-      'index'       => [ [ 'creditbillnum' ], [ 'billpkgnum' ], ],
+      'index'       => [ [ 'creditbillnum' ],
+                         [ 'billpkgnum' ], 
+                         [ 'billpkgtaxlocationnum' ],
+                         [ 'billpkgtaxratelocationnum' ],
+                       ],
     },
 
     'cust_main' => {
@@ -1076,6 +1082,8 @@ sub tables_hashref {
         'billpaypkgnum', 'serial', '', '', '', '',
         'billpaynum',       'int', '', '', '', '',
         'billpkgnum',       'int', '', '', '', '',
+        'billpkgtaxlocationnum', 'int', 'NULL', '', '', '',
+        'billpkgtaxratelocationnum', 'int', 'NULL', '', '', '',
         'amount',         @money_type,     '', '',
         'setuprecur',      'varchar', '', $char_d, '', '',
        'sdate',   @date_type, '', '', 
@@ -1274,6 +1282,7 @@ sub tables_hashref {
         'custom',        'char', 'NULL', 1, '', '', 
         'taxclass',      'varchar', 'NULL', $char_d, '', '', 
         'classnum',      'int',     'NULL', '', '', '', 
+        'addon_classnum','int',     'NULL', '', '', '', 
         'taxproductnum', 'int',     'NULL', '', '', '', 
         'setup_cost',    @money_typen,          '', '',
         'recur_cost',    @money_typen,          '', '',
@@ -1284,7 +1293,9 @@ sub tables_hashref {
       ],
       'primary_key' => 'pkgpart',
       'unique' => [],
-      'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'agentnum' ], ],
+      'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'classnum' ],
+                   [ 'agentnum' ],
+                 ],
     },
 
     'part_pkg_link' => {
@@ -1643,7 +1654,7 @@ sub tables_hashref {
     'queue' => {
       'columns' => [
         'jobnum',      'serial',     '',      '', '', '', 
-        'job',           'text',     '',      '', '', '', 
+        'job',        'varchar',     '',     512, '', '', 
         '_date',          'int',     '',      '', '', '', 
         'status',     'varchar',     '', $char_d, '', '', 
         'statustext',    'text', 'NULL',      '', '', '', 
@@ -2149,6 +2160,8 @@ sub tables_hashref {
         ###
         # fields for unitel/RSLCOM/convergent that don't map well to asterisk
         # defaults
+        # though these are now used elsewhere:
+        # charged_party, upstream_price, rated_price, carrierid
         ###
 
         #cdr_type: Usage = 1, S&E = 7, OC&C = 8
@@ -2191,19 +2204,35 @@ sub tables_hashref {
         #NULL, done (or something)
         'freesiderewritestatus', 'varchar',   'NULL',     32,   '', '', 
 
+        #an indexed place to put big numbers
+        'cdrid',         'bigint',     'NULL',     '',  '', '', 
+
+        #i should become a table
         'cdrbatch', 'varchar', 'NULL', 255, '', '',
+        #'cdrbatchnum', 'int', 'NULL', '', '', '',
 
       ],
       'primary_key' => 'acctid',
       'unique' => [],
       'index' => [ [ 'calldate' ],
                    [ 'src' ], [ 'dst' ], [ 'dcontext' ], [ 'charged_party' ],
-                   [ 'accountcode' ], [ 'carrierid' ],
+                   [ 'accountcode' ], [ 'carrierid' ], [ 'cdrid' ],
                    [ 'freesidestatus' ], [ 'freesiderewritestatus' ],
                    [ 'cdrbatch' ],
                  ],
     },
 
+    #'cdr_batch' => {
+    #  'columns' => [
+    #    'cdrbatchnum',   'serial',    '',   '', '', '', 
+    #    'cdrbatch', 'varchar', 'NULL', 255, '', '',
+    #    '_date',     @date_type, '', '', 
+    #  ],
+    #  'primary_key' => 'cdrbatchnum',
+    #  'unique' => [ [ 'cdrbatch' ] ],
+    #  'index' => [],
+    #},
+
     'cdr_termination' => {
       'columns' => [
         'cdrtermnum', 'bigserial',     '',      '', '', '',