X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fcust_bill.cgi;h=45e19d4365d47049d57d69b966086efec0fe3dd3;hb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9;hp=9282b70890dbd768c0dff4e1df46229e08deed9e;hpb=c28a4c33a88dfa354436f81a2e213638088adcf1;p=freeside.git
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 9282b7089..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,16 +23,53 @@ 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
+
<% } %>
-Reprint this invoice
+Re-print this invoice
<% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { %>
| Re-email
@@ -41,7 +84,7 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum;
<% if ( $conf->exists('invoice_latex') ) { %>
- View typeset invoice
+ View typeset invoice
<% } %>
@@ -67,12 +110,9 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum;
<%= $cust_bill->print_text('', $templatename) %>+
<%= join('', $cust_bill->print_text('', $templatename) ) %><% } %>