first part of ACL and re-skinning work and some other small stuff
[freeside.git] / httemplate / edit / process / cust_credit.cgi
index 85bfd44..6a4ef19 100755 (executable)
@@ -13,14 +13,23 @@ my $error = $new->insert;
 
 if ( $error ) {
   $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string );
+
+  %><%= $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string ) %><%
+
 } else {
+
   if ( $cgi->param('apply') eq 'yes' ) {
     my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum })
       or die "unknown custnum $custnum";
     $cust_main->apply_credits;
   }
-  print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
-}
+  #print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
+
+  %><%= header('Credit sucessful') %>
+  <SCRIPT TYPE="text/javascript">
+    window.top.location.reload();
+  </SCRIPT>
+
+  </BODY></HTML>
 
-%>
+<% } %>