X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_bill.cgi;h=45e19d4365d47049d57d69b966086efec0fe3dd3;hp=38c57ec181539dbc3987476c9d2a48cfe253f671;hb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9;hpb=1045de52b8e6e9acc46bc9f250711929394ba1c7 diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 38c57ec18..45e19d436 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'); @@ -17,13 +23,50 @@ my $custnum = $cust_bill->getfield('custnum'); my $link = $templatename ? "$templatename-$invnum" : $invnum; %> -<%= header('Invoice View', menubar( +<%= include("/elements/header.html",'Invoice View', menubar( "Main Menu" => $p, "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 @@ -67,11 +110,8 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum; <%= $part_bill_event->event %> - <% if ( - $part_bill_event->plan eq 'send_alternate' - && $part_bill_event->plandata =~ /^(agent_)?templatename (.*)$/m - ) { - my $alt_templatename = $2; + <% if ( $part_bill_event->templatename ) { + my $alt_templatename = $part_bill_event->templatename; my $alt_link = "$alt_templatename-$invnum"; %> ( view