[freeside-commits] freeside/httemplate/edit/process cust_refund.cgi, 1.6.2.2, 1.6.2.3
Ivan,,,
ivan at wavetail.420.am
Tue Sep 2 18:46:47 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv6706/httemplate/edit/process
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_refund.cgi
Log Message:
add back ability to post a check/cash refund. be more explicit about it instead of just being a checkbox when posting a credit. RT#3812
Index: cust_refund.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_refund.cgi,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- cust_refund.cgi 13 Jan 2008 21:36:08 -0000 1.6.2.2
+++ cust_refund.cgi 3 Sep 2008 01:46:45 -0000 1.6.2.3
@@ -2,18 +2,32 @@
% $cgi->param('error', $error);
<% $cgi->redirect(popurl(2). "cust_refund.cgi?". $cgi->query_string ) %>
%} else {
+%
+% if ( $link eq 'popup' ) {
+%
+<% header('Refund entered') %>
+ <SCRIPT TYPE="text/javascript">
+ window.top.location.reload();
+ </SCRIPT>
+
+ </BODY></HTML>
+% } else {
<% $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum") %>
+% }
%}
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Refund payment');
+ unless $FS::CurrentUser::CurrentUser->access_right('Refund payment')
+ || $FS::CurrentUser::CurrentUser->access_right('Post refund');
$cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!";
my $custnum = $1;
my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
or die "unknown custnum $custnum";
+my $link = $cgi->param('popup') ? 'popup' : '';
+
my $error = '';
if ( $cgi->param('payby') =~ /^(CARD|CHEK)$/ ) {
my %options = ();
@@ -31,13 +45,12 @@
'reason' => $reason,
%options );
} else {
- die 'unimplemented';
- #my $new = new FS::cust_refund ( {
- # map {
- # $_, scalar($cgi->param($_));
- # } ( fields('cust_refund'), 'paynum' )
- #} );
- #$error = $new->insert;
+ my $new = new FS::cust_refund ( {
+ map {
+ $_, scalar($cgi->param($_));
+ } fields('cust_refund') #huh? , 'paynum' )
+ } );
+ $error = $new->insert;
}
</%init>
More information about the freeside-commits
mailing list