<?php
session_start();
ob_start();
require "../model/configuration.php";
$gttotal=0;
$txamtt=0;
$net_ttl=0;
$selquery=$db->execute("select * from purchase_temp where permission='".$_SESSION['prms']."'");
while($selrow=$selquery->fetch_assoc())
{
	$pprce=($selrow['price']/(100+$selrow['tax']))*100;
    $uprice=round($pprce,2);
    $ntprce=$uprice*$selrow['quantity'];
    $netamount=$ntprce-$selrow['discount'];//($ntprce*$selrow['discount']/100);
    $taxamount=$netamount*$selrow['tax']/100;
    $ttl=$netamount+($netamount*$selrow['tax']/100);
    $netamt=round($ttl,2); $net_ttl=$net_ttl+$netamt;
}
echo $net_ttl;
?>