X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_bill_pay.cgi;h=8cdf4509a76e0d475d5ec0418ea485b63c77138e;hp=793ed100947aef5674a946b24225791a87dda8da;hb=47c39af359fc93c777714a5c50a6183747b66da9;hpb=c980083d90ee8796d8241686390048aee6d4fff9 diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi index 793ed1009..8cdf4509a 100755 --- a/httemplate/edit/cust_bill_pay.cgi +++ b/httemplate/edit/cust_bill_pay.cgi @@ -1,36 +1,22 @@ + <% -# - -use strict; -use vars qw( $cgi $query $custnum $paynum $amount $invnum $p1 $otaker $cust_pay ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Date::Format; -use FS::UID qw(cgisuidsetup getotaker); -use FS::CGI qw(header popurl); -use FS::Record qw(qsearch fields); -use FS::cust_pay; -use FS::cust_bill; - - -$cgi = new CGI; -cgisuidsetup($cgi); +my($paynum, $amount, $invnum); if ( $cgi->param('error') ) { $paynum = $cgi->param('paynum'); $amount = $cgi->param('amount'); $invnum = $cgi->param('invnum'); } else { - ($query) = $cgi->keywords; + my($query) = $cgi->keywords; $query =~ /^(\d+)$/; $paynum = $1; $amount = ''; $invnum = ''; } -$otaker = getotaker; +my $otaker = getotaker; -$p1 = popurl(1); +my $p1 = popurl(1); print header("Apply Payment", ''); print qq!Error: !, $cgi->param('error'), @@ -40,7 +26,8 @@ print < END -die unless $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ); +my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ); +die "payment $paynum not found!" unless $cust_pay; my $unapplied = $cust_pay->unapplied; @@ -72,14 +59,13 @@ foreach my $cust_bill ( @cust_bill ) { END } -#print < -#END -print "\n"; +print < +END print qq!
Invoice #