From 3d484726954a5b91bf1f7f7068e7e15c22fade3e Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 26 Aug 2006 12:57:42 +0000 Subject: [PATCH] fix javascript for auto-setting application amount --- httemplate/edit/cust_bill_pay.cgi | 2 - httemplate/edit/cust_credit_bill.cgi | 98 ++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 56 deletions(-) diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi index d27d5c1da..498d477cd 100755 --- a/httemplate/edit/cust_bill_pay.cgi +++ b/httemplate/edit/cust_bill_pay.cgi @@ -81,7 +81,5 @@ my @cust_bill = sort { $a->_date <=> $b->_date } grep { $_->owed != 0 } qsearch('cust_bill', { 'custnum' => $cust_pay->custnum } ); - - diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi index 5fdc0ba18..249ba31d0 100755 --- a/httemplate/edit/cust_credit_bill.cgi +++ b/httemplate/edit/cust_credit_bill.cgi @@ -1,44 +1,11 @@ -% -% -%my($crednum, $amount, $invnum); -%if ( $cgi->param('error') ) { -% #$cust_credit_bill = new FS::cust_credit_bill ( { -% # map { $_, scalar($cgi->param($_)) } fields('cust_credit_bill') -% #} ); -% $crednum = $cgi->param('crednum'); -% $amount = $cgi->param('amount'); -% #$refund = $cgi->param('refund'); -% $invnum = $cgi->param('invnum'); -%} else { -% my($query) = $cgi->keywords; -% $query =~ /^(\d+)$/; -% $crednum = $1; -% $amount = ''; -% #$refund = 'yes'; -% $invnum = ''; -%} -% -%my $otaker = getotaker; -% -%my $p1 = popurl(1); -% -% <% header("Apply Credit", '') %> -% if ( $cgi->param('error') ) { +% if ( $cgi->param('error') ) { Error: <% $cgi->param('error') %>

% } -
-% -%my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ); -%die "credit $crednum not found!" unless $cust_credit; -% -%my $credited = $cust_credit->credited; -% - Credit #<% $crednum %> @@ -50,28 +17,18 @@ Credit #<% $crednum %>
Unapplied amount: $<% $credited %>
Reason: <% $cust_credit->reason %> -% -%my @cust_bill = grep $_->owed != 0, -% qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } ); -% -% -