X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fcust_bill.cgi;h=45e19d4365d47049d57d69b966086efec0fe3dd3;hb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9;hp=d149cf1720a6e1d410b6bf9fcf095041bf6fd6e4;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index d149cf172..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