X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay.cgi;h=3c28774988367861ec73a799bf52e0c914a22803;hb=3e9d87cff65fea3973ecc00c648454b5f58a9c78;hp=855fbfcf125f4492a9030d2545e0d677ac86cd5e;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 855fbfcf1..3c2877498 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -4,27 +4,22 @@ <% include("/elements/header.html", $title, '') %> % } -% if ( $cgi->param('error') ) { - Error: <% $cgi->param('error') %> -

-% } - - - - - +<% include('/elements/init_calendar.html') %> -
- - +<% include('/elements/error.html') %> % unless ( $link eq 'popup' ) { <% small_custview($custnum, $conf->config('countrydefault')) %> % } + + + +

+ Payment <% ntable("#cccccc", 2) %> @@ -48,7 +43,7 @@ Payment Amount <% $money_char %> - by <% $payby{$payby} %> + by <% FS::payby->payname($payby) %> % if ( $payby eq 'BILL' ) { @@ -79,29 +74,27 @@ Payment - -
- - -<%once> -my $conf = new FS::Conf; +% if ( $link eq 'popup' ) { + + +% } else { + <% include('/elements/footer.html') %> +% } + +<%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); if ( $cgi->param('error') ) { $link = $cgi->param('link'); @@ -130,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; @@ -141,5 +134,5 @@ if ( $link eq 'invnum' ) { } elsif ( $link eq 'custnum' ) { $custnum = $linknum; } - +