From cccd0b7cd38a88c131e19981be38434f87abe194 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 21 Oct 2005 15:21:37 +0000 Subject: add CASH and WEST payment types (payments only, not cust_main.payby) --- httemplate/edit/cust_main/billing.html | 54 ++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_main/billing.html') diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 17b1b0cc9..caac3a956 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -4,6 +4,11 @@ my( $cust_main ) = @_; my $conf = new FS::Conf; my $payby_default = $conf->config('payby-default'); +my @payby = $conf->config('payby'); +#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) +@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) + unless grep /\w/, @payby; + if ( $payby_default eq 'HIDE' ) { $cust_main->payby('BILL') unless $cust_main->payby; @@ -294,15 +299,60 @@ if ( $payby_default eq 'HIDE' ) { '', + 'CASH' => + + ''. + + qq!!. + qq!!. + + ''. + ''. + ''. + ''. + ''. + ''. + + '
${r}Amount
 
 
 
 
 
 
', + + 'WEST' => + + ''. + + qq!!. + qq!!. + + ''. + ''. + ''. + ''. + ''. + ''. + + '
${r}Amount
 
 
 
 
 
 
', + ); - tie my %options, 'Tie::IxHash', + + my %allopt = ( 'CARD' => 'Credit card', 'CHEK' => 'Electronic check', 'LECB' => 'Phone bill billing', 'BILL' => 'Billing', + 'CASH' => 'Cash', # initial payment, then billing', + 'WEST' => 'Western Union', # initial payment, then billing', 'COMP' => 'Complimentary', - ; + ); + if ( $cust_main->custnum ) { #don't offer CASH and WEST initial payment types + # when editing customer + delete $allopt{$_} for qw(CASH WEST); + } + + tie my %options, 'Tie::IxHash', + map { $_ => $allopt{$_} } + grep { exists $allopt{$_} } + @payby; + my %payby2option = ( ( map { $_ => $_ } keys %options ), 'DCRD' => 'CARD', -- cgit v1.2.1