X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=4dff06d88255767fd661671af51b1aecf085defd;hb=4396080ed2829ae0595f1fd777f39d090c9bcd7c;hp=92abb7be85ae2a96efe0653570aa86ae4999124a;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 92abb7be8..4dff06d88 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -4,24 +4,22 @@ <% include("/elements/header.html", $title, '') %> % } -<% include('/elements/error.html') %> - - - - - +<% include('/elements/init_calendar.html') %> -
- - +<% include('/elements/error.html') %> % unless ( $link eq 'popup' ) { <% small_custview($custnum, $conf->config('countrydefault')) %> % } + + + +

+ Payment <% ntable("#cccccc", 2) %> @@ -45,7 +43,7 @@ Payment Amount <% $money_char %> - by <% $payby{$payby} %> + by <% FS::payby->payname($payby) %> % if ( $payby eq 'BILL' ) { @@ -74,37 +72,40 @@ Payment % } - +% if ( $conf->exists('pkg-balances') ) { + <% include('/elements/tr-select-cust_pkg-balances.html', + 'custnum' => $custnum, + 'cgi' => $cgi + ) + %> +% } else { + +% } - +
- - -<%once> +% if ( $link eq 'popup' ) { + + +% } else { + <% include('/elements/footer.html') %> +% } -my $conf = new FS::Conf; +<%init> -my %payby = ( - 'BILL' => 'Check', - 'CASH' => 'Cash', - 'WEST' => 'Western Union', - 'MCRD' => 'Manual credit card', -); +my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; - -<%init> - die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Post payment'); -my($link, $linknum, $paid, $payby, $payinfo, $_date); +my($link, $linknum, $paid, $payby, $payinfo, $_date, $pkgnum); if ( $cgi->param('error') ) { $link = $cgi->param('link'); $linknum = $cgi->param('linknum'); @@ -132,7 +133,7 @@ if ( $cgi->param('error') ) { my $paybatch = "webui-$_date-$$-". rand() * 2**32; -my $title = 'Post '. $payby{$payby}. ' payment'; +my $title = 'Post '. FS::payby->payname($payby). ' payment'; $title .= " against Invoice #$linknum" if $link eq 'invnum'; my $custnum; @@ -140,8 +141,8 @@ if ( $link eq 'invnum' ) { my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) or die "unknown invnum $linknum"; $custnum = $cust_bill->custnum; -} elsif ( $link eq 'custnum' ) { +} elsif ( $link eq 'custnum' || $link eq 'popup' ) { $custnum = $linknum; } - +