X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_refund.cgi;h=27c4b193759b8548c65c42a481cf5106e99f748a;hp=bfcbfe725dae9cb05d49235e38bbc13c179f091e;hb=360f89789c45e1fd7cb84b1442d2f0c8353066d9;hpb=46bbbb1a78fd822805226abea832b6206273c091 diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi index bfcbfe725..27c4b1937 100755 --- a/httemplate/edit/cust_refund.cgi +++ b/httemplate/edit/cust_refund.cgi @@ -10,7 +10,7 @@ <% small_custview($custnum, $conf->config('countrydefault')) %> % } -
+ @@ -34,7 +34,7 @@ % }
Payment - <% ntable("#cccccc", 2) %> + @@ -85,7 +85,8 @@
Refund -<% ntable("#cccccc", 2) %> + +
Amount$<% $cust_pay->paid %>
@@ -102,10 +103,65 @@ +
DateCheck #
+% } +% elsif ($payby eq 'CHEK') { +% + +% my @cust_payby = (); +% if ( $payby eq 'CARD' ) { +% @cust_payby = $cust_main->cust_payby('CARD','DCRD'); +% } elsif ( $payby eq 'CHEK' ) { +% @cust_payby = $cust_main->cust_payby('CHEK','DCHK'); % } else { +% die "unknown payby $payby"; +% } +% +% my $custpaybynum = length(scalar($cgi->param('custpaybynum'))) +% ? scalar($cgi->param('custpaybynum')) +% : scalar(@cust_payby) && $cust_payby[0]->custpaybynum; +<& /elements/tr-select-cust_payby.html, + 'cust_payby' => \@cust_payby, + 'curr_value' => $custpaybynum, + 'onchange' => 'cust_payby_changed(this)', +&> + + +

+

+> + + +<& /elements/cust_payby_new.html, + 'cust_payby' => \@cust_payby, + 'curr_value' => $custpaybynum, +&> + +
+
+ +% } else { + % } +

+ <& /elements/tr-select-reason.html, 'field' => 'reasonnum', 'reason_class' => 'F', @@ -116,7 +172,7 @@

- +

@@ -157,6 +213,9 @@ if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { } die "no custnum or paynum specified!" unless $custnum; +my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); +die "unknown custnum $custnum" unless $cust_main; + my $_date = time; my $p1 = popurl(1);