if(isset($_POST['submit']))
{
if ($_REQUEST["form_action"] == "Update") {
$category=trim(addslashes($_REQUEST['invoice']));
$id=$_REQUEST['id'];
$Query="UPDATE `tbl_confirmorder` SET `type`='" .$category. "' WHERE `orid`='".$_REQUEST['id']."'";
$DB->query($Query);
$flag="sucess";
//header("location:order_details.php?id=".$id);
header("location:view_order.php");
}
}
?>
if(isset($_POST['submit1']))
{
if ($_REQUEST["form_action"] == "Update") {
$checkbox1= $_POST['checkbox2'];
$checkbox2=$_POST['checkbox1'];
$checkbox3=$_POST['checkbox3'];
$checkbox4=$_POST['checkbox4'];
$id=$_REQUEST['id'];
date_default_timezone_set('Asia/Kolkata');
$date_ss = date('Y-m-d H:i:s ', time());
echo $Query="INSERT INTO tbl_follow_call1 VALUES (NULL,'$id','".$checkbox2."','".$checkbox1."','".$checkbox3."','$checkbox4','$date_ss','1')";
$DB->query($Query);
$mysql_insert_id= mysql_insert_id();
}
}
?>
if($company_name=="Energy Foods")
{
?>
}
?>
if($company_name=="Siddhayoga Pharma")
{
?>

}
?>
if($company_name=="Energy Foods")
{
?>
}
?>
#11,2nd Street, Radha Nagar Extn.
Velachery,Chennai 600 042.
State :Tamilnadu Code:33
Phone:044-2253 1316
Email : drganbuganapathi@gmail.com
Website : www.drganbuganapathi.com
echo nl2br($rows_order['address']);?>
echo $rows_order['city'];?>, echo $rows_order['state'];?>- echo $rows_order['pin'];?>.
Mobile: echo $row['phone'];?>
if($company_name=="Energy Foods")
{
?>
GSTIN : 33ACMPA1286A2Z7
}
?>
if($company_name=="Siddhayoga Pharma")
{
?>
GSTIN : 33ABNPT2826P1ZZ
}
?>
if($company_name=="Energy Foods")
{
?>
PAN : ACMPA1286A2Z7
}
?>
if($company_name=="Siddhayoga Pharma")
{
?>
PAN : ABNPT2826P
}
?>
Invoice No : echo $rows_order['refid'];?>
Invoice Date : $new_date =$rows_order['order_date_time'];
echo $new_date = date("Y-m-d",strtotime($new_date));
?>
Payment Mode : echo $ss;?>
/* pundai calls*/
$punda_order_id=$_REQUEST['id'];
$Query_kennapundai = "SELECT * from `tbl_follow_call2` where order_id='$punda_order_id' ";
$name_kennapundai=$DB->query($Query_kennapundai);
$no_kennapundai=mysql_num_rows($name_kennapundai);
$row_kennapundai = mysql_fetch_array($name_kennapundai);
$question1= $row_kennapundai['question1'];
$question2= $row_kennapundai['question2'];
$question3= $row_kennapundai['question3'];
$question4= $row_kennapundai['question4'];
$question5= $row_kennapundai['question5'];
$question6= $row_kennapundai['question6'];
$question7= $row_kennapundai['question7'];
/*pundai calls*/
?>
$objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid'";
$name_12_123=$DB->query($objqrynewsubee);
$Fetchnewww = mysql_fetch_array($name_12_123);
$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];
$new_date_mal =$rows_order['order_date_time'];
$new_date_mal_1 = date("Y-m-d",strtotime($new_date_mal));
date_default_timezone_set('Asia/Kolkata');
$date_mal_1 = date('2020-09-20', time());
$curdate_mal_1 = strtotime($new_date_mal_1);
$curdate_mal_2 = strtotime($date_mal_1);
$date_mal_dat_pundai_mavan = date('2020-10-06', time());
$pundai_order_id=$_REQUEST['id'];
$Query_job_move_courier= "SELECT * from tbl_courier_charges where state='$state' ";
$name_12=$DB->query($Query_job_move_courier);
$row_job_move_courier= mysql_fetch_array($name_12);
if($pundai_order_id>495)
{
$courier_fees=$row_job_move_courier['amount'];
$courier_fees_para_1=$row_job_move_courier['amount'];
}
else
{
if($curdate_mal_1<$curdate_mal_2)
{
$courier_fees=$row_job_move_courier['amount'];
$courier_fees_para_1=$row_job_move_courier['amount'];
if($state=="Puducherry")
{
$courier_fees=60;
$courier_fees_para_1=60;
}
if($state=="Tamilnadu")
{
$courier_fees=40;
$courier_fees_para_1=40;
}
if($state=="Andhra Pradesh")
{
$courier_fees=150;
$courier_fees_para_1=150;
}
if($state=="Karnataka")
{
$courier_fees=150;
$courier_fees_para_1=150;
}
if($state=="Kerala")
{
$courier_fees=150;
$courier_fees_para_1=150;
}
if($state=="Telangana")
{
$courier_fees=150;
$courier_fees_para_1=150;
}
}
else
{
if($state=="Puducherry")
{
$courier_fees=60;
$courier_fees_para_1=60;
}
if($state=="Tamilnadu")
{
$courier_fees=40;
$courier_fees_para_1=40;
}
if($state=="Andhra Pradesh")
{
$courier_fees=100;
$courier_fees_para_1=100;
}
if($state=="Karnataka")
{
$courier_fees=100;
$courier_fees_para_1=100;
}
if($state=="Kerala")
{
$courier_fees=100;
$courier_fees_para_1=100;
}
if($state=="Telangana")
{
$courier_fees=100;
$courier_fees_para_1=100;
}
if($state=="Puducherry")
{
$courier_fees=60;
$courier_fees_para_1=60;
}
}
}
$packing_charges=round((($subtotal*$kudhi)/100));
$packing_charges123=0;
//$packing_charges123=round((($subtotal_123*10)/100));
if($contry!="India")
{
$packing_charges123=0;
$packing_charges=0;
}
if($orderid>'179')
{
$packing_charges123=round((($subtotal_123*$kudhi)/100));
if($contry!="India")
{
$packing_charges123=0;
$packing_charges=0;
}
if($state=="Puducherry")
{
$packing_charges=0;
$packing_charges123=0;
}
if($state=="Tamilnadu")
{
$packing_charges=0;
$packing_charges123=0;
}
if($state=="Puducherry")
{
$packing_charges123=0;
}
if($state=="Tamilnadu")
{
$packing_charges123=0;
}
}
if($courier_fees=='')
{
$new_date_mal =$rows_order['order_date_time'];
$new_date_mal_1 = date("Y-m-d",strtotime($new_date_mal));
date_default_timezone_set('Asia/Kolkata');
$date_mal_1 = date('2020-10-06', time());
$curdate_mal_1 = strtotime($new_date_mal_1);
$curdate_mal_2 = strtotime($date_mal_1);
$Query_job_move_courier_1= "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($name_12_w);
if($curdate_mal_1<$curdate_mal_2)
{
$courier_fees=300;
}
else
{
$courier_fees=$row_job_move_courier_1['amount'];
}
$subtotal_123;
$packing_charges123=round((($subtotal_123*$kudhi)/100));
$packing_charges=round((($subtotal*$kudhi)/100));
$courier_fees=($courier_fees+$packing_charges);
}
$courier_fees;
if($contry=="India")
{
$new_kilo_4=(($new_kilo_6+1)*$courier_fees);
}
else
{
$tot_weight_2_int=$new_weight_2;
$Query_q= "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_job_move_courier_country);
$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= "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_job_move_courier_country);
$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);
?>