<html>
<head>
<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" />
<link rel="stylesheet" href="css/font.css" type="text/css" />
<script type="text/javascript" src="js/jobcard_quotation_ajax.js"></script>
<script src="js/jquery/jquery.js" type="text/javascript"></script>
<script src="js/jquery/jquery-1.8.2.js"></script>
<script src="js/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="js/jquery/autocomplete_jquery_plugin.js"></script>
<script src="js/shortcut.js"  type="text/javascript"></script>
<script type="text/javascript" src="js/enter_event_ajax.js"></script>

<script>
function add_new_party(url)
{	
onmouseover10= window.open(url,'onmouseover10','height=400,width=650,scrollbars=no,resizable=no,left=50,top=50,toolbar=no,location=no,directories=no,status=no');	
}
function image_upload_jobcardquot(url)
{	
onmouseover10= window.open(url,'onmouseover10','height=400,width=650,scrollbars=no,resizable=no,left=50,top=50,toolbar=no,location=no,directories=no,status=no');	
}

function jobcard_quot_validation()
{

    var customer_name = document.getElementById("customer_name_quot").value;
	if(customer_name=='')
	{
		document.getElementById("customer_name_validation_div").innerHTML="* This field is Required.";
		document.getElementById("customer_name_quot").focus();
		return false;
	}
	
	var style_no = document.getElementById("style_no_quot").value;
	if(style_no=='')
	{
		document.getElementById("style_no_validation_div").innerHTML="* This field is Required.";
		document.getElementById("style_no_quot").focus();
		return false;
	}
	var created_by = document.getElementById("created_by_quot").value;
	if(created_by=='')
	{
		document.getElementById("job_created_by_validation_div").innerHTML="* This field is Required.";
		document.getElementById("created_by_quot").focus();
		return false;
	}
	var style_name = document.getElementById("style_name_quot").value;
	if(style_name=='')
	{
		document.getElementById("style_name_validation_div").innerHTML="* This field is Required.";
		document.getElementById("style_name_quot").focus();
		return false;
	}
	var cust_po_no = document.getElementById("cust_po_no_quot").value;
	if(cust_po_no=='')
	{
		document.getElementById("cust_po_no_validation_div").innerHTML="* This field is Required.";
		document.getElementById("cust_po_no_quot").focus();
		return false;
	}
	var combo = document.getElementById("combo_quot").value;
	if(combo=='')
	{
		document.getElementById("combo_validation_div").innerHTML="* This field is Required.";
		document.getElementById("combo_quot").focus();
		return false;
	}
}
function confirmmsg()
{
   return confirm("Are you want to conform ther jobcard?");
}
var sm = jQuery.noConflict();
sm().ready(function() 
{ 
	sm("#customer_name_quot").autocomplete("include/autocomplete/cust_name_auto.php", {
	width: 250,
	matchContains: true,
	selectFirst: true
	});	
});




 function order_entry_search(from_date,to_date,customer_name)
 {
  jQuery.ajax({
  type: "POST",
  url: "order/order_entry/order_entry_list.php",
  data: "from_date="+from_date+"&to_date="+to_date+"&customer_name="+customer_name,
  success: function(msg){jQuery("#order_main_list_div").html(msg);
 }
    });
 }
 
 function jobcardquot_close()
{
window.location.href="main_fram.php?file=jobcard_quotation_list";
}
var loadFile = function(event) {
    var output = document.getElementById('image_name');
	document.getElementById('image_name').style.display = 'block';
	var test = document.getElementById('image_names');
    output.src = URL.createObjectURL(event.target.files[0]);
};
function upload() 
{
    jQuery.ajax({
        url: "jobcard/jobcard_entry/file_upload.php",
		type: "POST",             
		data: new FormData(this), 
		contentType: false,      
		cache: false,           
		processData:false,
        success: function(msg){
        }
    });
    return false;
}
jQuery(document).on("click", "#upload", function() {
	var file_data = jQuery("#jobcard_image").prop("files")[0];   // Getting the properties of file from file field
	var form_data = new FormData();                  // Creating object of FormData class
	form_data.append("file", file_data)              // Appending parameter named file with properties of file_field to form_data
	form_data.append("user_id", 123)                 // Adding extra parameters to form_data
	jQuery.ajax({
                url: "jobcard/jobcard_entry/file_upload.php",
                dataType: 'script',
                cache: false,
                contentType: false,
                processData: false,
                data: form_data,                         // Setting the data attribute of ajax with file_data
                type: 'post'
       })
})
</script>
<style> 
.someclass{ 
background:url(img/plus.png) no-repeat 0 0 ; 
} 
  .types_class1 { 
    height: 25px; 
    width: 250px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:13px;
	font-family:Verdana;
	
  }
  input:focus {  border-color:#87BB07; }
select:focus {  border-color:#87BB07; } 
textarea:focus {  border-color:#87BB07; } 
</style> 
<?php
error_reporting(0);
date_default_timezone_set('Asia/Kolkata');
include ("include/db.php");	
	
$from_date=$_POST['from_date'];
$to_date=$_POST['to_date'];
$purchas_ordr_num=$_POST['purchas_ordr_num'];

/******************** Auto Generated ID*********************************************/

	$fulldate=date("Y-m-d");
		  $fyear=date("Y");
		  $current_date=$fulldate;
		  $cur_year=$fyear;
	  
		  $acc_from=$cur_year."-04-01"; 
		  if($acc_from<=$current_date)
		  { 
		    	$fyear=date("Y");
		    	$eyear=date("Y")+1;
		  }
		  if($acc_from>$current_date)
		  {
		 		$fyear=date("Y")-1;
		 		$eyear=date("Y");
		  }
		 $start_year=$fyear."-04-01"; 
		 $end_year=$eyear."-03-31"; 

$curyear=date('Y');
$curmon=date('m');
$next_year=$curyear+1;

if(($curmon>=4)&&($curyear==$curyear-1)||($curmon<=3)&&($curyear==$curyear))
{
	$academic=$curyear-1;
}
else
{
	$academic=$curyear;
}

$date=date("Y");
$st_date=substr($date,2);
$month=date("m");	   
$datee=$st_date.$month;

if(!isset($_GET['jobcard_quot_no']))
{
	$rs1=mysql_query("select jobcard_quot_no from  jobcard_quotation where createdate>='$start_year' and createdate<='$end_year' order by main_id	 desc");
	if($res1=mysql_fetch_assoc($rs1))
	{
		$pur_array=explode('-',$res1['jobcard_quot_no']);
	
	    $year1=$pur_array[1];
        $year2=substr($year1, 0, 2);
	    $year='20'.$year2;
		$jobcard_no=$pur_array[2];
	}
	if($jobcard_no=='')
		$jobcard_number='JQ-'.$datee.'-0001';
	else
	{
		$jobcard_no+=1;
		$jobcard_number='JQ-'.$datee.'-'.str_pad($jobcard_no, 4, '0', STR_PAD_LEFT);
	}
}
   $sql="select * from  booking_sub_list where book_no='$book_number' or book_no='$_GET[book_no]'";
    $rs=mysql_query($sql);
	$rscount_book=mysql_num_rows($rs);
  


$edit_id=$_GET['edit_id'];

ob_start();
session_start();

function get_user_type_quot($login_user_name,$login_pass_word)
{
    $sql_user="select * from  user_creation where user_name='$login_user_name' and password='$login_pass_word'";
	$rs_user=mysql_query($sql_user);
	while($rsdata_user=mysql_fetch_object($rs_user))
	{ 
	$user_type=$rsdata_user->user_type;
	}
	return $user_type;
}

function get_branch_names2_quot($book_branchs1)
{
    $sql_user="select * from  branch_creation where branch_id='$book_branchs1'";
	$rs_user=mysql_query($sql_user);
	while($rsdata_user=mysql_fetch_object($rs_user))
	{ 
	$branch_name=$rsdata_user->branch_name;
	}
	return $branch_name;
}

$login_user_name=$_SESSION['login_user_name'];
$login_pass_word=$_SESSION['login_pass_word'];
$book_branchs1=$_SESSION['branch'];
$get_user_type=get_user_type_quot($login_user_name,$login_pass_word);
$get_branch_names=get_branch_names2_quot($book_branchs1);


function get_branch_place_names($branch_places12)
{
    $sql_user="select * from  place_creation where id='$branch_places12'";
	$rs_user=mysql_query($sql_user);
	while($rsdata_user=mysql_fetch_object($rs_user))
	{ 
	$location=$rsdata_user->location;
	}
	return $location;
}

if($_GET['edit_id']!='')
{
$table_display_styles1='style="display:inline;"';
} 
else
{
$table_display_stylesss='style="display:none;"';
}

   $query12="select * from  booking_main_list where booking_no='$book_number'";
   $rs=mysql_query($query12);
   $book_no_count=mysql_num_rows($rs);
   
   
  $edit_id=$_GET['main_id'];
    $edit_id=$_GET['main_id'];
if($_GET['source']=='quotation_confirm')
{
  $sql="select * from jobcard_quotation where jobcard_quot_no='$_GET[jobcard_no]'";
}
else
{
	 $sql="select * from jobcard_quotation where main_id='$_GET[main_id]'";

}
  $rs=mysql_query($sql);
  $rscount=mysql_num_rows($rs);
 
  while($rsdata=mysql_fetch_array($rs))
  {
	   $sno=$sno+1;
	   $from=$from+1;
	   $id=$rsdata['main_id'];
	   $jobcard_no=$rsdata['jobcard_quot_no'];
	   $entry_date=$rsdata['entry_date'];
	   $created_by=$rsdata['created_by'];
	   $cust_name=$rsdata['cust_name'];
	   $style_no=$rsdata['style_no'];
	   $style_name=$rsdata['style_name'];
	   $cust_po_no=$rsdata['cust_po_no'];
	   $job_type=$rsdata['job_type'];
       $fabric_type=$rsdata['fabric_type'];
	   $combo=$rsdata['combo'];
	   $overall_value=$rsdata['overall_value'];
	   $net_total=$rsdata['net_total'];
	   $item_image1=$rsdata['item_image'];
       $order_by=$rsdata['order_by'];
	   $payment_terms=$rsdata['payment_terms'];
   


  }
  
  
?>

<style type="text/css">.style9{ text-align:left;font-family:Tahoma, Arial, Helvetica, sans-serif; font-size: 15px; padding:0px; font-weight: 600;color:#080;letter-spacing: 1px;padding:10px; background-color:#f7f7f7;}
.style4 {border-bottom: solid 1px;border-bottom-color: #CCCCCC;}
.style5 {border-left: solid 1px;border-left-color: #CCCCCC;}
.text {
	font-family: Verdana;
	font-size: 14px;
}

</style>

<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="table-responsive">
<form name="company_form"  id="company_form" method="post" action=""  enctype="multipart/form-data" >

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-top:solid 1px; color:#ddd;">
<tr align="left"  style="font-size:14px"><div class="style9">Jobcard Quotation Form</div>
<td width="12%" colspan="5" align="left"><img src="img/wrong.png" name="add_button" id="add_button" title="Cancel Booking Order"  onclick="javascript:jobcardquot_close()" align="top" width="30" height="30" border="0"  style="cursor:pointer; margin-left:96%; margin-top:-34px;" class="button green-button" >
</td>
</tr></table>

<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" >
         
           <tr>
             <td height="38">&nbsp;</td>
             <td colspan="2" align="right" class="text" style="font-size:14px; color:#080;"><span class="text" style="font-size:14px; color:#080;">&nbsp;<strong><span style="color: #F00">J</span>obcard No</strong>&nbsp;&nbsp;&nbsp;
                 <input type="hidden" readonly name="jobcard_no_quot" id="jobcard_no_quot" class="text_box" style="font-size:12px" value="<?php if(($edit_id!='')||($_GET['source']!='')) { echo $jobcard_no; } else{ echo $jobcard_number;  } ?>">
                 <input type="hidden" name="edit_id" id="edit_id" value="<?php  echo $edit_id; ?>">
                 <strong> <span style="color:#B30000;">
                 <?php if($edit_id!='') { echo $jobcard_no; } else{ echo $jobcard_number; } ?>
              </span> </strong></span></td>
             <td class="heading ">&nbsp;</td>
             <td align="right" class="text" style="font-size: 14px;">&nbsp;</td>
             <td class="heading ">&nbsp;</td>
           </tr>
           <tr>
    <td width="4%" height="38">&nbsp;</td>
    <td width="8%" align="right" class="text" style="font-size:14px; color:#080;"><strong>&nbsp;&nbsp;<span class="text" style="font-size: 14px;">&nbsp;</span></strong></td>
    <td width="9%" align="right" class="text" style="font-size:14px; color:#080;"><span class="text" style="font-size:14px; color:#080;"><strong> <span class="text" style="font-size: 14px; color: #000000; font-weight: normal;">Date&nbsp;&nbsp;</span></strong></span></td>
    <td width="18%" class="heading "><input type="datetime-local"  name="entry_time_quot" id="entry_time_quot" class="types_class1"  <?php if($_SESSION['user_type']!=1) { ?> readonly <?php } ?>  autofocus onKeyPress="enterevent(event,'order_by_quot','entry_time_quot')" tabindex="1" style="font-size:12px; height:25px; width:200px; " value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $entry_date; }  else{ echo  date('Y-m-d').'T'.date('H:i'); }?>"></td>
    <td width="12%" align="right" class="text" style="font-size: 14px;"><span class="text" style="font-size: 14px;">Order By&nbsp;&nbsp;</span></td>
    <td width="28%" class="heading "><input type="text" class="types_class1" name="order_by_quot" id="order_by_quot"    style="width:200px; height:20px;"  tabindex="7"  value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $order_by; } else { } ?>" onKeyPress="enterevent(event,'customer_name_quot','entry_time_quot')"></td>
  </tr>
  <tr>
    <td height="43">&nbsp;</td>
  <td colspan="2"  align="right" class="text" style="padding-left:15px;font-size: 14px;">Customer Name<span style="color:#FF0000">*</span>&nbsp;&nbsp;</td>
    <td>&nbsp;&nbsp;<input type="text" class="types_class1"  name="customer_name_quot" id="customer_name_quot" style="width:200px; height:20px;" onKeyUp="jobcard_quot_clear_validation(this.value)" onKeyPress="enterevent(event,'style_no_quot','customer_name_quot')" tabindex="2"  value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $cust_name; } else { } ?>" > <img src="img/add-512-2.png" width="28" height="28" title="ADD PARTY" onClick="javascript:add_new_party('master_entry/party_creation/party_creation.php?source=<?php echo "Sub";?>&order_no=<?php echo $order_num;?>')">
      <div id="customer_name_quot_validation_div" style="color:#F00"></div></td>
    <td align="right" class="text" style="font-size: 14px;">Style No<span style="color:#FF0000">*</span>&nbsp;&nbsp;</td>
    <td><input type="text" class="types_class1" name="style_no_quot" id="style_no_quot"    style="width:200px; height:20px;"  tabindex="7"  value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $style_no; } else { } ?>" onKeyPress="jobcard_quot_clear_validation(this.value),enterevent(event,'created_by_quot','style_no_quot')">
    <div id="style_no_quot_validation_div" style="color:#F00"></div></td>
  </tr>
        <tr>
    <td height="41">&nbsp;</td>
    <td colspan="2" align="right" class="text" style="font-size: 14px;">Job Created By<span style="color:#FF0000">*</span>&nbsp;&nbsp;</td>
    <td class="heading ">&nbsp;&nbsp;<input type="text"  name="created_by_quot" id="created_by_quot" class="types_class1" autofocus onKeyPress="enterevent(event,'style_name_quot','created_by_quot'),jobcard_quot_clear_validation(this.value)" tabindex="3" style="font-size:12px; height:25px; width:200px; " value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $created_by; }  else{ echo $_SESSION['login_user_name']; }?>" readonly>
      <div id="job_created_by_quot_validation_div" style="color:#F00"></div></td>
    <td align="right" class="text" style="font-size: 14px;">Style Name <span style="color:#FF0000">*</span>&nbsp;&nbsp;</td>
    <td><input type="text" class="types_class1" name="style_name_quot" id="style_name_quot" style="width:200px; height:20px;" tabindex="8"  value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $style_name; } else { } ?>" onKeyPress="jobcard_quot_clear_validation(this.value),enterevent(event,'cust_po_no_quot','style_name_quot')">
    <div id="style_name_quot_validation_div" style="color:#F00"></div></td>
  </tr>

  <tr>
    <td height="35">&nbsp;</td>
    <td colspan="2" align="right" class="text" style="font-size: 14px;">Customer Po No<span style="color:#FF0000">*</span>&nbsp;&nbsp;</td>
    <td>&nbsp;&nbsp;<input type="text" class="types_class1" name="cust_po_no_quot" id="cust_po_no_quot" style="width:200px; height:20px;" tabindex="4"  value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $cust_po_no; } else { } ?>" onKeyPress="jobcard_quot_clear_validation(this.value),enterevent(event,'combo_quot','cust_po_no_quot')">
      <div id="cust_po_no_quot_validation_div" style="color:#F00"></div></td>
    <td align="right" class="text" style="font-size: 14px;">Combo<span style="color:#FF0000">*</span>&nbsp;&nbsp;</td>
    <td><input type="text" class="types_class1" name="combo_quot" id="combo_quot" style="width:200px; height:20px;" tabindex="9"  value="<?php  if(($edit_id!='')||($_GET['source']!='')) { echo $combo; } else { } ?>" onKeyPress="enterevent(event,'jobtype_quot','combo_quot'),jobcard_quot_clear_validation(this.value)">
    <div id="combo_quot_validation_div" style="color:#F00"></div></td>
  </tr>

  <tr>
    <td height="44">&nbsp;</td>
    <td colspan="2" align="right" class="text" style="font-size: 14px;">Job Type &nbsp;&nbsp; </td>
    <td>&nbsp;&nbsp;<select id="jobtype_quot" name="jobtype_quot" style="width:200px; height:26px;" class="types_class1" onChange="get_fabric_type(this.value),enterevent(event,'fabric_type_quot','jobtype_quot')"  tabindex="">
      
     <option value="">Select</option>
	 <?php 
	 include ("../../include/db.php");
	  $sql="select * from job_type_creation order by job_type ASC";
								$sql123 = mysql_query($sql);
							while($fetch_sql123=mysql_fetch_array($sql123))
								{
									
									$job_type1=$fetch_sql123['job_type'];
									?>
									<option value="<?php echo $job_type1?>"<?php if($job_type1==$job_type ) { echo "selected"; } ?>><?php echo $job_type1; ?></option>
									<?php
									}
									?>
      
    </select></td>
    <td align="right" class="text">Image Upload&nbsp;&nbsp;</td>
    <td><a href="javascript:image_upload_jobcardquot('jobcard/quotation_jobcard/file_upload_sample.php?jobcard_no='+jobcard_no_quot.value+'&customer_name_quot='+customer_name_quot.value)"><img src="img/upload.jpg" alt="" width="37" height="28" border="0" title="Upload"/></a><!--<input type="file" name="jobcard_image" id="jobcard_image" style="height:25px;width:300px;"   onChange="loadFile(event),upload()" value="<?php if($_GET[edit_id]!='') { echo $item_image; } ?>" accept="image/x-png, image/gif, image/jpeg" tabindex="9">
        <input type="hidden" name="photos" id="photos" value="<?php echo $item_image;?>" />--></td>
  </tr>
   <tr>
    <td height="34">&nbsp;</td>
    <td colspan="2" align="right" class="text" style="font-size: 14px;">Payment Terms &nbsp;<span style="color:#FF0000">*</span>&nbsp; </td>
    <td>&nbsp;&nbsp;<select id="payment_type" name="payment_type" style="width:200px; height:26px;" class="types_class1" onChange="jobcard_quot_clear_validation(this.value)"  tabindex="">
<option value="">Select</option>
  <?php
	$sql_user="select * from  payment_terms ";
		$rs_user=mysql_query($sql_user);
			while($rsdata_user=mysql_fetch_object($rs_user))
			{ 
			$payment_terms_name=$rsdata_user->payment_terms_name;
			$id=$rsdata_user->id;

	?>
    <option value="<?php echo $payment_terms_name;?>"<?php if($payment_terms==$payment_terms_name) {?> selected <?php } ?>><?php echo $payment_terms_name;?></option>
    <?php } ?>
    </select><div id="payment_type_validation_div" style="color:#F00"></div></td>
    <td align="right" class="text"></td>
    <td>
      </td>
  </tr>
    <tr>
    <td height="116">&nbsp;</td>
  <td colspan="2" align="right" class="text"><div id="fabric_type_div1" style="display:none">Fabric Type</div></td>
    <td style="padding-left:10px;"><div id="fabric_type_div" <?php if($fabric_type=='') { ?> style="display:none" <?php } ?>><select id="fabric_type_quot" name="fabric_type_quot" style="width:200px; height:26px;" class="types_class1" onChange="enterevent(event,'particulars_quot','fabric_type_quot')"  tabindex="6">
    <option value="">--Select--</option>
    <?php
	$sql_user="select * from  fabric_type_creation ";
		$rs_user=mysql_query($sql_user);
			while($rsdata_user=mysql_fetch_object($rs_user))
			{ 
			$fabric_types=$rsdata_user->fabric_type;
			$id=$rsdata_user->id;

	?>
    <option value="<?php echo $fabric_types;?>"<?php if($fabric_types==$fabric_type) {?> selected <?php } ?>><?php echo $fabric_types;?></option>
    <?php } ?> 
    </select></div></td>
    <td>&nbsp;</td>
   <!-- <td><div id="image_upload_div"><?php if(($_GET['main_id']!='')&&($item_image1!='')) {?><img src="item_upload/<?php  echo $item_image1;?>" name="image_name" width="95" height="80" id="image_name"  />
	<?php } if(($_GET['main_id']=='')&&($item_image1=='')) { ?><img src="../ps/img/images.jpg" name="image_name" width="95" height="80" id="image_name"  /><?php  } if(($_GET['main_id']!='')&&($item_image1=='')) { ?><img src="../ps/img/images.jpg" name="image_name" width="95" height="80" id="image_name"  /><?php } ?></div></td>-->
  </tr>
  <tr>
      <td>&nbsp;</td>
  <td colspan="5" align="center"><div id="jobcard_quot_sublist_div"><?php include("jobcard_quot_sublist.php");?></div></td>
  </tr>
  </table>
  <table width="100%">
     <tr style="padding-top:10px;">
   <td width="17%"   align="center" ></td>
    <td width="29%"><span class="text" style="font-size: 14px;"><strong><strong></strong></strong></span></td>
    <td width="14%" align="right" class="text" style="font-size: 14px;"><strong></strong>&nbsp;&nbsp;</td>
        <td width="12%"></strong></td>
    <td width="28%"></td>
   </tr>
     <tr style="padding-top:10px;">
   <td   align="center" class="text" style="font-size: 14px;">Jobcard Confirm</td>
    <td width="29%"><img src="img/gr_tick.png" alt="" width="37" height="28" border="0" title="Upload" onClick="jobcard_quot_confirm(jobcard_no_quot.value,customer_name_quot.value,entry_time_quot.value,overal_tot_quot.value,net_amt_quot.value,'<?php echo $edit_id1;?>',this.value)"/></td>
    <td width="14%" align="right" class="text" style="font-size: 14px;">&nbsp;&nbsp;</td>
        <td width="12%" class="text" style="font-size: 14px;"><strong></strong></td>
    <td width="28%"></td>
   </tr>
   <tr>
  <td colspan="5">&nbsp;</td>
   </tr>
   
   
   
   
      <tr>
  <td colspan="5">&nbsp;</td>
   </tr>

         <tr>
            <td align="center" colspan="5"><input type="button" name="submit" tabindex="20" id="submit" style="background-color: #87BB07;    color: #fff;    border: 0px; font-family:verdana; font-size:14px; width:120px; height:27px; " value="<?php if($_GET['main_id']!='') { echo "UPDATE";  } else { echo "SUBMIT"; } ?>" class="button" onClick="jobcard_quot_main_list(jobcard_no_quot.value,entry_time_quot.value,customer_name_quot.value,style_no_quot.value,created_by_quot.value,style_name_quot.value,cust_po_no_quot.value,combo_quot.value,jobtype_quot.value,fabric_type_quot.value,overal_tot_quot.value,net_amt_quot.value,order_by_quot.value,payment_type.value,'<?php echo $_GET['main_id']; ?>',this.value)"  ></td>
          </tr>
        </table>
</form>
</div>
</div>
</div>
</div>