S.No |
Product Name |
Weight/Nos. |
Rate |
Qty |
Taxable Value |
GST% |
CGST |
SGST |
Total |
';?>
$table_name="tbl_order";
$Query = mysql_query("SELECT * from tbl_order where orderid='$orderid'");
//$namesss=$DB->query($Query);
$nsssss=mysql_num_rows($Query);
$manssss='0';
$si=0;
while ($rowsss = mysql_fetch_array($Query)) {
$product_id=$rowsss['productid'];
$qty=$rowsss['qty'];
$unit_pr=$rowsss['price'];
$tot_price=$rowsss['totprice'];
if($contry=="India")
{
$sym="Rs";
}
else
{
$sym="$";
}
$qty=$rowsss['qty'];
$Query_12 = mysql_query("SELECT * from `shop_product` where product_id='$product_id' ");
// $name_12=$DB->query($Query_12);
$no=mysql_num_rows($Query_12);
$row_12 = mysql_fetch_array($Query_12);
$vstatus=$row_12['vstatus'];
$Query_12_company = mysql_query("SELECT * from `tbl_company` where id='$vstatus' ");
//$name_12_company=$DB->query($Query_12_company);
$no_company=mysql_num_rows($Query_12_company);
$row_12_company = mysql_fetch_array($Query_12_company);
$new_comp_name=$row_12_company['name'];
if($new_comp_name=="Siddhayoga Pharma")
{
$new_price=(($unit_pr*100)/(100+18));
$sg=number_format((float)$new_price, 2, '.', '');
$n_g="12";
//GST Inclusive Price * GST Rate /(100 + GST Rate Percentage)
// Outputs -> 105.00
//GST Inclusive Price * GST Rate /(100 + GST Rate Percentage)
}
if($new_comp_name=="Energy Foods")
{
$n_g="18";
//$new_price=(($tot_price*18)/100);
$new_price=(($unit_pr*100)/(100+18));
$sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00
}
if($new_comp_name=="Siddha Sastric")
{
$n_g="5";
//$new_price=(($tot_price*18)/100);
$new_price=(($unit_pr*100)/(100+18));
$sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00
}
if($new_comp_name=="Adv. Siddhayoga Research")
{
$n_g="12";
//$new_price=(($tot_price*18)/100);
$new_price=(($unit_pr*100)/(100+18));
$sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00
}
if($new_status==1)
{
if($vstatus==1)
{
$v_qty=($qty/2);
}
if($vstatus==2)
{
$v_qty=($qty/4);
}
$x = (int)$v_qty;
}
else
{
$x=0;
}
$weight=$row_12['stock_status_id'];
if($weight=='' || $weight==0)
{
$weight=100;
}
$new_qty=($weight*$qty);
$new_kilo=($new_qty/1000);
$new_kilo_1 = explode('.',$new_kilo);
$new_kilo_2=$new_kilo_1[0]; // Before the Decimal point
$new_kilo_3 +=$new_kilo_2;
$tot_weight_2 +=$new_qty;
$new_weight_2 +=($new_qty);
$si=$si+1;
$massss=($sg);
$sgxxx=number_format($massss, 2, '.', '');
?>
$Msg1.=''.$si.'
| '.$row_12['name'].' |
'.$row_12['product_url'].'
|
'.$sym.'
'.$sgxxx.'
| ';?>
if($new_status==1)
{
?>
$Msg1.='';?>
if($x>0) { ?>
$Msg1.=''.($qty+$x).'';?> $Msg1.='(';?> $Msg1.=''.$qty.'';?> $Msg1.='+';?> $Msg1.=''.$x.'';?> $Msg1.='Free)';?>
}
else
{
?>
$Msg1.=''.$qty.'';?>
$Msg1.=' | ';?>
} ?>
}
else
{
?>
$Msg1.=''.$rowsss['qty'].' | ';?>
}
?>
$Msg1.=''.$sym.'';?> $new_sg;?> $tot_new_price=($sg*$qty);
?>
$tot_new_price=number_format($tot_new_price, 2, '.', '');
?>
$Msg1.=''.$tot_new_price.'';?>
$mas_price_1 +=$tot_new_price;
?> $Msg1.=' | ';?>
$tot_new_price;
$gst=($tot_price-$tot_new_price);
$new_gst=($gst/2);
$tot_new_price_1=number_format($new_gst, 2, '.', '');
$mas_price_2 +=$tot_new_price_1;
?>
$Msg1.=''.$n_g.'% |
'.$sym.'';?> $new_sg;?> $Msg1.=''.$tot_new_price_1.'';?>
$Msg1.=' | ';?>
$Msg1.=''.$sym.'';?> $Msg1.=''.$tot_new_price_1.'';?> $unit_pr;?>
$Msg1.=' | ';?>
$Msg1.=''.$sym.''.$tot_price=number_format((float)$tot_price, 2, '.', '').' |
';?>
}
?>
$objqrynewsubee = mysql_query("SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid'");
//$name_12_123=$DB->query($objqrynewsubee);
$Fetchnewww = mysql_fetch_array($objqrynewsubee);
$subtotal_123=$Fetchnewww['amtTotal'];
$objqrynewsubee_qty = mysql_query("SELECT SUM(qty) AS qty FROM tbl_order where orderid='$orderid'");
//$name_12_123_qty=$DB->query($objqrynewsubee_qty);
$Fetchnewww_qty = mysql_fetch_array($objqrynewsubee_qty);
$subtotal_123_qty=$Fetchnewww_qty['qty'];
?>
$Msg1.='
|
|
|
Total |
'.$subtotal_123_qty.' |
'.$sym.''.$mas_price_1.' |
|
'.$sym.''.$mas_price_2.' |
'.$sym.' '.$mas_price_2.' |
'.$sym.''.$subtotal_123_4=number_format((float)$subtotal_123, 2, '.', '').' |
';?>
$objqrynewsubee =mysql_query( "SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid'");
//$name_12_123=$DB->query($objqrynewsubee);
$Fetchnewww = mysql_fetch_array($objqrynewsubee);
$subtotal_123=$Fetchnewww['amtTotal'];
?>
$new_kilo_41=($tot_weight_2/1000);
$new_kilo_5 = explode('.',$new_kilo_41);
$new_kilo_6=$new_kilo_5[0];
$Query_job_move_courier= mysql_query("SELECT * from tbl_courier_charges where state='$state' ");
//$name_12=$DB->query($Query_job_move_courier);
$row_job_move_courier= mysql_fetch_array($Query_job_move_courier);
$courier_fees=$row_job_move_courier['amount'];
$courier_fees_para_1=$row_job_move_courier['amount'];
$packing_charges=round((($subtotal*10)/100));
$packing_charges123=0;
if($order_id>179)
{
$packing_charges123=round((($subtotal_123*10)/100));
if($state=="Puducherry")
{
$packing_charges=0;
}
if($state=="Tamilnadu")
{
$packing_charges=0;
}
if($state=="Puducherry")
{
$packing_charges123=0;
}
if($state=="Tamilnadu")
{
$packing_charges123=0;
}
}
if($courier_fees=='')
{
$Query_job_move_courier_1= mysql_query("SELECT * from tbl_courier_charges where state='Others' ");
//$name_12_w=$DB->query($Query_job_move_courier_1);
$row_job_move_courier_1= mysql_fetch_array($Query_job_move_courier_1);
$courier_fees=$row_job_move_courier_1['amount'];
$subtotal_123;
$packing_charges123=round((($subtotal_123*10)/100));
$packing_charges=round((($subtotal*10)/100));
$courier_fees=($courier_fees+$packing_charges);
}
$packing_charges123;
$courier_fees;
if($contry=="India")
{
$new_kilo_4=(($new_kilo_6+1)*$courier_fees);
}
else
{
$tot_weight_2_int=$new_weight_2;
$Query_q= mysql_query("SELECT * from tbl_courier_charges_country where state='$contry' ");
//$Query_job_move_courier_country=$DB->query($Query_q);
$row_job_move_courier_country= mysql_fetch_array($Query_q);
$num_max_ship_int=mysql_num_rows($Query_job_move_courier_country);
if($num_max_ship_int>0)
{
$courier_fees_country=$row_job_move_courier_country['amount'];
$courier_fees_country_extra=$row_job_move_courier_country['additional_amount'];
}
else
{
$Query_jo= mysql_query("SELECT * from tbl_courier_charges_country where state='Others' ");
//$Query_job_move_courier_country=$DB->query($Query_jo);
$row_job_move_courier_country= mysql_fetch_array($Query_jo);
$courier_fees_country=$row_job_move_courier_country['amount'];
$courier_fees_country_extra=$row_job_move_courier_country['additional_amount'];
}
if($tot_weight_2_int<=500)
{
$courier_fees_country_1=$courier_fees_country;
$new_kilo_4=$courier_fees_country_1;
}
else
{
$tot_weight_2_int_1=($tot_weight_2_int-500);
$tot_weight_2_int_1_2=($tot_weight_2_int_1/250);
$new_kilo_5_int = explode('.',$tot_weight_2_int_1_2);
$new_kilo_6_int=$new_kilo_5_int[0];
$new_kilo_6_int_7=($new_kilo_6_int+1);
$new_kilo_6_int_7_8=($courier_fees_country_extra*$new_kilo_6_int_7);
$courier_fees_country_1=($courier_fees_country+$new_kilo_6_int_7_8);
$new_kilo_4=$courier_fees_country_1;
}
}
$full_total_cm_ar=($subtotal+$new_kilo_4);
?>
$Msg1.='
Weight : |
'.$new_kilo_41.' |
Taxable Value : |
'.$sym.' '.$mas_price_1.''.$Fetchnewww['amtTotal'].' |
Total CGST : |
'.$sym.''.$mas_price_2.''.$Fetchnewww['amtTotal'].' |
Total SGST : |
'.$sym.''.$mas_price_2.'';?>
$Fetchnewww['amtTotal'];?> $Msg1.=' |
Shipping : |
'.$sym.'';?>
if($contry=="India")
{
?>
$id;
if($id == 36)
{
$new_kilo_4=80;
?>
$Msg1.=''.$new_kilo_4=number_format((float)$new_kilo_4, 2, '.', '').'';?>
}
else
{
?>
if($id == 37)
{
$new_kilo_4=120;
?>
$Msg1.=''.$new_kilo_4=number_format((float)$new_kilo_4, 2, '.', '').'';?>
}
else
{
?>
$new_kilo_4=(($new_kilo_6+1)*$courier_fees);
?>
$Msg1.=''.$new_kilo_4=number_format((float)$new_kilo_4, 2, '.', '').'';?>
}
}
}
else
{
?>
$new_kilo_4;?>
$Msg1.=''.$new_kilo_4=number_format((float)$new_kilo_4, 2, '.', '').'';?>
}
?>
$Msg1.=' |
';?>
if($packing_charges123>0)
{
?>
$Msg1.='
Packing Charges : | ';?>
$idsss=$_REQUEST['id'];
?>
$Msg1.=''.$sym.'';?>
if($idsss==106)
{
?>
$packing_charges123=1446;
?>
$Msg1.=''.$packing_charges123=number_format((float)$packing_charges123, 2, '.', '').'';?>
}
else
{
$packing_charges123;
?>
$Msg1.=''.$packing_charges123=number_format((float)$packing_charges123, 2, '.', '').'';?>
}
?> $Msg1.=' |
';?>
}
?>
$Msg1.='
TOTAL : |
'.$sym.'';?> $grsnt=($Fetchnewww['amtTotal']+$new_kilo_4+$packing_charges123);
?>
$Msg1.=''.$grsnt=number_format((float)$grsnt, 2, '.', '').'
|