='".$date_paid1."' and DATE(order_date_time) <='".$date_paid12."' "; } if($_REQUEST['from']!="" && $_REQUEST['to']=="" ) { $cond9.="and DATE(order_date_time) ='".$date_paid1."'"; } if($_REQUEST['from']!="" && $_REQUEST['to']=="" ) { $cond9.="and DATE(order_date_time) ='".$date_paid12."'"; } if($_REQUEST['from']!="" && $_REQUEST['to']!="" ) { $cond9.="and DATE(order_date_time) >='".$date_paid1."' and DATE(order_date_time) <='".$date_paid12."' "; } $table_name="tbl_confirmorder"; $Query = "SELECT * from tbl_confirmorder where orderstatus in (0,1,5,15,2,3,24,4,25,90) and company_name='Energy Foods' and refid not like '%CO%' and orderid IN(SELECT orderid from tbl_order where totprice!=0) $cond9 order by orid asc"; $namesss=$DB->query($Query); $nsssss=mysql_num_rows($namesss); $manssss='0'; $kjjj=0; $siii=1; while ($rowsss = mysql_fetch_array($namesss)) { $subtotal_123=0; if($rowsss['contry'] == 'India'){ $pundai_order_id=$rowsss['orid']; if($pundai_order_id>495) { $kudhi=0; } else { $kudhi=10; } $new_orid =$rowsss['orid']; $userid =$rowsss['userid']; $paypalamount =$rowsss['paypalamount']; $varstatus =$rowsss['varstatus']; $varstatus =$rowsss['varstatus']; $orderid=$rowsss['orderid']; $contry=$rowsss['contry']; $state=$rowsss['state']; $order_tc_id =$rowsss['order_tc_id']; $orderstatus =$rowsss['orderstatus']; if($contry=="India") { // $sss="Rs"; } else { // $sss="$"; } $Query = "SELECT * from `shop_user` where user_id='$userid' "; $name=$DB->query($Query); $no=mysql_num_rows($name); $row = mysql_fetch_array($name); $new_status=$row['new_status']; $new_gst=$row['gst']; // if($new_gst=="") // { // $new_gst="NOT APPLICABLE"; // } // if($new_gst=="GST") // { // $new_gst="NOT APPLICABLE"; // } if($row['user_id']== '7444'){ $new_gst= $row['gst_no']; } elseif(startsWithNumber($new_gst)) { $new_gst= $row['gst']; }elseif(startsWithNumber($row['gst_no'])){ $new_gst= $row['gst_no']; }else{ $new_gst="NOT APPLICABLE"; } /*weight calculation*/ $Query_new = "SELECT * from tbl_order where orderid='$orderid'"; $namesss_new=$DB->query($Query_new); $nsssss_new=mysql_num_rows($namesss_new); $x=0; $qty_new=0; $qty_new1=0; $new_qty_1_1=0; $sg=0; $sg1=0; $tot_price_new_1_mal=0; $tot_price_new_1_mal_1=0; while ($rowsss_new = mysql_fetch_array($namesss_new)) { $product_id_new=$rowsss_new['productid']; $qty_new=$rowsss_new['qty']; $unit_pr_new=$rowsss_new['price']; $tot_price_new=$rowsss_new['totprice']; $Query_12_new = "SELECT * from `shop_product` where product_id='$product_id_new' "; $name_12_new=$DB->query($Query_12_new); $no_new=mysql_num_rows($name_12_new); $row_12_new = mysql_fetch_array($name_12_new); $vstatus=$row_12_new['vstatus']; $Query_12_company = "SELECT * from `tbl_company` where id='$vstatus' "; $name_12_company=$DB->query($Query_12_company); $no_company=mysql_num_rows($name_12_company); $row_12_company = mysql_fetch_array($name_12_company); $new_comp_name=$row_12_company['name']; if($new_comp_name=="Siddhayoga Pharma") { $new_price=(($tot_price_new*100)/(100+12)); $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=(($tot_price_new*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=(($tot_price_new*100)/(100+5)); $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=(($tot_price_new*100)/(100+12)); $sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00 } if($new_comp_name=="Anbu Phaarmaa") { $n_g="5"; //$new_price=(($tot_price*18)/100); $new_price=(($unit_pr*100)/(100+5)); $sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00 } if($new_comp_name=="Anbu-Phaarmaa") { $n_g="12"; //$new_price=(($tot_price*18)/100); $new_price=(($unit_pr*100)/(100+12)); $sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00 } $vstatus=$row_12_new['vstatus']; if($new_status==1) { if($vstatus==1) { $v_qty=($qty_new/2); } if($vstatus==7) { $v_qty=($qty_new/2); } if($vstatus==6) { $v_qty=($qty_new/2); } if($vstatus==2) { $v_qty=($qty_new/4); } $x = (int)$v_qty; } else { $x=0; } $weight=$row_12_new['stock_status_id']; if($weight=='' || $weight==0) { $weight=100; } $qty_new_1=($qty_new+$x); $new_qty=($weight*$qty_new_1); $new_qty_1_1 +=$new_qty; $tot_price_new_1_mal=(($tot_price_new-$sg)/2); $sg1 +=$sg; $tot_price_new_1_mal_1 +=$tot_price_new_1_mal; } $sg1; $tot_price_new_1_mal_1; /*weight calculation*/ $new_qty_1_1; $new_kilo_41=($new_qty_1_1/1000); $new_kilo_5 = explode('.',$new_kilo_41); $new_kilo_6=($new_kilo_5[0]+1); $Query_oo_compan = "select CONVERT(GROUP_CONCAT(id) USING utf8) as id from tbl_company where id!= 7 group by gst_percent"; $myArr = array("8,11", "2", "6,10"); $my=0; $name_oo_compan=$DB->query($Query_oo_compan); while ($rowsss_mmmmmm_compan = mysql_fetch_array($name_oo_compan)) { $pund_c_id=$rowsss_mmmmmm_compan['id']; if($pund_c_id=='1,8,11') { $Query_oo = "SELECT * from `tbl_order` where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE (vstatus='1' || vstatus='7' || vstatus='8' || vstatus='11') ) "; } else { $Query_oo = "SELECT * from `tbl_order` where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE vstatus in ($pund_c_id)) "; } $name_oo=$DB->query($Query_oo); $rowsss_mmmmmm = mysql_fetch_array($name_oo); $no_oo=mysql_num_rows($name_oo); if($pund_c_id=='1,8,11') { $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE (vstatus='1' || vstatus='7' || vstatus='8' || vstatus='11'))"; } else { $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE vstatus in ($pund_c_id))"; } $name_12_123=$DB->query($objqrynewsubee); $Fetchnewww = mysql_fetch_array($name_12_123); $myquery = "select contry,offer from tbl_confirmorder where orderid = '$orderid'"; $exec = $DB->query($myquery); $exec_query = mysql_fetch_array($exec); if($exec_query['offer'] == 0){ $subtotal_123=$Fetchnewww['amtTotal']; }else{ $discount_percent = number_format((float)($exec_query['offer']/100), 2, '.', ''); $calc_discount = ($Fetchnewww['amtTotal'] * $discount_percent); //$subtotal_123 = number_format((float)($Fetchnewww['amtTotal'] - $calc_discount), 2, '.', ''); $subtotal_123 = round($Fetchnewww['amtTotal'] - $calc_discount); } if($pund_c_id=='1,8,11') { $tot_gst=12; $new_price_gst=(($subtotal_123*100)/(100+12)); $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); } if($pund_c_id==2) { $tot_gst=18; $new_price_gst=(($subtotal_123*100)/(100+18)); $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); } if($pund_c_id== '6,10') { $tot_gst=5; $new_price_gst=(($subtotal_123*100)/(100+5)); $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); } // if($pund_c_id==10) // { // $tot_gst=5; // $new_price_gst=(($subtotal_123*100)/(100+5)); // $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); // } // if($pund_c_id==11) // { // $tot_gst=12; // $new_price_gst=(($subtotal_123*100)/(100+12)); // $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); // } $para_new_sgst=(($subtotal_123-$sg_gst_1)/2); $para_new_sgst=number_format((float)$para_new_sgst, 2, '.', ''); /*shipping*/ $contry; $state; $new_sta=1; if($state=="Tamilnadu") { $new_sta=0; } if($contry=="India") { $packing_charges=round((($subtotal_123*$kudhi)/100)); if($state=="Puducherry") { $packing_charges=0; } if($state=="Tamilnadu") { $packing_charges=0; } $new_date_mal =$rowsss['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); $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); //$courier_fees=$row_job_move_courier['amount']; //$courier_fees_para_1=$row_job_move_courier['amount']; $pundai_order_id; 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 { $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=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($courier_fees=='') { $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); $new_date_mal =$rowsss['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); 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*10)/100)); $courier_fees=($courier_fees); } } else { $tot_weight_2_int=$new_qty_1_1; $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; } } $new_courier=(($courier_fees*$new_kilo_6)+$packing_charges); /*shipping*/ if($no_oo>0) { if($orderstatus==0) { $par_status="Placed"; } if($orderstatus==1) { $par_status="Confirmed"; } if($orderstatus==2) { $par_status="Dispatched"; } if($orderstatus==3) { $par_status="Delivered"; } if($orderstatus==4) { $par_status="Refund"; } if($orderstatus==5) { $par_status="Packed"; } //sprintf("%02d", $to_hour); ?> style="background-color:#d4f893" style="background-color:#d4f893" style="color:red; font-weight:bold"> 495) { $kudhi=0; } else { $kudhi=10; } $new_orid =$rowsss['orid']; $userid =$rowsss['userid']; $paypalamount =$rowsss['paypalamount']; $varstatus =$rowsss['varstatus']; $varstatus =$rowsss['varstatus']; $orderid=$rowsss['orderid']; $contry=$rowsss['contry']; $state=$rowsss['state']; $order_tc_id =$rowsss['order_tc_id']; $orderstatus =$rowsss['orderstatus']; if($contry=="India") { // $sss="Rs"; } else { // $sss="$"; } $Query = "SELECT * from `shop_user` where user_id='$userid' "; $name=$DB->query($Query); $no=mysql_num_rows($name); $row = mysql_fetch_array($name); $new_status=$row['new_status']; $new_gst=$row['gst']; // if($new_gst=="") // { // $new_gst="NOT APPLICABLE"; // } // if($new_gst=="GST") // { // $new_gst="NOT APPLICABLE"; // } if($row['user_id']== '7444'){ $new_gst= $row['gst_no']; } elseif(startsWithNumber($new_gst)) { $new_gst= $row['gst']; }else{ $new_gst="NOT APPLICABLE"; } /*weight calculation*/ $Query_new = "SELECT * from tbl_order where orderid='$orderid'"; $namesss_new=$DB->query($Query_new); $nsssss_new=mysql_num_rows($namesss_new); $x=0; $qty_new=0; $qty_new1=0; $new_qty_1_1=0; $sg=0; $sg1=0; $tot_price_new_1_mal=0; $tot_price_new_1_mal_1=0; while ($rowsss_new = mysql_fetch_array($namesss_new)) { $product_id_new=$rowsss_new['productid']; $qty_new=$rowsss_new['qty']; $unit_pr_new=$rowsss_new['price']; $tot_price_new=$rowsss_new['totprice']; $Query_12_new = "SELECT * from `shop_product` where product_id='$product_id_new' "; $name_12_new=$DB->query($Query_12_new); $no_new=mysql_num_rows($name_12_new); $row_12_new = mysql_fetch_array($name_12_new); $vstatus=$row_12_new['vstatus']; $Query_12_company = "SELECT * from `tbl_company` where id='$vstatus' "; $name_12_company=$DB->query($Query_12_company); $no_company=mysql_num_rows($name_12_company); $row_12_company = mysql_fetch_array($name_12_company); $new_comp_name=$row_12_company['name']; if($new_comp_name=="Siddhayoga Pharma") { $new_price=(($tot_price_new*100)/(100+12)); $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=(($tot_price_new*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=(($tot_price_new*100)/(100+5)); $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=(($tot_price_new*100)/(100+12)); $sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00 } if($new_comp_name=="Anbu Phaarmaa") { $n_g="5"; //$new_price=(($tot_price*18)/100); $new_price=(($unit_pr*100)/(100+5)); $sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00 } if($new_comp_name=="Anbu-Phaarmaa") { $n_g="12"; //$new_price=(($tot_price*18)/100); $new_price=(($unit_pr*100)/(100+12)); $sg=number_format((float)$new_price, 2, '.', ''); // Outputs -> 105.00 } $vstatus=$row_12_new['vstatus']; if($new_status==1) { if($vstatus==1) { $v_qty=($qty_new/2); } if($vstatus==7) { $v_qty=($qty_new/2); } if($vstatus==6) { $v_qty=($qty_new/2); } if($vstatus==2) { $v_qty=($qty_new/4); } $x = (int)$v_qty; } else { $x=0; } $weight=$row_12_new['stock_status_id']; if($weight=='' || $weight==0) { $weight=100; } $qty_new_1=($qty_new+$x); $new_qty=($weight*$qty_new_1); $new_qty_1_1 +=$new_qty; $tot_price_new_1_mal=(($tot_price_new-$sg)/2); $sg1 +=$sg; $tot_price_new_1_mal_1 +=$tot_price_new_1_mal; } $sg1; $tot_price_new_1_mal_1; /*weight calculation*/ $new_qty_1_1; $new_kilo_41=($new_qty_1_1/1000); $new_kilo_5 = explode('.',$new_kilo_41); $new_kilo_6=($new_kilo_5[0]+1); $Query_oo_compan = "select CONVERT(GROUP_CONCAT(id) USING utf8) as id from tbl_company where id!= 7 group by gst_percent"; $myArr = array("8,11", "2", "6,10"); $my=0; $name_oo_compan=$DB->query($Query_oo_compan); while ($rowsss_mmmmmm_compan = mysql_fetch_array($name_oo_compan)) { $pund_c_id=$rowsss_mmmmmm_compan['id']; if($pund_c_id=='1,8,11') { $Query_oo = "SELECT * from `tbl_order` where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE (vstatus='1' || vstatus='7' || vstatus='8' || vstatus='11') ) "; } else { $Query_oo = "SELECT * from `tbl_order` where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE vstatus in ($pund_c_id)) "; } $name_oo=$DB->query($Query_oo); $rowsss_mmmmmm = mysql_fetch_array($name_oo); $no_oo=mysql_num_rows($name_oo); if($pund_c_id=='1,8,11') { $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE (vstatus='1' || vstatus='7' || vstatus='8' || vstatus='11'))"; } else { $objqrynewsubee = "SELECT SUM(totprice) AS amtTotal FROM tbl_order where orderid='$orderid' and productid in(SELECT product_id FROM shop_product WHERE vstatus in ($pund_c_id))"; } $name_12_123=$DB->query($objqrynewsubee); $Fetchnewww = mysql_fetch_array($name_12_123); $myquery = "select contry,offer from tbl_confirmorder where orderid = '$orderid'"; $exec = $DB->query($myquery); $exec_query = mysql_fetch_array($exec); if($exec_query['offer'] == 0){ $subtotal_123+=$Fetchnewww['amtTotal']; }else{ $discount_percent = number_format((float)($exec_query['offer']/100), 2, '.', ''); $calc_discount = ($Fetchnewww['amtTotal'] * $discount_percent); //$subtotal_123 = number_format((float)($Fetchnewww['amtTotal'] - $calc_discount), 2, '.', ''); $subtotal_123+= round($Fetchnewww['amtTotal'] - $calc_discount); } if($pund_c_id=='1,8,11') { $tot_gst=12; $new_price_gst=(($subtotal_123*100)/(100+12)); $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); } if($pund_c_id==2) { $tot_gst=18; $new_price_gst=(($subtotal_123*100)/(100+18)); $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); } if($pund_c_id== '6,10') { $tot_gst=5; $new_price_gst=(($subtotal_123*100)/(100+5)); $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); } // if($pund_c_id==10) // { // $tot_gst=5; // $new_price_gst=(($subtotal_123*100)/(100+5)); // $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); // } // if($pund_c_id==11) // { // $tot_gst=12; // $new_price_gst=(($subtotal_123*100)/(100+12)); // $sg_gst_1=number_format((float)$new_price_gst, 2, '.', ''); // } $para_new_sgst=(($subtotal_123-$sg_gst_1)/2); $para_new_sgst=number_format((float)$para_new_sgst, 2, '.', ''); /*shipping*/ $contry; $state; $new_sta=1; if($state=="Tamilnadu") { $new_sta=0; } if($contry=="India") { $packing_charges=round((($subtotal_123*$kudhi)/100)); if($state=="Puducherry") { $packing_charges=0; } if($state=="Tamilnadu") { $packing_charges=0; } $new_date_mal =$rowsss['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); $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); //$courier_fees=$row_job_move_courier['amount']; //$courier_fees_para_1=$row_job_move_courier['amount']; $pundai_order_id; 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 { $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=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($courier_fees=='') { $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); $new_date_mal =$rowsss['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); 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*10)/100)); $courier_fees=($courier_fees); } } else { $tot_weight_2_int=$new_qty_1_1; $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; } } $new_courier=(($courier_fees*$new_kilo_6)+$packing_charges); /*shipping*/ if($no_oo>0) { if($orderstatus==0) { $par_status="Placed"; } if($orderstatus==1) { $par_status="Confirmed"; } if($orderstatus==2) { $par_status="Dispatched"; } if($orderstatus==3) { $par_status="Delivered"; } if($orderstatus==4) { $par_status="Refund"; } if($orderstatus==5) { $par_status="Packed"; } //sprintf("%02d", $to_hour); ?> style="background-color:#d4f893" style="background-color:#d4f893" style="color:red">
Reports
S.No. Invoice No Date and Time Name GST No State Country Courier Company Courier Company Courier No Courier No Taxable Value GST % CGST SGST GST Amount Amount Amount Amount Qty Time
                      Total