X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=inline;f=httemplate%2Fedit%2Fcust_pay.cgi;h=c0a679b03252c5079b5c7a9a4750ce1c4ea1f71d;hb=6cc863d8b6ae6771a019c83c91be143842de17bf;hp=90f1f00261b8c5d2ae4b1704e3bd591c0de1924e;hpb=328223d69a72ceaf25597410f581d006351222cb;p=freeside.git
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi
index 90f1f0026..c0a679b03 100755
--- a/httemplate/edit/cust_pay.cgi
+++ b/httemplate/edit/cust_pay.cgi
@@ -36,9 +36,12 @@ if ( $cgi->param('error') ) {
my $paybatch = "webui-$_date-$$-". rand() * 2**32;
+my $title = 'Post payment';
+$title .= " against Invoice #$linknum" if $link eq 'invnum';
+
%>
-<%= header("Post payment", '') %>
+<%= header($title, '') %>
<% if ( $cgi->param('error') ) { %>
Error: <%= $cgi->param('error') %>
@@ -61,47 +64,9 @@ my $paybatch = "webui-$_date-$$-". rand() * 2**32;
my $money_char = $conf->config('money_char') || '$';
my $custnum;
if ( $link eq 'invnum' ) {
-
my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } )
or die "unknown invnum $linknum";
- print "Invoice #$linknum". ntable("#cccccc",2).
- '
Date | '.
- time2str("%D", $cust_bill->_date). ' |
'.
- 'Items | ';
- foreach ( $cust_bill->cust_bill_pkg ) { #false laziness with FS::cust_bill
- if ( $_->pkgnum ) {
-
- my($cust_pkg)=qsearchs('cust_pkg', { 'pkgnum', $_->pkgnum } );
- my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->pkgpart});
- my($pkg)=$part_pkg->pkg;
-
- if ( $_->setup != 0 ) {
- print "$pkg Setup "; # $money_char. sprintf("%10.2f",$_->setup);
- print join(' ',
- map { " ". $_->[0]. ": ". $_->[1] } $cust_pkg->labels
- ). ' ';
- }
-
- if ( $_->recur != 0 ) {
- print
- "$pkg (" . time2str("%x",$_->sdate) . " - " .
- time2str("%x",$_->edate) . ") ";
- #$money_char. sprintf("%10.2f",$_->recur)
- print join(' ',
- map { '--->'. $_->[0]. ": ". $_->[1] } $cust_pkg->labels
- ). ' ';
- }
-
- } else { #pkgnum Tax
- print "Tax " # $money_char. sprintf("%10.2f",$_->setup)
- if $_->setup != 0;
- }
-
- }
- print ' |
';
-
$custnum = $cust_bill->custnum;
-
} elsif ( $link eq 'custnum' ) {
$custnum = $linknum;
}
@@ -138,9 +103,16 @@ Payment
Check # |
|
+
+<% if ( $link eq 'custnum' ) { %>
Auto-apply to invoices |
|
+<% } elsif ( $link eq 'invnum' ) { %>
+ Apply to |
+ Invoice #<%= $linknum %> only |
+
+<% } %>