CCH tax exemptions + 4.x tax system, #34223
[freeside.git] / FS / FS / Schema.pm
index c0dd2b4..4bc3598 100644 (file)
@@ -1151,6 +1151,7 @@ sub tables_hashref {
         'amount',                 @money_type,                   '', '',
         'currency',                    'char', 'NULL',        3, '', '',
         'taxable_billpkgnum',           'int', 'NULL',       '', '', '',
+        'taxclass',                 'varchar', 'NULL',       10, '', '',
       ],
       'primary_key'  => 'billpkgtaxratelocationnum',
       'unique'       => [],
@@ -4534,6 +4535,7 @@ sub tables_hashref {
         #'custnum',      'int', '', '', '', ''
         'billpkgnum',   'int', '', '', '', '', 
         'taxnum',       'int', '', '', '', '', 
+        'taxtype',  'varchar', 'NULL', $char_d, '', '',
         'year',         'int', 'NULL', '', '', '', 
         'month',        'int', 'NULL', '', '', '', 
         'creditbillpkgnum', 'int', 'NULL', '', '', '',
@@ -4549,16 +4551,13 @@ sub tables_hashref {
       'unique'       => [],
       'index'        => [ [ 'taxnum', 'year', 'month' ],
                           [ 'billpkgnum' ],
-                          [ 'taxnum' ],
+                          [ 'taxnum', 'taxtype' ],
                           [ 'creditbillpkgnum' ],
                         ],
       'foreign_keys' => [
                           { columns    => [ 'billpkgnum' ],
                             table      => 'cust_bill_pkg',
                           },
-                          { columns    => [ 'taxnum' ],
-                            table      => 'cust_main_county',
-                          },
                           { columns    => [ 'creditbillpkgnum' ],
                             table      => 'cust_credit_bill_pkg',
                           },
@@ -4571,6 +4570,7 @@ sub tables_hashref {
         #'custnum',      'int', '', '', '', ''
         'billpkgnum',   'int', '', '', '', '', 
         'taxnum',       'int', '', '', '', '', 
+        'taxtype',  'varchar', 'NULL', $char_d, '', '',
         'year',         'int', 'NULL', '', '', '', 
         'month',        'int', 'NULL', '', '', '', 
         'creditbillpkgnum', 'int', 'NULL', '', '', '',
@@ -4586,7 +4586,7 @@ sub tables_hashref {
       'unique'       => [],
       'index'        => [ [ 'taxnum', 'year', 'month' ],
                           [ 'billpkgnum' ],
-                          [ 'taxnum' ],
+                          [ 'taxnum', 'taxtype' ],
                           [ 'creditbillpkgnum' ],
                         ],
       'foreign_keys' => [