X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=0568bdf1d2ab8d14aeb3585cce6871a0baccbee3;hb=3c54c844c665ed108c7892a154fd3972fab1f3e5;hp=316db6fb2d7fd27877c38d24a6b5810a969a461e;hpb=5d20de9563b173877e6419934f2b63332da2dc49;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 316db6fb2..0568bdf1d 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -538,6 +538,24 @@ sub tables_hashref { 'index' => [ ['custnum'], ['_date'], ['statementnum'], ['agent_invid'] ], }, + #for importing invoices from a legacy system for display purposes only + # no effect upon balance + 'legacy_cust_bill' => { + 'columns' => [ + 'legacyinvnum', 'serial', '', '', '', '', + 'legacyid', 'varchar', 'NULL', $char_d, '', '', + 'custnum', 'int', '', '', '', '', + '_date', @date_type, '', '', + 'charged', @money_type, '', '', + 'content_pdf', 'blob', 'NULL', '', '', '', + 'content_html', 'text', 'NULL', '', '', '', + 'locale', 'varchar', 'NULL', 16, '', '', + ], + 'primary_key' => 'legacyinvnum', + 'unique' => [], + 'index' => [ ['legacyid', 'custnum', 'locale' ], ], + }, + 'cust_statement' => { 'columns' => [ 'statementnum', 'serial', '', '', '', '', @@ -1994,31 +2012,32 @@ sub tables_hashref { 'svc_dsl' => { 'columns' => [ - 'svcnum', 'int', '', '', '', '', - 'pushed', 'int', 'NULL', '', '', '', - 'desired_due_date', 'int', 'NULL', '', '', '', - 'due_date', 'int', 'NULL', '', '', '', - 'vendor_order_id', 'varchar', 'NULL', $char_d, '', '', - 'vendor_qual_id', 'varchar', 'NULL', $char_d, '', '', - 'vendor_order_type', 'varchar', 'NULL', $char_d, '', '', + 'svcnum', 'int', '', '', '', '', + 'pushed', 'int', 'NULL', '', '', '', + 'desired_due_date', 'int', 'NULL', '', '', '', + 'due_date', 'int', 'NULL', '', '', '', + 'vendor_order_id', 'varchar', 'NULL', $char_d, '', '', + 'vendor_qual_id', 'varchar', 'NULL', $char_d, '', '', + 'vendor_order_type', 'varchar', 'NULL', $char_d, '', '', 'vendor_order_status', 'varchar', 'NULL', $char_d, '', '', - 'first', 'varchar', 'NULL', $char_d, '', '', - 'last', 'varchar', 'NULL', $char_d, '', '', - 'company', 'varchar', 'NULL', $char_d, '', '', - 'phonenum', 'varchar', 'NULL', 24, '', '', - 'loop_type', 'char', 'NULL', 1, '', '', - 'local_voice_provider', 'varchar', 'NULL', $char_d, '', '', - 'circuitnum', 'varchar', 'NULL', $char_d, '', '', - 'rate_band', 'varchar', 'NULL', $char_d, '', '', - 'vpi', 'int', 'NULL', '', '', '', - 'vci', 'int', 'NULL', '', '', '', - 'isp_chg', 'char', 'NULL', 1, '', '', - 'isp_prev', 'varchar', 'NULL', $char_d, '', '', - 'username', 'varchar', 'NULL', $char_d, '', '', - 'password', 'varchar', 'NULL', $char_d, '', '', - 'staticips', 'text', 'NULL', '', '', '', - 'monitored', 'char', 'NULL', 1, '', '', - 'last_pull', 'int', 'NULL', '', '', '', + 'first', 'varchar', 'NULL', $char_d, '', '', + 'last', 'varchar', 'NULL', $char_d, '', '', + 'company', 'varchar', 'NULL', $char_d, '', '', + 'phonenum', 'varchar', 'NULL', 24, '', '', + 'gateway_access_number', 'varchar', 'NULL', 24, '', '', + 'loop_type', 'char', 'NULL', 1, '', '', + 'local_voice_provider', 'varchar', 'NULL', $char_d, '', '', + 'circuitnum', 'varchar', 'NULL', $char_d, '', '', + 'rate_band', 'varchar', 'NULL', $char_d, '', '', + 'vpi', 'int', 'NULL', '', '', '', + 'vci', 'int', 'NULL', '', '', '', + 'isp_chg', 'char', 'NULL', 1, '', '', + 'isp_prev', 'varchar', 'NULL', $char_d, '', '', + 'username', 'varchar', 'NULL', $char_d, '', '', + 'password', 'varchar', 'NULL', $char_d, '', '', + 'staticips', 'text', 'NULL', '', '', '', + 'monitored', 'char', 'NULL', 1, '', '', + 'last_pull', 'int', 'NULL', '', '', '', ], 'primary_key' => 'svcnum', 'unique' => [ ], @@ -2669,6 +2688,30 @@ sub tables_hashref { 'index' => [], }, + #not really part of the above rate_ stuff (used with flat rate rather than + # rated billing), but could be eventually, and its a rate + 'rate_tier' => { + 'columns' => [ + 'tiernum', 'serial', '', '', '', '', + 'tiername', 'varchar', '', $char_d, '', '', + ], + 'primary_key' => 'tiernum', + 'unique' => [ [ 'tiername'], ], + 'index' => [], + }, + + 'rate_tier_detail' => { + 'columns' => [ + 'tierdetailnum', 'serial', '', '', '', '', + 'tiernum', 'int', '', '', '', '', + 'min_quan', 'int', '', '', '', '', + 'min_charge', 'decimal', '', '10,4', '', '', + ], + 'primary_key' => 'tierdetailnum', + 'unique' => [], + 'index' => [ ['tiernum'], ], + }, + 'usage_class' => { 'columns' => [ 'classnum', 'serial', '', '', '', '', @@ -2856,24 +2899,17 @@ sub tables_hashref { 'max_callers', 'int', 'NULL', '', '', '', ### - # fields for unitel/RSLCOM/convergent that don't map well to asterisk - # defaults - # though these are now used elsewhere: + # old fields for unitel/RSLCOM/convergent that don't map to asterisk + # ones we adoped moved to "own fields" section below # charged_party, upstream_price, rated_price, carrierid, cdrtypenum ### - #cdr_type: Usage = 1, S&E = 7, OC&C = 8 - 'cdrtypenum', 'int', 'NULL', '', '', '', - - 'charged_party', 'varchar', 'NULL', $char_d, '', '', - 'upstream_currency', 'char', 'NULL', 3, '', '', 'upstream_price', 'decimal', 'NULL', '10,4', '', '', 'upstream_rateplanid', 'int', 'NULL', '', '', '', #? # how it was rated internally... 'ratedetailnum', 'int', 'NULL', '', '', '', - 'rated_price', 'decimal', 'NULL', '10,4', '', '', 'distance', 'decimal', 'NULL', '', '', '', 'islocal', 'int', 'NULL', '', '', '', # '', '', 0, '' instead? @@ -2884,16 +2920,24 @@ sub tables_hashref { 'description', 'varchar', 'NULL', $char_d, '', '', 'quantity', 'int', 'NULL', '', '', '', - #cdr_carrier: Telstra =1, Optus = 2, RSL COM = 3 - 'carrierid', 'int', 'NULL', '', '', '', - 'upstream_rateid', 'int', 'NULL', '', '', '', ### #and now for our own fields ### - # a svcnum... right..? + 'cdrtypenum', 'int', 'NULL', '', '', '', + + 'charged_party', 'varchar', 'NULL', $char_d, '', '', + + # how it was rated internally... + 'rated_price', 'decimal', 'NULL', '10,4', '', '', + 'rated_seconds', 'int', 'NULL', '', '', '', + 'rated_minutes', 'double precision', 'NULL', '', '', '', + + 'carrierid', 'int', 'NULL', '', '', '', + + # service it was matched to 'svcnum', 'int', 'NULL', '', '', '', #NULL, done (or something) @@ -2944,6 +2988,8 @@ sub tables_hashref { 'acctid', 'bigint', '', '', '', '', 'termpart', 'int', '', '', '', '',#future use see below 'rated_price', 'decimal', 'NULL', '10,4', '', '', + 'rated_seconds', 'int', 'NULL', '', '', '', + 'rated_minutes', 'double precision', 'NULL', '', '', '', 'status', 'varchar', 'NULL', 32, '', '', 'svcnum', 'int', 'NULL', '', '', '', ],