X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_credit_bill.cgi;h=5fdc0ba1854715f327b3fdee6267abff35fdce9e;hp=409ea3c254e98a2e0c39235055e3abf8404d93c7;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi index 409ea3c25..5fdc0ba18 100755 --- a/httemplate/edit/cust_credit_bill.cgi +++ b/httemplate/edit/cust_credit_bill.cgi @@ -1,94 +1,97 @@ -<% - -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') ) { %> - Error: <%= $cgi->param('error') %> +% +% +%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') ) { + + 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; -%> + +% +%my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ); +%die "credit $crednum not found!" unless $cust_credit; +% +%my $credited = $cust_credit->credited; +% -Credit #<%= $crednum %> - -
Date: <%= time2str("%D", $cust_credit->_date) %> +Credit #<% $crednum %> + -
Amount: $<%= $cust_credit->amount %> +
Date: <% time2str("%D", $cust_credit->_date) %> -
Unapplied amount: $<%= $credited %> +
Amount: $<% $cust_credit->amount %> -
Reason: <%= $cust_credit->reason %> +
Unapplied amount: $<% $credited %> -<% -my @cust_bill = grep $_->owed != 0, - qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } ); +
Reason: <% $cust_credit->reason %> +% +%my @cust_bill = grep $_->owed != 0, +% qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } ); +% +% -%>
Invoice # -
Amount $ +
Amount $