<?php
 
	session_name('CAKEPHP'); session_start();
	include('includes/Class_UnitMeasure.php');
  	include('CRM/ClassRole.php');
  	$CompanyId = $_SESSION['ACGCompanyId'];
	?>
	
 <fieldset style="width:90%; margin:auto;"><legend style="font-size:12px;"><strong>Item Price Book</strong></legend>
 <table width="100%" border="1" align="center" cellpadding="2" cellspacing="1" style="border-collapse:collapse;">
  <tr bgcolor="#CCCCCC">
  <td align="center" valign="top"><b>Item Name</b></td> 
<!--<td align="center" valign="top"><b>MST ItemId</b></td> -->
 <td align="center" valign="top"><b>Last Purchase Price</b></td>
  <td align="center" valign="top"><b>Profit (%)</b></td>
  <td align="center" valign="top"><b>MRP</b></td>
   <td align="center" valign="top"><b>Discount (%)</b></td>
   <td align="center" valign="top"><b>Net Rate</b></td>
   <td align="center" valign="top"><b>Created By</b></td>
	 <td align="center" valign="top"><b>Effective Date</b></td>
	  <td align="center" valign="top"><b>Created Date</b></td>
	  
	  
   </tr>	
	<?php 
	    
	//$sql_query ="SELECT rev_item_master.mst_itemid,rev_item_master.last_po_price,rev_item_master.item_profit rev_item_master.item_discount,rev_item_master.created_by,rev_item_master.effective_date,rev_item_master.created_date,rev_item_master.mrp_rate,rev_item_master.net_rate,item_mater.item_name FROM rev_item_master LEFT JOIN item_master ON rev_item_master.mst_itemid=item_master.id";
	$sql_query = "SELECT * FROM rev_item_master";
    $sqlQuery=DB_query($sql_query,$db);
	while($row=DB_fetch_array($sqlQuery))
	{
	?>

	 
	
	<tr>
	<td><?php  echo $s->GetFieldValue('item_master','id="'.$row["mst_itemid"].'"','item_name');?></td>
	<!--<td><?php  echo $row["mst_itemid"]; ?></td>-->
	<td><?php  echo $row["last_po_price"]; ?></td>
	<td><?php  echo $row["item_profit"];?></td>
	<td><?php  echo $row["mrp_rate"];?></td>
	<td><?php  echo $row["item_discount"];?></td>
	<td><?php  echo $row["net_rate"];?></td>
	<td><?php  echo $row["created_by"];?></td>
	<td><?php  echo $row["effective_date"];?></td>
	<td><?php  echo $row["created_date"];?></td>
	
	
	</tr>
	<?php
	}
	
	?>
</table>
 
 
 </fieldset>
	
	

	
  

