Current File : //home/obabain/public_html/abc/iGST_form.jsp
<%@include file="master.jsp"%>
 <%@include file="Connection.jsp" %> 
   

<%


 
ResultSet rs= null;
%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>

<style type="text/css">
.highlight-error {
	border-color: red;
}
/* table, th, td {
    border: 1px solid black;
    width:30px;
} */

.inlineTable {
            display: inline-block;
        }

.panel-default>.panel-heading-custom {
	background: #ff0000;
	color: #fff;
}
.vr {
    width:10px;
    background-color:#000;
    position:absolute;
    top:0;
    bottom:0;
    left:150px;
}

</style>
<!-- <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">-->
<script
	src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script
	src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<body>
	<div class="row">
		
			<section id="main">
				<div class="container">
					<div class="row" style="width: 110%">
						<div class="col-md-10">
							<div class="panel panel-default">
								<div class="panel-heading main-color-bg">
									<h3 class="panel-title">IGST Form:</h3>
								</div>


<%-- <%!int id;String Dpayment,lable,bankaccount,f_dDate,number,amount,paymenttype;ResultSet rs=null;%> --%>
<form action="" method="post" >
								<!--  <div class="panel panel-">-->
								<!--   <div class="panel-heading main-color-bg"></div>-->

<%--  
<%
 try{ 
String id=request.getParameter("Id");
int no=Integer.parseInt(id);

String query = "select * from fiscal_tax where f_id='"+no+"'";
 rs = st.executeQuery(query);
while(rs.next()){
	id=rs.getString("f_id");
	Dpayment=rs.getString("Dpayment");
	lable=rs.getString("lable");
	 System.out.println(lable); 
	 bankaccount=rs.getString("bankaccount");
	 f_dDate=rs.getString("f_dDate");
	 number=rs.getString("number");
	 amount=rs.getString("amount");
	 paymenttype=rs.getString("paymenttype");
%>

								
								
   <%
}

} catch (Exception e) {
e.printStackTrace();
}
%>         --%>                     
                                
 





								
								<br> 

								<div class="panel-body">

									<!-- <div class="row">

									

<label for="lastname" style="margin-left:50px;float:left;">IGST :&nbsp;<button type="button" class="btn "style="margin:px;">NEW</button></label> 


	<label for="lastname" style="margin-left: 300px;">Status : Unpaid</label> 
	
										<div class="form-group col-xs-2">
											<p><label for="lastname" style="margin: 5px;"> </label>
											</p></div>
									</div><br> -->
									
									<div class="row">
									


	<label for="lastname" style="margin-left:48px;">Type &nbsp; :&nbsp;<a onclick="show('Page1');"><button type="button" class="btn btn-primary "style="margin:px;">Payment</button></a>&nbsp;<a onclick="show('Page2');"><button type="button" class="btn btn-primary"style="margin:px;">Refund</button></a></label>	<br>			
												
<%-- <label for="lastname" style="margin-left:50px;">Type  &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :&nbsp;<%=lable%></label>  --%>
								
							
				</div>
		<script>
		function show(elementID) {
		    var ele = document.getElementById(elementID);
		    if (!ele) {
		        alert("no such element");
		        return;
		    }
		    var pages = document.getElementsByClassName('page');
		    for(var i = 0; i < pages.length; i++) {
		        pages[i].style.display = 'none';
		    }
		    ele.style.display = 'block';
		}
</script>
	



									<hr>
                                  <div class="column">
   <div id="Page1" class="page" style="display:">
 <div class="panel-body">
  <b style="float:left;color:#0071df;margin-top:-20px;">Payment_IGST :</b>
          <div align="right" >
<a href="view_payment_iGST.jsp"><input type="button" value="View " style="background:#204b58;margin-right:40px" class="btn btn-info"  /></a>

 </div>
         
  <table>
  
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px">Date of&nbsp;Payment:&nbsp;</label></td>  
    <td><input type="date" name="Dpayment" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:115px" >Value Date&nbsp; :&nbsp;</label></td>  
    <td><input type="date" name="valuedate" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;"/></td>   
        
        
        </tr>
        </table><br>
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px">Lable:&nbsp;</label></td>  
    <td><input type="text" name="lable" value="Sales&nbsp;Tax&nbsp;Payment" id="register_name" style="width:160px;margin-top:-1px;margin-left:73px"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:120px" >Amount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="amount" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;margin-left:1px"/></td>   
        
        
        </tr>
        </table><br>
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px">Bank&nbsp;Account&nbsp;&nbsp;&nbsp; :&nbsp;</label></td>  
    <td><input type="text" name="bankaccount" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:1px"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:100px" >Payment Type&nbsp;:</label></td>  
    <td><input type="text" name="paymenttype" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;"/></td>   
        
        
        </tr>
        </table><br>
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:19px">Number(Check/Transfer)&nbsp; :&nbsp;</label></td>  
    <td><input type="text" name="number" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:1px"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:100px" ></label></td>  
    <td><!-- <input type="text" name="b_bankname" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;"/> --></td>   
        
        
        </tr>
        </table>

</div>
    
      
<br> 
                 <!-- <div class="col-md-10"> -->
                <div class="modal-footer" >

       <!--  <a class="btn btn-info" href="FiscalTaxPayment.jsp" style="background:#204b58">Enter Payment</a>
          <button type="submit" style="background:#204b58" class="btn btn-info" >Delete</button>   
 </div>
 <a class="btn btn-info" href="ModifyFiscalTax.jsp"  style="background:#204b58 ;margin-left:100px;" class="btn btn-info">Modify </a> -->
 <a href="<%-- <%=rs.getString("f_id")%>"> --%>"><input type="button" value="Back" style="background:#204b58;margin-right:680px" class="btn btn-info" /></a>
          <a class="btn btn-default"  href="#">Reset</a>
      <!--  <button type="submit" style="background:#204b58" class="btn btn-info" >Save Changes</button>-->
         <input type="submit" style="background:#204b58;" class="btn btn-info" value="Save Changes">
 	
</div>
<!-- </div> --></div>
              </div>
              
          <!-- -----  Refund start -->  
          
     	
   <%
String r_Dpayment=request.getParameter("r_Dpayment");
String r_lable=request.getParameter("r_lable");
String r_bankaccount=request.getParameter("r_bankaccount");
String r_number=request.getParameter("r_number");
String r_valuedate=request.getParameter("r_valuedate");
String r_amount=request.getParameter("r_amount");
String r_paymenttype=request.getParameter("r_paymenttype");


try
{
	if(r_Dpayment!=null||r_Dpayment.length()!=0){
	
		Statement st=con.createStatement();
	 st=con.createStatement();
int i=st.executeUpdate("insert into Refund_igst_form(r_Dpayment,r_lable,r_bankaccount,r_number,r_valuedate,r_amount,r_paymenttype)values('"+r_Dpayment+"','"+r_lable+"','"+r_bankaccount+"','"+r_number+"','"+r_valuedate+"','"+r_amount+"','"+r_paymenttype+"')");
out.println("");
}}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>      
                 
      							
                                  <div class="column">
   <div id="Page2" class="page"  style="display:none">
   
   
 <div class="panel-body">
 <b style="float:left;color:#0071df;margin-top:-20px;">Refund Form:</b>
  <div align="right" >
<a href="View_Refund_iGST.jsp"><input type="button" value="View " style="background:#204b58;margin-right:40px" class="btn btn-info"  /></a>
 </div>
   
  <table>
  
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px">Date of&nbsp;Payment:&nbsp;</label></td>  
    <td><input type="date" name="r_Dpayment" value="" id="register_name" style="width:160px;margin-top:-1px;"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:115px" >Value Date&nbsp; :&nbsp;</label></td>  
    <td><input type="date" name="r_valuedate" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;"/></td>   
        
        
        </tr>
        </table><br>
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px">Lable:&nbsp;</label></td>  
    <td><input type="text" name="r_lable" value="Sales&nbsp;Refund" id="register_name" style="width:160px;margin-top:-1px;margin-left:73px"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:120px" >Amount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="r_amount" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;margin-left:1px"/></td>   
        
        
        </tr>
        </table><br>
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px">Bank&nbsp;Account&nbsp;&nbsp;&nbsp; :&nbsp;</label></td>  
    <td><input type="text" name="r_bankaccount" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:1px"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:100px" >Payment Type&nbsp;:</label></td>  
    <td><input type="text" name="r_paymenttype" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;"/></td>   
        
        
        </tr>
        </table><br>
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:20px">Number(Check/Transfer)&nbsp; :&nbsp;</label></td>  
    <td><input type="text" name="r_number" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:1px"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:100px" ></label></td>  
    <td><!-- <input type="text" name="b_bankname" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;"/> --></td>   
        
        
        </tr>
        </table>

</div>
    
      
<br> 
                 <!-- <div class="col-md-10"> -->
                <div class="modal-footer" >

       <!--  <a class="btn btn-info" href="FiscalTaxPayment.jsp" style="background:#204b58">Enter Payment</a>
          <button type="submit" style="background:#204b58" class="btn btn-info" >Delete</button>   
 </div>
 <a class="btn btn-info" href="ModifyFiscalTax.jsp"  style="background:#204b58 ;margin-left:100px;" class="btn btn-info">Modify </a> -->
 <a href="<%-- <%=rs.getString("f_id")%>"> --%>"><input type="button" value="Back" style="background:#204b58;margin-right:680px" class="btn btn-info" /></a>
          <a class="btn btn-default"  href="#">Reset</a>
      <!--  <button type="submit" style="background:#204b58" class="btn btn-info" >Save Changes</button>-->
         <input type="submit" style="background:#204b58;" class="btn btn-info" value="Save Changes">
 	
</div>
<!-- </div> --></div>
              </div> 
									
	                               
                                
                                
                                
							</form>
							
	
   <%
String Dpayment=request.getParameter("Dpayment");
String lable=request.getParameter("lable");
String bankaccount=request.getParameter("bankaccount");
String number=request.getParameter("number");
String valuedate=request.getParameter("valuedate");
String amount=request.getParameter("amount");
String paymenttype=request.getParameter("paymenttype");


try
{
	if(Dpayment!=null||Dpayment.length()!=0){
		Statement st=con.createStatement();
	
	 st=con.createStatement();
int i=st.executeUpdate("insert into Payment_igst_form(Dpayment,lable,bankaccount,number,valuedate,amount,paymenttype)values('"+Dpayment+"','"+lable+"','"+bankaccount+"','"+number+"','"+valuedate+"','"+amount+"','"+paymenttype+"')");
out.println("");
}}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>    						
							
							
							
							
						</div>
					</div>
				</div>
	</div>
	
	</section>
	<%-- <% }else{ 
     response.sendRedirect("login.jsp");
    } %> --%>
	<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
	<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>

	<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
	<script
		src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
	<script
		src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
	<script
		src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
	<script type="text/javascript">
		$('[data-type="adhaar-number"]').keyup(
				function() {
					var value = $(this).val();
					value = value.replace(/\D/g, "").split(/(?:([\d]{4}))/g)
							.filter(s = s.length > 0).join("-");
					$(this).val(value);
				});

		$('[data-type="adhaar-number"]').on("change, blur", function() {
			var value = $(this).val();
			var maxLength = $(this).attr("maxLength");
			if (value.length != maxLength) {
				$(this).addClass("highlight-error");
				alert("Aadhar card number not valid");
			} else {
				$(this).removeClass("highlight-error");
			}
		});
	</script>
	
	</div>
</body>
</html>