<?php
session_start();
require("php_con.php");
require("function.php");

$price_id=mysqli_real_escape_string($connation,$_GET['price_id']);
$p_qury=mysqli_query($connation,"SELECT *
FROM price_details prd INNER JOIN product_details pd ON prd.price_systemid=pd.product_systemid
WHERE prd.price_id='$price_id'");
$p_resalt=mysqli_fetch_assoc($p_qury);
?>

<script src="barcode/JsBarcode.all.js"></script>

<style>
	.bar-shopname{
font-size:10px;
		font-weight: bold;
		text-align: center;
		text-transform: capitalize;
	}
	.bar-price{
		font-weight: bold;
		text-align: center;
	}
	.bar-barcode{
font-size:10px;
		font-weight: bold;
		text-align: center;
	}
	.bar-p-name{
font-size:10px;
		text-align: center;
		text-transform: capitalize;
	}
	.link-dis,.link-dis:hover{
		text-decoration: none;
		color: black;
	}
</style>

<script src="barcode/JsBarcode.all.js"></script>

<div class="div-main">
	
<table style="width: 100%;">
  <tbody>
    <tr>		
<?php for($e=1;$e<=$_SESSION['colum_count'];$e++){	?>
<td align="center">
<div class="bar-shopname"><?php echo setting_view("bill_title"); ?></div>
<div class="bar-p-name"><?php echo $p_resalt['product_name']; ?></div>
	
	<div style="text-align: center;">
		<img id="barcode<?php echo $p_resalt['price_id']; ?>" style="width: 80%;"/>
		<script>JsBarcode("#barcode<?php echo $p_resalt['price_id']; ?>", "<?php echo $p_resalt['product_barcode']; ?>", {
			format:"CODE128",
			displayValue:false,
			fontSize:14,
			height:30,
			margin:0
		});</script>
	</div>

<div class="bar-barcode"><?php echo $p_resalt['product_barcode']; ?></div>
<div class="bar-price"><?php echo number_format((float)$p_resalt['price_sale'],2); ?></div>
	
</td>
<?php } ?>
    </tr>
  </tbody>
</table>



	
</div>

<script>this.print();</script>