#billing events
foreach my $aref (
- [ 'COMP', 'Comp invoice', '$cust_bill->comp();', 30, 'comp' ],
+ #[ 'COMP', 'Comp invoice', '$cust_bill->comp();', 30, 'comp' ],
[ 'CARD', 'Batch card', '$cust_bill->batch_card();', 40, 'batch-card' ],
[ 'BILL', 'Send invoice', '$cust_bill->send();', 50, 'send' ],
[ 'DCRD', 'Send invoice', '$cust_bill->send();', 50, 'send' ],
'pkgpart', 'serial', '', '',
'pkg', 'varchar', '', $char_d,
'comment', 'varchar', '', $char_d,
+ 'promo_code', 'varchar', 'NULL', $char_d,
'setup', @perl_type,
'freq', 'varchar', '', $char_d, #billing frequency
'recur', @perl_type,
],
'primary_key' => 'pkgpart',
'unique' => [],
- 'index' => [ [ 'disabled' ], ],
+ 'index' => [ [ 'promo_code' ], [ 'disabled' ] ],
},
# 'part_title' => {
'index' => [ [ 'pkgpart' ], [ 'optionname' ] ],
},
+ 'rate' => {
+ 'columns' => [
+ 'ratenum', 'serial', '', '',
+ 'ratename', 'varchar', '', $char_d,
+ ],
+ 'primary_key' => 'ratenum',
+ 'unique' => [],
+ 'index' => [],
+ },
+
+ 'rate_detail' => {
+ 'columns' => [
+ 'ratenum', 'int', '', '',
+ 'orig_regionnum', 'int', 'NULL', '',
+ 'dest_regionnum', 'int', '', '',
+ 'min_included', 'int', '', '',
+ 'min_charge', @money_type,
+ 'sec_granularity', 'int', '', '',
+ #time period (link to table of periods)?
+ ],
+ 'primary_key' => '',
+ 'unique' => [ [ 'ratenum', 'orig_regionnum', 'dest_regionnum' ] ],
+ 'index' => [],
+ },
+
+ 'rate_region' => {
+ 'columns' => [
+ 'regionnum', 'serial', '', '',
+ 'regionname', 'varchar', '', $char_d,
+ ],
+ 'primary_key' => 'regionnum',
+ 'unique' => [],
+ 'index' => [],
+ },
+
+ 'rate_prefix' => {
+ 'columns' => [
+ 'prefixnum', 'serial', '', '',
+ 'regionnum', 'int', '', '',,
+ 'countrycode', 'varchar', '', 3,
+ 'npa', 'varchar', 'NULL', 4, #not 3?
+ 'nxx', 'varchar', 'NULL', 3,
+ ],
+ 'primary_key' => 'prefixnum',
+ 'unique' => [],
+ 'index' => [ [ 'countrycode' ], [ 'regionnum' ] ],
+ },
+
+
);
%tables;