
<p><h2 align="center">Quote Offer To Customer</h2></p>

<table width="80%" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF" style="border:1px solid #CCC;" align="center">



<table width="80%">	
	
   <tr>
   <td colspan="4"><h2 style="font-size:14px; color:#006699">General Information:-</h2></td>
   </tr>
   
<tr>
<td>

<table width="100%" border="0" cellspacing="2" cellpadding="3">
 
  <tr>
    <th colspan="3">Branch</th>
    <td colspan="5"><select name="site" style="width:270px;" id="site" onchange="getCode(this.value)">
    <option value="000">Select</option>
    
		<option value=""></option>
	
    </select></td>
  </tr>

 
  <tr>
    <th width="13%">Quotation No.</th>
    <td width="15%"><input type="text" style="width:80px;" /></td>
    <th width="13%">Quotation Date </th>
    <td width="15%"><input type="text" name="quotationDate" value="" style="width:98%;" class="datepicker"/></td>
    <th width="14%">Format</th>
    <td width="30%"><input type="text" style="width:80px;" /></td>
  </tr>
  <tr>
    <th>Type Of quote</th>
    <td><input type="text" style="width:80px;" /></td>
    <th>Valid Till</th>
    <td><input type="text" style="width:80px;" /></td>
    <th>Subject</th>
    <td><input type="text" style="width:80px;" /></td>
  </tr>
  <tr>
    <th>Account Name</th>
    <td><input type="text" style="width:80px;" /></td>
    <th>Against Enquiry</th>
    <td><input type="text" style="width:80px;" /></td>
    <th>Contact Person</th>
    <td><input type="text" style="width:80px;" /></td>
  </tr>
  <tr>
    <th>Mobile No.</th>
    <td><input type="text" style="width:80px;" /></td>
    <th>Quote Stage</th>
    <td><input type="text" style="width:80px;" /></td>
    <th>Funnel</th>
    <td><input type="text" style="width:80px;" /></td>
  </tr>
</table>

</td>
</tr>

</table>




	<!--- table 2 --><table width="80%">	
	
   <tr>
   <td colspan="4"><h2 style="font-size:14px; color:#006699">Account  Billing  &  shipping  Address  Information:-</h2></td>
   </tr>
   
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
  <tr>
    <th width="25%" nowrap="nowrap" scope="row"><strong>Billing Address</strong></th>
    <td width="25%" nowrap="nowrap">
    <select name="site" style="width:98%;" id="site" onchange="getCode(this.value)">
    <option value="000">Select</option>
    
		<option value=""></option>
	
    </select></td>
    <th width="25%"><strong>Shipping Address</strong></th>
    <td width="25%" id="CODE"><input name="quotationNo" type="text" value="" size="25"  style="width:98%;"/></td>
  </tr>
  <tr>
    <th scope="row"><strong>Billing city</strong></th>
    <td nowrap="nowrap"><input type="text" name="quotationDate" value="" style="width:98%;" class="datepicker"/></td>
    <th nowrap="nowrap">shipping City</th>
    <td nowrap="nowrap"><select name="format" style="width:98%;">
      <option value="Standard">Standard</option>
    </select></td>

  </tr>
  <tr>
    <th nowrap="nowrap"><strong>Billing State</strong></th>
    <td nowrap="nowrap">
    <select name="party" style="width:98%;" onchange="enquiryDetails(this.value)">
      <option value="000">Select</option>

    </select></td>
    <th scope="row"><strong>Shipping State</strong></th>
    <td><select name="quotationType" style="width:98%;">
      <option value="M">Material</option>
      <option value="E">Export</option>
      <option value="R">Retail</option>
    </select></td>
    </tr>
	
<tr>
    <th nowrap="nowrap"><strong>Billing Postal Code</strong></th>
    <td nowrap="nowrap">
    <select name="party" style="width:98%;" onchange="enquiryDetails(this.value)">
      <option value="000">Select</option>

    </select></td>
    <th scope="row"><strong>Shipping Postal Code</strong></th>
    <td><select name="quotationType" style="width:98%;">
      <option value="M">Material</option>
      <option value="E">Export</option>
      <option value="R">Retail</option>
    </select></td>
    </tr>
	
	<tr>
    <th nowrap="nowrap"><strong>Billing Country</strong></th>
    <td nowrap="nowrap">
    <select name="party" style="width:98%;" onchange="enquiryDetails(this.value)">
      <option value="000">Select</option>

    </select></td>
    <th scope="row"><strong>Shipping Country</strong></th>
    <td><select name="quotationType" style="width:98%;">
      <option value="M">Material</option>
      <option value="E">Export</option>
      <option value="R">Retail</option>
    </select></td>
    </tr>
	
	<tr>
    <th nowrap="nowrap"><strong>Billing P.O. Box</strong></th>
    <td nowrap="nowrap">
    <select name="party" style="width:98%;" onchange="enquiryDetails(this.value)">
      <option value="000">Select</option>

    </select></td>
    <th scope="row"><strong>shipping P.O. box</strong></th>
    <td><select name="quotationType" style="width:98%;">
      <option value="M">Material</option>
      <option value="E">Export</option>
      <option value="R">Retail</option>
    </select></td>
    </tr>
	
</table>
</td>
</tr>

</table>


</form>

<form action="" method="post">
	
<input type="hidden" name="site1" value="" />
<input type="hidden" name="quotationNo1" value="" />
<input type="hidden" name="quotationDate1" value="" />
<input type="hidden" name="format1" value="" />
<input type="hidden" name="party1" value="" />
<input type="hidden" name="quotationType1" value="" />
<input type="hidden" name="enquiryNo1" value="" />
<input type="hidden" name="partyaddress11" value="" />
<input type="hidden" name="partyaddress21" value="" />
<input type="hidden" name="partyaddress31" value="" />
<input type="hidden" name="source1" value="" />
<input type="hidden" name="partyContact1" value="" />
<input type="hidden" name="ContactMobile1" value="" />
<input type="hidden" name="validTill1" value="" />

<table align="center" width="100%">
<tr><th style="text-align:center;" colspan="11">Item Details</th></tr>
<tr>
<th>Item Code</th>
<th>Item Name</th>
<th>Unit</th>
<th>Qty</th>
<th>Price</th>
<th>Per Unit(s)</th>
<th>Value</th>
<th>Discount Type</th>
<th>Discount</th>
<th>Discounted Price</th>
<th>Date Of Requisition</th>
</tr>
	         
<tr bgcolor="#FFFFFF">
<td><input type="hidden" name="itemCode" value="" id="itemCode" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="hidden" name="quantity" value=" id="quantity" /></td>
<td><input type="hidden" name="price" value=""  /></td>
<td><input type="hidden" name="PerUnits" id="PerUnits" value="" /></td>
<td><input type="hidden" name="PerUnits" id="PerUnits" value="" /></td>
<td>
<select name="discountType" id="discountType" style="width: 98%">
	<option value="A">Amount</option>
	<option value="P">Percent</option>
</select>
</td>
<td><input type="text" name="discount[<?php echo $i;?>]" id="discount_<?php echo $i;?>" value="" size="15" onblur="calculateDiscount(this.value,<?php echo $i;?>)" /></td>
<td><input type="text" name="valueAfterDisc[<?php echo $i;?>]" id="valueAfterDisc_<?php echo $i;?>" value="" size="15"/></td>
<td><?php echo $details_row['requisitionDate']?><input type="hidden" name="requisitionDate[<?php echo $i;?>]" id="requisitionDate_<?php echo $i;?>" value="<?php echo $details_row['requisitionDate']?>" size="15"/></td>
</tr>

<input type="hidden" name="count" id="count" value="<?php echo $i;?>" />
</table>
<br>
<br>
<table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="50%">
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center" bgcolor="#FFFFFF" style="border:1px solid #ccc;">
	<tr>
    	<th style="text-align:center;" colspan="2">Terms And Conditions</th>
    </tr>
    <tr>
      <th width="19%" scope="row"><strong>Pkg &amp; Forwarding</strong></th>
      <td width="28%" nowrap="nowrap">
      <select name="pack_forward" id="menu1" style="width: 49%" onchange="checkApplicable(this.value)">
      	<option value="AS">As per calculation</option>
      	<option value="NA">N/A</option>
      </select><input type="text" name="PFRemarks" id="remarks1" value="" size="23%" style="width:48%;" />
      </td>
      </tr>
      <tr>
    <th width="25%" scope="row"><strong>Freight</strong></th>
    <td width="28%" nowrap="nowrap"><select name="freight" id="menu2" style="width: 49%" onchange="checkApplicable(this.value)">
      	<option value="AS">As per calculation</option>
      	<option value="NA">N/A</option>
      </select><input type="text" name="freightRemarks" id="remarks2" value="" size="23%" style="width:48%;" /></td>
    </tr>
  <tr>
    <th scope="row"><strong>Payment Terms</strong></th>
    <td><select name="payTerms" style="width: 98%">
      	<?php 
      	$payment_sql=DB_query("Select * from paymentterms",$db);
		while($payment_row=DB_fetch_array($payment_sql))
		{?>
			<option value="<?php echo $payment_row['termsindicator'];?>"><?php echo $payment_row['terms'];?></option>
		<?php 	
		}
      	?>
      </select></td>
    </tr>
    <tr>
    <th scope="row"><strong>Sales Tax</strong></th>
    <td nowrap="nowrap"><select name="salesTax" id="menu3" style="width: 49%" onchange="checkApplicable(this.value)">
      	<option value="AS">As per calculation</option>
      	<option value="NA">N/A</option>
      </select><input type="text" name="salesRemarks" id="remarks3" value="" size="23%"  style="width:48%;"/></td>
  </tr>
  <tr>
    <th>Excise</th>
    <td nowrap="nowrap"><select name="Excise" id="" style="width: 49%" onchange="checkApplicable(this.value)">
      	<option value="AS">As per calculation</option>
      	<option value="NA">N/A</option>
      </select><input type="text" name="exciseRemarks" id="" value="" size="23%" style="width:48%;" /></td>
    </tr>
    <tr>
    <th nowrap="nowrap">Insurance</th>
    <td nowrap="nowrap"><select name="insurance" id="menu4" style="width: 49%" onchange="checkApplicable(this.value)">
      	<option value="AS">As per calculation</option>
      	<option value="NA">N/A</option>
      </select><input type="text" name="insRemarks" id="remarks4" value="" size="23%"  style="width:48%;"/></td>
    </tr>
</table>	
</td>
<td valign="top">
<table width="95%" border="0" cellspacing="1" cellpadding="0" align="right" bgcolor="#FFFFFF" style="border:1px solid #ccc;">
    		<tr>
    	<th style="text-align:center;" colspan="2">Amount And Taxes</th>
    </tr>
    <tr>
    	  <tr>
    	    <th width="14%">Basic Amount</th>
    	    <td width="31%"><input name="basicAmount" type="text" value="<?php echo $_REQUEST['basicAmount'];?>" size="25" style="width:98%;" onfocus="calculateBasic()" id="basicAmount" readonly /></td>
    	    
  	    </tr>
    	  <tr>
    	    <th nowrap="nowrap">Discounted Price</th>
    	    <td><input name="totalDiscountedPrice" id="totalDiscountedPrice" type="text" value="" size="25" style="width:98%;"  readonly onfocus="calculateDiscounted()" /></td>
    	    
  	    </tr>
    	  <tr>
    	    <th>Excise</th>
    	    <td nowrap="nowrap">
    	    <select name="exciseDuty" style="width:98%;" onchange="claculateExcise(this.value)">
    	    <option value="0">Select</option>
    	    <?php 
    	    $excise_sql=DB_query("Select * from excise_tax where caption like '%excise%' and form_type='Sales'",$db);
			while($excise_row=DB_fetch_array($excise_sql))
			{?>
				<option value="<?php echo $excise_row['id'];?>"><?php echo $excise_row['caption'];?></option>
			<?php 	
			}
    	    ?> 
  	      </select><div id="exciseId"><input name="exciseValue" id="exciseValue" type="text" value="" size="25" style="width:98%;" /></div>
    	   </tr>
    	     
    	     <?php 
    	     $cessSql=DB_query("Select caption from excise_tax where caption like '%cess%'",$db);
			 $k=1;
			 while($cessRow=DB_fetch_array($cessSql))
			 {
			 	$caption[$k]=$cessRow['caption']; 
				
				$rate_sql=DB_query("Select def_rate from excise_tax where caption='".$caption[$k]."'",$db);
				while($rate_row=DB_fetch_array($rate_sql))
				{
					$rate[$k]=$rate_row['def_rate'];
				}
				$k++;
			 } 
    	     ?>
    	     <tr>
    	    <th>E-Cess</th>
    	    <td><input name="ECessPercentage" id="ECessPercentage" type="text" value="<?php echo $rate[1];?>" size="25" style="width:20%;" readonly />
    	    	<input name="ECessValue" id="ECessValue" type="text" value="" size="25" style="width:75%;" readonly onfocus="calculateECess()"/></td>
    	    </tr>
    	    <tr>
            <th nowrap="nowrap">SAH-E Cess </th>
    	    <td><input name="SAHCessPercentage" id="SAHCessPercentage" type="text" value="<?php echo $rate[2];?>" size="25" style="width:20%;" readonly/>
    	    	<input name="SAHCessValue" id="SAHCessValue" type="text" value="" size="25" style="width:75%;" readonly onfocus="calculateSAHCess()"/></td>
  	    	</tr>
    	  
    	  
   <tr>
   	<th>Taxable Amount</th>
   	<td><input name="taxableAmount" id="taxableAmount" type="text" value="" size="25" style="width:98%;" onfocus="calculateTaxable()"/></td>
   </tr>
    	  
    	  
    	  
    	  <tr>
    	    <th>VAT/CST</th>
    	    <td nowrap="nowrap">
    	    <select name="VatCst" id="value3" style="width:98%;" onchange="calculateVATCST(this.value)">
    	    <option value="">Select</option>
    	    
				<option value=""></option>
			
  	      </select>
    	      <div id="VATId"><input name="VatCstValue" id="VatCstValue" type="text" value="" size="25" style="width:98%;" readonly /></div></td>
    	    
  	    </tr>
    	  <tr>
    	    <th>Freight</th>
    	    <td><input name="freightValue" id="value2" type="text" value="" size="25" style="width:98%;" /></td>
    	    
  	    </tr>
    	  <tr>
    	    <th>Pkg Charges</th>
    	    <td><input name="packagingCharges" id="value1" type="text" value="" size="25" style="width:98%;" /></td>
    	    
  	    </tr>
  	    <tr>
    	    <th>Additional Charges</th>
    	    <td><input name="additionalCharges" id="value4" type="text" value="" size="25" style="width:98%;" /></td>
    	    
  	    </tr>
    	  <tr>
    	    <th>Round Off</th>
    	    <td><input name="roundOff" type="text" value="" size="25" style="width:98%;" /></td>
    	    
  	    </tr>
    	  <tr>
    	    <th>Grand Total</th>
    	    <td><input name="grandTotal" id="grandTotal" type="text" value="" size="25" style="width:98%;" onfocus="calculateGrand()" readonly="readonly" /></td>
    	    
  	    </tr>
  	    </table>
</td>
</tr></table>
<p align="center"><input type="submit" name="Save" value="Save"  /></p>
