X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Ffs-setup;h=1c720e6985a56e9121803fee9e7ecb74ea29b629;hb=895e5dd0c472e41875435cc625f1ca0a36bd2524;hp=faa0e07f1b3409556b0a55ef01ca821f8413e649;hpb=3ae5a3652e8d8270ba7d5b6cd061bf28fe629e61;p=freeside.git diff --git a/bin/fs-setup b/bin/fs-setup index faa0e07f1..1c720e698 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.44 2001-08-29 08:45:04 ivan Exp $ +# $Id: fs-setup,v 1.52 2001-09-04 11:15:15 ivan Exp $ #to delay loading dbdef until we're ready BEGIN { $FS::Record::setup_hack = 1; } @@ -79,6 +79,7 @@ my(%tables)=&tables_hash_hack; #turn it into objects my($dbdef) = new DBIx::DBSchema ( map { my(@columns); + warn $tables{$_}{'columns'}; while (@{$tables{$_}{'columns'}}) { my($name,$type,$null,$length)=splice @{$tables{$_}{'columns'}}, 0, 4; push @columns, new DBIx::DBSchema::Column ( $name,$type,$null,$length ); @@ -317,6 +318,19 @@ sub tables_hash_hack { 'index' => [ ['custnum'] ], }, + 'cust_credit_bill' => { + 'columns' => [ + 'creditbillnum', 'int', '', '', + 'crednum', 'int', '', '', + 'invnum', 'int', '', '', + '_date', @date_type, + 'amount', @money_type, + ], + 'primary_key' => 'creditbillnum', + 'unique' => [ [] ], + 'index' => [ ['crednum'], ['invnum'] ], + }, + 'cust_main' => { 'columns' => [ 'custnum', 'int', '', '', @@ -398,7 +412,8 @@ sub tables_hash_hack { 'cust_pay' => { 'columns' => [ 'paynum', 'int', '', '', - 'invnum', 'int', '', '', + #now cust_bill_pay #'invnum', 'int', '', '', + 'custnum', 'int', '', '', 'paid', @money_type, '_date', @date_type, 'payby', 'char', '', 4, # CARD/BILL/COMP, should be index into @@ -408,7 +423,20 @@ sub tables_hash_hack { ], 'primary_key' => 'paynum', 'unique' => [ [] ], - 'index' => [ ['invnum'] ], + 'index' => [ [] ], + }, + + 'cust_bill_pay' => { + 'columns' => [ + 'billpaynum', 'int', '', '', + 'invnum', 'int', '', '', + 'paynum', 'int', '', '', + 'amount', @money_type, + '_date', @date_type + ], + 'primary_key' => 'billpaynum', + 'unique' => [ [] ], + 'index' => [ [ 'paynum', 'invnum' ] ], }, 'cust_pay_batch' => { #what's this used for again? list of customers @@ -456,7 +484,8 @@ sub tables_hash_hack { 'cust_refund' => { 'columns' => [ 'refundnum', 'int', '', '', - 'crednum', 'int', '', '', + #now cust_credit_refund #'crednum', 'int', '', '', + 'custnum', 'int', '', '', '_date', @date_type, 'refund', @money_type, 'otaker', 'varchar', '', 8, @@ -464,12 +493,27 @@ sub tables_hash_hack { 'payby', 'char', '', 4, # CARD/BILL/COMP, should be index # into payment type table. 'payinfo', 'varchar', 'NULL', 16, #see cust_main above + 'paybatch', 'varchar', 'NULL', $char_d, ], 'primary_key' => 'refundnum', 'unique' => [ [] ], - 'index' => [ ['crednum'] ], + 'index' => [ [] ], + }, + + 'cust_credit_refund' => { + 'columns' => [ + 'creditrefundnum', 'int', '', '', + 'crednum', 'int', '', '', + 'refundnum', 'int', '', '', + 'amount', @money_type, + '_date', @date_type + ], + 'primary_key' => 'creditrefundnum', + 'unique' => [ [] ], + 'index' => [ [ 'crednum', 'refundnum' ] ], }, + 'cust_svc' => { 'columns' => [ 'svcnum', 'int', '', '',