&& ! /^legacy_cust_history$/
&& ( ! /^queue(_arg|_depend|_stat)?$/ || ! $opt->{'queue-no_history'} )
&& ! $tables_hashref_torrus->{$_}
+ && ! /^cacti_page$/
}
$dbdef->tables
) {
{ 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' ],
+ #},
],
},
'amount', @money_type, '', '',
'currency', 'char', 'NULL', 3, '', '',
'taxable_billpkgnum', 'int', 'NULL', '', '', '',
+ 'taxclass', 'varchar', 'NULL', 10, '', '',
],
'primary_key' => 'billpkgtaxratelocationnum',
'unique' => [],
{ 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' ],
+ #},
],
},
'message_noemail', 'char', 'NULL', 1, '', '',
'bill_locationnum', 'int', 'NULL', '', '', '',
'ship_locationnum', 'int', 'NULL', '', '', '',
- 'taxstatusnum', 'char', 'NULL', 32, '', '',
+ 'taxstatusnum', 'int', 'NULL', '', '', '',
'complimentary', 'char', 'NULL', 1, '', '',
'po_number', 'varchar', 'NULL', $char_d, '', '',
'invoice_attn', 'varchar', 'NULL', $char_d, '', '',
+ 'invoice_ship_address', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'custnum',
'unique' => [ [ 'agentnum', 'agent_custid' ] ],
'disabled', 'char', 'NULL', 1, '', '',
'custnum', 'int', 'NULL', '', '', '',
'refnum', 'int', 'NULL', '', '', '',
+ 'taxstatusnum', 'int', 'NULL', '', '', '',
],
'primary_key' => 'prospectnum',
'unique' => [],
],
},
+ 'quotation_pkg_tax' => {
+ 'columns' => [
+ 'quotationtaxnum', 'serial', '', '', '', '',
+ 'quotationpkgnum', 'int', '', '', '', '',
+ 'itemdesc', 'varchar', '', $char_d, '', '',
+ 'setup_amount', @money_type, '', '',
+ 'recur_amount', @money_type, '', '',
+ ],
+ 'primary_key' => 'quotationtaxnum',
+ 'unique' => [],
+ 'index' => [ [ 'quotationpkgnum' ] ],
+ 'foreign_keys' => [
+ { columns => [ 'quotationpkgnum' ],
+ table => 'quotation_pkg',
+ },
+ ],
+ },
+
'cust_location' => { #'location' now that its prospects too, but...
'columns' => [
'locationnum', 'serial', '', '', '', '',
'download', @date_type, '', '',
'upload', @date_type, '', '',
'title', 'varchar', 'NULL',255, '', '',
+ 'processor_id', 'varchar', 'NULL',255, '', '',
],
'primary_key' => 'batchnum',
'unique' => [],
'cust_pkg_detail' => {
'columns' => [
- 'pkgdetailnum', 'serial', '', '', '', '',
- 'pkgnum', 'int', '', '', '', '',
- 'detail', 'varchar', '', $char_d, '', '',
- 'detailtype', 'char', '', 1, '', '', # "I"nvoice or "C"omment
- 'weight', 'int', '', '', '', '',
+ 'pkgdetailnum', 'serial', '', '', '', '',
+ 'pkgnum', 'int', '', '', '', '',
+ 'detail', 'varchar', '', 2*$char_d, '', '',
+ 'detailtype', 'char', '', 1, '', '', #"I"nvoice or "C"omment
+ 'weight', 'int', '', '', '', '',
],
'primary_key' => 'pkgdetailnum',
'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', '', '', '', '',
#'custnum', 'int', '', '', '', ''
'billpkgnum', 'int', '', '', '', '',
'taxnum', 'int', '', '', '', '',
+ 'taxtype', 'varchar', 'NULL', $char_d, '', '',
'year', 'int', 'NULL', '', '', '',
'month', 'int', 'NULL', '', '', '',
'creditbillpkgnum', 'int', 'NULL', '', '', '',
'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',
},
#'custnum', 'int', '', '', '', ''
'billpkgnum', 'int', '', '', '', '',
'taxnum', 'int', '', '', '', '',
+ 'taxtype', 'varchar', 'NULL', $char_d, '', '',
'year', 'int', 'NULL', '', '', '',
'month', 'int', 'NULL', '', '', '',
'creditbillpkgnum', 'int', 'NULL', '', '', '',
'unique' => [],
'index' => [ [ 'taxnum', 'year', 'month' ],
[ 'billpkgnum' ],
- [ 'taxnum' ],
+ [ 'taxnum', 'taxtype' ],
[ 'creditbillpkgnum' ],
],
'foreign_keys' => [
'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' => [],
],
},
-
-
-
+ 'cacti_page' => {
+ 'columns' => [
+ 'cacti_pagenum', 'serial', '', '', '', '',
+ 'exportnum', 'int', 'NULL', '', '', '',
+ 'svcnum', 'int', 'NULL', '', '', '',
+ 'graphnum', 'int', 'NULL', '', '', '',
+ 'imported', @date_type, '', '',
+ 'content', 'text', 'NULL', '', '', '',
+ ],
+ 'primary_key' => 'cacti_pagenum',
+ 'unique' => [ ],
+ 'index' => [ ['svcnum'], ['imported'] ],
+ 'foreign_keys' => [
+ { columns => [ 'svcnum' ],
+ table => 'cust_svc',
+ references => [ 'svcnum' ],
+ },
+ { columns => [ 'exportnum' ],
+ table => 'part_export',
+ references => [ 'exportnum' ],
+ },
+ ],
+ },
# name type nullability length default local