<?php include 'header1f.php';?>
<?php 
$query2job = "select * from check_month";
$resultjob = mysql_query($query2job,$conn);
while($rowmonth=mysql_fetch_array($resultjob))

{
$check_month = $rowmonth['check_month'];
 }

date_default_timezone_set('Asia/Calcutta');
$today = date("d-m-Y");
$time = date("h:i A"); 
$currentmonth = date("m");
date_default_timezone_set('Asia/Calcutta');
$today = date("d-m-Y");
$today8days = date("d-m-Y")+8;

$time = date("h:i A");
$currentmonth = date("m"); 
$currentyear = date("y"); 
if($currentmonth>$check_month) { 
$cuyear = date("Y");
$cuyear1 = date("y")+1;

} else { 
$cuyear = date("Y")-1;
$cuyear1 =  date("y");
 } 
 $fin_year = "$cuyear"."-"."$cuyear1";

?>



													   
  <div class="content-page">
    <div class="content">
      <div class="container">
	  <div class="row">
          <div class="col-sm-12">
            <div class="page-header-title">
            <button type="button" class="btn btn-dark waves-effect waves-light" onclick="location.href='index.php'">BACK </button>
              <div class="clearfix"></div>
            </div>
          </div>
        </div>
	 
	  <form name="chkForm" id="chkForm"  action="insert_direct_trans_invno.php" method="post">
					<input  type="hidden" name="main_id" value="<?php echo $_REQUEST['main_id'];?>" />
					
		  										
<?php $query2c = "select * from main_job_details where main_id='".$_REQUEST['main_id']."'";
		                 				$result2c = mysql_query($query2c,$conn);	
										while($row = mysql_fetch_array($result2c)){
													 $customer_name = $row['customer_name'];
													 $customer_id = $row['customer_id'];
}												?>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="panel panel-primary">
                                <div class="panel-heading">
                                    <h3 class="panel-title">Direct Transporter </h3></div>
                                <div class="panel-body">
                                    <div class="row">
                                                    <div class="col-sm-12 col-xs-12"><div class="form-group">
                                                        <label>Transport</label>
                                                            <select class="form-control" name="transport_name"/>
			   <option value="">Select Transport </option>
			   <? $query2s = "select * from transport_master order by transport_name";
		          $result2s = mysql_query($query2s,$conn);	
				  while($row = mysql_fetch_array($result2s)){
				  $transport_name = $row['transport_name'];
				  $transport_id = $row['transport_id'];
			  ?>
				 <option value="<? echo $transport_id?>"><? echo $transport_name?></option>
				 <? } ?></select>
                                                    </div>
													</div>
													
												
													<div class="col-sm-12 col-xs-12"><div class="form-group">
                                                        <label>Customer Name</label>
                                                  <select class="form-control" name="customer_id"/>
									<option value="">Select Customer </option>
									
												<option value="<? echo $customer_id?>" selected="selected"><? echo $customer_name?></option>
											
									 <? $query2c = "select * from customer_master order by customer_name";
		                 				$result2c = mysql_query($query2c,$conn);	
										while($row = mysql_fetch_array($result2c)){
													 $customer_name = $row['customer_name'];
													 $customer_id = $row['customer_id'];
												?>
												<option value="<? echo $customer_id?>"><? echo $customer_name?></option>
												<? } ?></select>
                                                    </div>
													</div>
													
													<div class="col-sm-12 col-xs-12"><div class="form-group">
                                                        <label>Invoice type</label>
                                                     <select class="form-control" id="lsrc" name="challan_id[]" multiple="multiple"> 
<?php $query2c = "select * from challan_master where trans_inv_no='' and main_id='".$_REQUEST['main_id']."'";
		                 				$result2c = mysql_query($query2c,$conn);	
										while($row = mysql_fetch_array($result2c)){
													 $challan_id = $row['challan_id'];
													 $challan_no = $row['challan_no'];
												?>
												<option value="<? echo $challan_id?>"><? echo $challan_no?></option>
												<? } ?>
</select>

                                                    </div>
													</div>
													
														<div class="col-sm-12 col-xs-12"><div class="form-group">
                                                        <label>Date</label>
														<div class="input-group">
														 <input type="text" class="datepicker1 form-control"  name="trans_inv_date" value="<?php echo $today?>">
														<span class="input-group-addon bg-custom b-0"><i class="mdi mdi-calendar text-white"></i></span></div>
                                             
                                                    </div>
													</div>
													
												
													<div class="col-sm-12 col-xs-12"><div class="form-group">
                                                        <label>Advance Recived </label>
                                                          <input type="text" class="form-control"  name="advance" value="">
                                                    </div>
													</div>
													
													
													<div class="col-sm-12 col-xs-12"><div class="form-group">
                                                        <label>GST Type</label>
                                                        <select name="gst_inv_type" class="form-control"> 
			   <option value="GST">GST</option>
			   <option value="RCM">RCM</option>
			   </select>
                                                    </div>
													</div>
												
													
												
                                              <div class="col-sm-12 col-xs-12">
                                           
                                            <div class="m-t-20">
                                                    <div class="form-group">
                                                        <div>
                                                          <input class="btn btn-primary " type="submit" name="Submit" value="NEXT" >
						
															
                                                           
                                                        </div>
                                                    </div>
                                               
                                            </div>
                                        </div>      
                                                    
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					</form>
        
        
      </div>
    </div>
   	<?php include 'footer1a.php';?>
