X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=3c28774988367861ec73a799bf52e0c914a22803;hb=443150b6184876c967adffa199c20f53d5b76075;hp=aaa200fc4232b664b14f1438b59a4c34cdb85f9c;hpb=2a6aa24137ddd389c1e644f5ece325c5b5dbaf3a;p=freeside.git diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index aaa200fc4..3c2877498 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' ) { @@ -76,29 +74,27 @@ Payment - -
- - -<%once> -my $conf = new FS::Conf; +% if ( $link eq 'popup' ) { + + +% } else { + <% include('/elements/footer.html') %> +% } -my %payby = ( - 'BILL' => 'Check', - 'CASH' => 'Cash', - 'WEST' => 'Western Union', - 'MCRD' => 'Manual credit card', -); +<%init> + +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); if ( $cgi->param('error') ) { $link = $cgi->param('link'); @@ -127,7 +123,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; @@ -138,5 +134,5 @@ if ( $link eq 'invnum' ) { } elsif ( $link eq 'custnum' ) { $custnum = $linknum; } - +