X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=a0bec39065f01cf49ec98fbd3b131ba0cf523c19;hb=7bdf17a005cf4c0fe8b6b6ad1ce97abaa52a4510;hp=6c475c5f2da8c10fe84db72d5890d1ebefb9f4ee;hpb=33aeb33a7fafaf099c679c6d7150b54b99e4810f;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 6c475c5f2..a0bec3906 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -1,13 +1,63 @@ <% my( $cust_main ) = @_; - my $conf = new FS::Conf; my $custnum = $cust_main->custnum; + + my $conf = new FS::Conf; + + my @payby = grep /\w/, $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 @payby; + my %payby = map { $_=>1 } @payby; + + my $s = 0; + %>

Payment History
-Post cash/check payment -| Process credit card payment -| Process electronic check (ACH) payment + +<% if ( $payby{'BILL'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Post check payment + +<% } %> + +<% if ( $payby{'CASH'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Post cash payment + +<% } %> + +<% if ( $payby{'WEST'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Post Western Union payment + +<% } %> + +<% if ( $payby{'CARD'} || $payby{'DCRD'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Process credit card payment + +<% } %> + +<% if ( $payby{'CHEK'} || $payby{'DCHK'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Process electronic check (ACH) payment + +<% } %> + +<% if ( $payby{'MCRD'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Post manual credit card payment + +<% } %> +
Post credit
@@ -51,8 +101,12 @@ foreach my $cust_pay ($cust_main->cust_pay) { $payby =~ s/^BILL$/Check #/ if $payinfo; $payby =~ s/^CHEK$/Electronic check /; $payby =~ s/^PREP$/Prepaid card /; + $payby =~ s/^CARD$/Credit card #/; + $payby =~ s/^COMP$/Complimentary by /; + $payby =~ s/^CASH$/Cash/; + $payby =~ s/^WEST$/Western Union/; + $payby =~ s/^MCRD$/Manual credit card/; $payby =~ s/^BILL$//; - $payby =~ s/^(CARD|COMP)$/$1 /; my $info = $payby ? " ($payby$payinfo)" : ''; my( $pre, $post, $desc, $apply, $ext ) = ( '', '', '', '', '' ); @@ -175,11 +229,24 @@ foreach my $cust_pay_void ($cust_main->cust_pay_void) { $payby =~ s/^(CARD|COMP)$/$1 /; my $info = $payby ? " ($payby$payinfo)" : ''; + my $unvoid = ''; + if ( $cust_pay_void->closed !~ /^Y/i && $conf->exists('unvoid') ) { + $unvoid = qq! (unvoid)!; + } + push @history, { 'date' => $cust_pay_void->_date, 'desc' => "Payment $info voided ". time2str("%D", $cust_pay_void->void_date). - " by ". $cust_pay_void->otaker. '', + " by ". $cust_pay_void->otaker. ''. $unvoid, 'void_payment' => $cust_pay_void->paid, }; @@ -259,7 +326,10 @@ foreach my $cust_credit ($cust_main->cust_credit) { push @history, { 'date' => $cust_credit->_date, 'desc' => $pre. "Credit$post by ". $cust_credit->otaker. - ' ('. $cust_credit->reason. ')'. + ( $cust_credit->reason + ? ' ('. $cust_credit->reason. ')' + : '' + ). "$desc$apply$delete$unapply", 'credit' => $cust_credit->amount, }; @@ -288,7 +358,7 @@ foreach my $cust_refund ($cust_main->cust_refund) { %> -<%= table() %> +<%= include("/elements/table.html") %> Date Description