X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-setup;h=49953b8f7db68bcf61fce73037fe66d5bbec412b;hp=bc27c79d0cd02390da50d2ae092a10d84b3ffbe1;hb=a5a258c91c5dc78897d16627b8092385ceb4c4d2;hpb=2041a9143fac20b79ead4a1ae01224dedf5b27c2 diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index bc27c79d0..49953b8f7 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -270,7 +270,7 @@ foreach my $country ( sort map uc($_), all_country_codes ) { #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' ], @@ -680,6 +680,7 @@ sub tables_hash_hack { '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, @@ -691,8 +692,8 @@ sub tables_hash_hack { 'taxclass', 'varchar', 'NULL', $char_d, ], 'primary_key' => 'pkgpart', - 'unique' => [], - 'index' => [ [ 'disabled' ], ], + 'unique' => [ [ 'promo_code' ] ], + 'index' => [ [ 'disabled' ] ], }, # 'part_title' => { @@ -1160,6 +1161,53 @@ sub tables_hash_hack { '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;