X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_bill_pay.cgi;h=f620fc57aaf2a0222690999b144d5e3a908cb3d5;hp=d27d5c1da467c092ab93ab2c0e129c1b8daad5d7;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hpb=33f1aac64b6f373538796ec616280b173f977f97 diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi index d27d5c1da..f620fc57a 100755 --- a/httemplate/edit/cust_bill_pay.cgi +++ b/httemplate/edit/cust_bill_pay.cgi @@ -1,87 +1,13 @@ -<% header("Apply Payment", '') %> - -% if ( $cgi->param('error') ) { - Error: <% $cgi->param('error') %> -

-% } - -
- -Payment #<% $paynum %> - - -
Date: <% time2str("%D", $cust_pay->_date) %> - -
Amount: $<% $cust_pay->paid %> - -
Unapplied amount: $<% $unapplied %> - - - -
Invoice # - -
Amount $ - -
-
- -
- - - +<& elements/ApplicationCommon.html, + 'form_action' => 'process/cust_bill_pay.cgi', + 'src_table' => 'cust_pay', + 'src_thing' => emt('payment'), + 'dst_table' => 'cust_bill', + 'dst_thing' => emt('invoice'), +&> <%init> -my($paynum, $amount, $invnum); -if ( $cgi->param('error') ) { - $paynum = $cgi->param('paynum'); - $amount = $cgi->param('amount'); - $invnum = $cgi->param('invnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $paynum = $1; - $amount = ''; - $invnum = ''; -} - -my $otaker = getotaker; - -my $p1 = popurl(1); - -my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ); -die "payment $paynum not found!" unless $cust_pay; - -my $unapplied = $cust_pay->unapplied; - -my @cust_bill = sort { $a->_date <=> $b->_date - or $a->invnum <=> $b->invnum - } - grep { $_->owed != 0 } - qsearch('cust_bill', { 'custnum' => $cust_pay->custnum } ); +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Apply payment'); -