X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=d354561e53874b5f4c2789a07766e2fae4cc8355;hb=44b5d849d7fb3af5ea1e2812097126633add0fd4;hp=2043b45ec3aceae50ac66eeb91f944385f304854;hpb=669bd6b315633c99ac61441198c2c4e45401c36b;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 2043b45ec..d354561e5 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -500,9 +500,6 @@ sub tables_hashref { 'quantity', 'int', 'NULL', '', '', '', 'unitsetup', @money_typen, '', '', 'unitrecur', @money_typen, '', '', - 'duplicate', 'char', 'NULL', 1, '', '', - 'post_total', 'char', 'NULL', 1, '', '', - 'type', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'billpkgnum', 'unique' => [], @@ -525,6 +522,39 @@ sub tables_hashref { 'index' => [ [ 'billpkgnum' ], [ 'pkgnum', 'invnum' ] ], }, + #instead of 'duplicate', 'char', 'NULL', 1, '', '', + # that way we keep display vs *TOTALLY* out of the table for actual + # finanancial line items + 'cust_bill_pkg_display' => { + 'columns' => [ + 'billpkgdisplaynum', 'serial', '', '', '', '', + 'billpkgnum', 'int', '', '', '', '', + 'section', 'varchar', 'NULL', $char_d, '', '', + #override the linked real one?#'unitsetup', @money_typen, '', '', + #this too?#'unitrecur', @money_typen, '', '', + 'post_total', 'char', 'NULL', 1, '', '', + 'type', 'char', 'NULL', 1, '', '', + #any other fields we need to control this display-only line item... + ], + 'primary_key' => 'billpkgdisplaynum', + 'unique' => [], + 'index' => [ ['billpkgnum'], ], + }, + + #and this, to break down a line item into slices for taxation purposes + #(instead of creating usage line items for each usage class) + 'cust_bill_pkg_slice' => { + 'columns' => [ + 'slicenum', 'serial', '', '', '', '', + 'billpkgnum', 'int', '', '', '', '', + 'amount', @money_typen, '', '', + 'classnum', 'int', '', '', '', '', + ], + 'primary_key' => 'slicenum', + 'unique' => [], + 'index' => [ [ 'billpkgnum' ], [ 'classnum' ], ], + }, + 'cust_credit' => { 'columns' => [ 'crednum', 'serial', '', '', '', '', @@ -945,6 +975,19 @@ sub tables_hashref { 'index' => [ [ 'pkgnum' ], [ 'optionname' ] ], }, + 'cust_pkg_detail' => { + 'columns' => [ + 'pkgdetailnum', 'serial', '', '', '', '', + 'pkgnum', 'int', '', '', '', '', + 'detail', 'varchar', '', $char_d, '', '', + 'detailtype', 'char', '', 1, '', '', # "I"nvoice or "C"omment + 'weight', 'int', '', '', '', '', + ], + 'primary_key' => 'pkgdetailnum', + 'unique' => [], + 'index' => [ [ 'pkgnum', 'detailtype' ] ], + }, + 'cust_pkg_reason' => { 'columns' => [ 'num', 'serial', '', '', '', '', @@ -956,7 +999,7 @@ sub tables_hashref { ], 'primary_key' => 'num', 'unique' => [], - 'index' => [], + 'index' => [ [ 'pkgnum' ], [ 'reasonnum' ], ['action'], ], }, 'cust_refund' => { @@ -1921,10 +1964,12 @@ sub tables_hashref { #NULL, done (or something) 'freesidestatus', 'varchar', 'NULL', 32, '', '', + 'cdrbatch', 'varchar', 'NULL', $char_d, '', '', + ], 'primary_key' => 'acctid', 'unique' => [], - 'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ] ], + 'index' => [ [ 'calldate' ], [ 'dst' ], [ 'accountcode' ], [ 'freesidestatus' ], [ 'cdrbatch' ], ], }, 'cdr_calltype' => {