X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=56c0c17360dfd78f4d7885ae098352ad0392dedf;hb=8f5c91d6c7a8dc85a8b6768a149b4c7b3e144c38;hp=d149cf1720a6e1d410b6bf9fcf095041bf6fd6e4;hpb=684a478c0f88e5bf6d1d3f32f4618089146b5709;p=freeside.git diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index d149cf172..56c0c1736 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -8,6 +8,12 @@ my $invnum = $3; 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 $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Invoice #$invnum not found!" unless $cust_bill; my $custnum = $cust_bill->getfield('custnum'); @@ -22,8 +28,45 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", )) %> -<% if ( $cust_bill->owed > 0 ) { %> - Enter payments (check/cash) against this invoice | +<% if ( $cust_bill->owed > 0 + && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} ) + ) + { + my $s = 0; +%> + + Post + + <% if ( $payby{'BILL'} ) { %> + + <%= $s++ ? ' | ' : '' %> + check + + <% } %> + + <% if ( $payby{'CASH'} ) { %> + + <%= $s++ ? ' | ' : '' %> + cash + + <% } %> + + <% if ( $payby{'WEST'} ) { %> + + <%= $s++ ? ' | ' : '' %> + Western Union + + <% } %> + + <% if ( $payby{'MCRD'} ) { %> + + <%= $s++ ? ' | ' : '' %> + manual credit card + + <% } %> + + payment against this invoice
+ <% } %> Re-print this invoice