X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_refund.cgi;h=27c4b193759b8548c65c42a481cf5106e99f748a;hb=a8a95509bfca2510f1e5627e5a0d269ed78834cb;hp=32da4543ea081f991d2f839caaafc3872befb9cc;hpb=a2ecb1cf6a6c084c521710f1256da082f70ba9e5;p=freeside.git
diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi
index 32da4543e..27c4b1937 100755
--- a/httemplate/edit/cust_refund.cgi
+++ b/httemplate/edit/cust_refund.cgi
@@ -34,7 +34,7 @@
% }
Payment
- <% ntable("#cccccc", 2) %>
+
Amount | $<% $cust_pay->paid %> |
@@ -85,7 +85,8 @@
Refund
-<% ntable("#cccccc", 2) %>
+
+
+% }
+% 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',
@@ -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);