Product Description
Item
Product Decription
Price (INR)
Quanity
Update
Total Amount (INR)
Delete
$getbill= new FC_SQL;
$table = " $dbrb_order_dtls a, $dbrb_product_mst b";
$select = "select a.$dbrb_order_id,a.$dbrb_order_prodqty,a.$dbrb_order_prodcode,b.$dbrb_product_prodname,b.$dbrb_product_prodprice,b.$dbrb_product_proddisc,b.$dbrb_product_delcharges from";
$where = " where b.$dbrb_product_prodcode = a.$dbrb_order_prodcode and a.$dbrb_order_mid='".$mid."' and a.$dbrb_order_sessid ='".$_SESSION['memsess']."' and a.$dbrb_order_ordsts='A' " ;
//echo $select.$table.$where;
$getbill->query($table,$where,$extra="",$select);
if($getbill->num_of_rows()>0)
{
$c=0;
$mydelchr=0;
$mydisc=0;
$mytotamt=0;
$prodcount=0;
$myprodshowprice=0;
$myprodactprice=0;
while($getbill->next_record())
{
$c++;
if($getbill->get_value($dbrb_product_proddisc)!=0)
{
$myprodshowprice = $getbill->get_value($dbrb_product_prodprice)+$getbill->get_value($dbrb_product_proddisc);
$myprodactprice= $getbill->get_value($dbrb_product_prodprice);
$mydisc = $mydisc+$getbill->get_value($dbrb_product_proddisc)*$getbill->get_value($dbrb_order_prodqty) ;
}
else
{
$myprodshowprice = $getbill->get_value($dbrb_product_prodprice);
$myprodactprice= $getbill->get_value($dbrb_product_prodprice);
}
$mytotamt = $mytotamt+($myprodshowprice*$getbill->get_value($dbrb_order_prodqty));
$prodcount = $prodcount+$getbill->get_value($dbrb_order_prodqty);
$mydelchr=$mydelchr+($getbill->get_value($dbrb_order_prodqty)*$getbill->get_value($dbrb_product_delcharges));
echo"
".$c.")
".$getbill->get_value($dbrb_product_prodname)."
".$myprodshowprice."
".$getbill->get_value($dbrb_order_prodqty)."
".$myprodshowprice*$getbill->get_value($dbrb_order_prodqty)."
";
}
$myfinalamt=$mytotamt-$mydisc+$mydelchr;
echo"
Total Purchase Amount:
".$mytotamt."
Total Quantity:
".$prodcount."
Less Discount:
".$mydisc."
Total Shipping Cost:
".$mydelchr."
Net Amount (Inclusive of shipping charges and taxes in India):
".$myfinalamt."
";
}
else
{
echo "
Cart is Empty
";
include ('common/footer.php');
exit;
}
$getbill->free_result();
?>