Current File : /home/obabain/ms_obaba_in/SalesQuotationMain24.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ include file="Connection.jsp" %>
         <%!String lpo=null;
    int inid=0;
    String date=null;
    %>
    <%    
	Statement st=con.createStatement();
    ResultSet rs=st.executeQuery("select * from ip_quotes24 where quote_id=(select max(quote_id) from ip_quotes24)");
    while(rs.next())
    {
    lpo=rs.getString("quote_number");
    }
    rs=st.executeQuery("select NOW() as date");
    while(rs.next())
    {
    date=rs.getString("date");
    }
    
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"  rel="stylesheet">
    <link href="css/select2.min.css" rel="stylesheet">
    <link href="css/jquery.datetimepicker.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%@include file="master.jsp" %>
<form  method="post" name= "so" action="sqMainDA24.jsp">

<div class="content">
<div class="row">
<div class="col-md-9"  style="background-color:#eae9e9;width:80%;">
<div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Sales Quotation</h3>
              </div>
             </div>
<div class="panel-body">
<div align="right" >
 <a href="ViewSquotation.jsp" style="background:#009191;" class="btn btn-info"  >View</a>
 </div>
<div class="row">
<div class="form-group col-xs-3">
             
            <div class="onerow">
            Last Quotation Created:<span style="color:red;"><%=lpo %></span>
            </div>
            </div>
</div>
<div class="row">
<div class="form-group col-xs-2">
            <div class="onerow">
            <p><label for="status" style="margin:5px;">
Quote No.<span style="color:red;">*</span></label></p>
<input type="text"  class="form-control" name="SOno" id="sqno">
</div>
</div>

<div class="form-group col-xs-2">
<p><label for="status" style="margin:5px;">
Quote Date <span style="color:red;">*</span></label></p>
<input type="text" class="form-control" name="date" id="datetimepicker">
</div>
<div class="form-group col-xs-2">
<p><label for="status" style="margin:5px;">
Date Expires <span style="color:red;">*</span></label></p>
<input type="text" class="form-control" name="expdate" id="datetimepickerex">
</div> 

<div class="form-group col-xs-3">
<p><label for="status" style="margin:5px;">
Client Name</label></p>
<select id="ddlsname" name="cname" class="form-control">
<option value="0">select</option>
<%Statement st1=con.createStatement();
ResultSet r1=st1.executeQuery("select * from ip_clients order by client_name asc");
while(r1.next())
{
%>
<option value="<%=r1.getString("client_id") %>"><%=r1.getString("client_name") %></option>
<%} %>
</select>
</div>
</div>
<div class="row">
<div class="form-group col-xs-2">
<p><label for="status" style="margin:5px;">
Status</label></p>

<select class="form-control" name="status">
<%
Statement sts=con.createStatement();
ResultSet rt=sts.executeQuery("select * from ip_status");
while(rt.next())
{
	 %>
<option value="<%=rt.getString("id")%>"><%=rt.getString("description")%></option>
<%} %>
</select>
</div>
<div class="form-group col-xs-2">
 <p> <label for="invgrp" style="margin:5px;">
Invoice Group</label></p>
<select  class="form-control" name="invgrp">
<option value="1">Quote default</option>
<option value="2">Invoice default</option>
<option value="3">Porder default</option>
</select>


</div>

<div class="form-group col-xs-2">
            <p><label for="status" style="margin:5px;">
Payment Terms</label></p>
<input type="text"  class="form-control" name="pay" >
</div>





<div class="form-group col-xs-2">
            <p><label for="status" style="margin:5px;">
Dispatch through</label></p>
<input type="text"  class="form-control" name="disp" value="By Road">
</div>

<div class="form-group col-xs-2">
             
            <p> <label for="year" style="margin:5px;" >
Year</label></p>
<select name="year" class="form-control">
<%
Statement st7=con.createStatement();
ResultSet r7=st7.executeQuery("select * from year_break");
while(r7.next())
{
%>
<option value="<%=r7.getString("year_id") %>"><%=r7.getString("year") %></option>
<%} %>
</select>
</div>
</div>
</div>
<div class="modal-footer" id="contact_submit">
<input type="button" value="Back" style="background:#009191;" class="btn btn-info pull-left"  onclick="goBack()"/>
<a class="btn btn-default" href="SalesQuotationMain.jsp" >Reset</a>
<input type="submit" value="Next" style="background:#009191" class="btn btn-info" onclick="validate();">
</div>

</div>
</div>
</div>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function validate()
{
	 
	 // var t2=document.po.expdate.value;
	  var t3=document.getElementById("sqno").value;
	 var t1=document.getElementById("datetimepicker").value;
	  var t4=document.getElementById("datetimepickerex").value;
	  
	  
	  if( t1==null || t1=="" || t4==null || t4=="" ||  t3==null || t3=="" )
		  
		 alert('Fill all mandatory fields');

		  
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></script>
    <script src="js/select2.min.js"></script>
    <script src="js/jquery.datetimepicker.full.js"></script>
   
    <script>
    $('select').select2();
    </script>
     <script>
     jQuery('#datetimepicker').datetimepicker({
    	 timepicker:false,
    	 todayBtn: "linked"
    	 //mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
    	});
     jQuery('#datetimepickerex').datetimepicker({
    	 timepicker:false,
    	 todayBtn: "linked"
    	 //mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
    	});
    </script>
    <script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>