{ columns => [ 'eventnum' ],
table => 'cust_event',
},
- { columns => [ 'billpkgnum' ],
- table => 'cust_bill_pkg',
- },
+ #{ columns => [ 'billpkgnum' ],
+ # table => 'cust_bill_pkg',
+ #},
{ columns => [ 'feepart' ],
table => 'part_fee',
},
{ columns => [ 'billpkgnum' ],
table => 'cust_bill_pkg',
},
- { columns => [ 'base_billpkgnum' ],
- table => 'cust_bill_pkg',
- references => [ 'billpkgnum' ],
- },
- { columns => [ 'base_invnum' ],
- table => 'cust_bill',
- references => [ 'invnum' ],
+ ],
+ },
+
+ 'cust_bill_pkg_fee_void' => {
+ 'columns' => [
+ 'billpkgfeenum', 'serial', '', '', '', '',
+ 'billpkgnum', 'int', '', '', '', '',
+ 'base_invnum', 'int', '', '', '', '',
+ 'base_billpkgnum', 'int', 'NULL', '', '', '',
+ 'amount', @money_type, '', '',
+ ],
+ 'primary_key' => 'billpkgfeenum',
+ 'unique' => [],
+ 'index' => [ ['billpkgnum'],
+ ['base_invnum'],
+ ['base_billpkgnum'],
+ ],
+ 'foreign_keys' => [
+ { columns => [ 'billpkgnum' ],
+ table => 'cust_bill_pkg_void',
},
],
},
+
'cust_bill_pkg_tax_location' => {
'columns' => [
'billpkgtaxlocationnum', 'serial', '', '', '', '',
{ columns => [ 'locationnum' ],
table => 'cust_location',
},
- { columns => [ 'taxable_billpkgnum' ],
- table => 'cust_bill_pkg',
- references => [ 'billpkgnum' ],
- },
+ #{ columns => [ 'taxable_billpkgnum' ],
+ # table => 'cust_bill_pkg',
+ # references => [ 'billpkgnum' ],
+ #},
],
},
{ columns => [ 'taxratelocationnum' ],
table => 'tax_rate_location',
},
- { columns => [ 'taxable_billpkgnum' ],
- table => 'cust_bill_pkg',
- references => [ 'billpkgnum' ],
- },
+ #{ columns => [ 'taxable_billpkgnum' ],
+ # table => 'cust_bill_pkg',
+ # references => [ 'billpkgnum' ],
+ #},
],
},
'unitsetup', @money_typen, '', '',
'unitrecur', @money_typen, '', '',
'hidden', 'char', 'NULL', 1, '', '',
+ 'feepart', 'int', 'NULL', '', '', '',
#void fields
'void_date', @date_type, '', '',
'reason', 'varchar', 'NULL', $char_d, '', '',
{ columns => [ 'billpkgnum' ],
table => 'cust_bill_pkg_void',
},
- { columns => [ 'pkgnum' ],
- table => 'cust_pkg',
- },
{ columns => [ 'locationnum' ],
table => 'cust_location',
},
- { columns => [ 'taxable_billpkgnum' ],
- table => 'cust_bill_pkg_void',
- references => [ 'billpkgnum' ],
- },
+ #{ columns => [ 'taxable_billpkgnum' ],
+ # table => 'cust_bill_pkg_void',
+ # references => [ 'billpkgnum' ],
+ #},
],
},
'download', @date_type, '', '',
'upload', @date_type, '', '',
'title', 'varchar', 'NULL',255, '', '',
+ 'processor_id', 'varchar', 'NULL',255, '', '',
],
'primary_key' => 'batchnum',
'unique' => [],
],
},
+ 'cust_pkg_reason_fee' => {
+ 'columns' => [
+ 'pkgreasonfeenum', 'serial', '', '', '', '',
+ 'pkgreasonnum', 'int', '', '', '', '',
+ 'billpkgnum', 'int', 'NULL', '', '', '',
+ 'feepart', 'int', '', '', '', '',
+ 'nextbill', 'char', 'NULL', 1, '', '',
+ ],
+ 'primary_key' => 'pkgreasonfeenum',
+ 'unique' => [ [ 'billpkgnum' ], [ 'pkgreasonnum' ] ], # one-to-one link
+ 'index' => [ [ 'feepart' ] ],
+ 'foreign_keys' => [
+ { columns => [ 'pkgreasonnum' ],
+ table => 'cust_pkg_reason',
+ references => [ 'num' ],
+ },
+ { columns => [ 'feepart' ],
+ table => 'part_fee',
+ },
+ # can't link billpkgnum, because of voids
+ ],
+ },
+
'cust_pkg_discount' => {
'columns' => [
'pkgdiscountnum', 'serial', '', '', '', '',
'unsuspend_pkgpart', 'int', 'NULL', '', '', '',
'unsuspend_hold','char', 'NULL', 1, '', '',
'unused_credit', 'char', 'NULL', 1, '', '',
+ 'feepart', 'int', 'NULL', '', '', '',
+ 'fee_on_unsuspend','char', 'NULL', 1, '', '',
+ 'fee_hold', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'reasonnum',
'unique' => [],