set_time_limit(0); $reports="active"; $dealer_sales="active"; require_once '../template/superadmin/action_connection.php' ; include("../settings/adminsession.php"); include("../../include/conf.php"); session_start(); include("header.php"); if($_SERVER['REQUEST_METHOD'] == 'POST'){ $year=$_POST['year']; $months = []; $cash_total_sales=0; $gst_total_sales=0; $total_gst_sales=0; $total_cash_sales=0; for ($i = 1; $i <= 12; $i++) { $months[] = date('M', mktime(0, 0, 0, $i, 1)); // 'M' for 3-letter month } ?>
S. NO. | Dealer | City | = $month;?> | Total | ||
---|---|---|---|---|---|---|
= ($j=$j+1)?> | = $set_deal['name']?> | = $set_deal['city']?> | 0){ while($set_sales = mysqli_fetch_assoc($get_sales)) { $get_ord = mysqli_query($conn, "SELECT sum(totprice) as prices FROM tbl_order where orderid='".$set_sales['orderid']."'"); $set_ord=mysqli_fetch_assoc($get_ord); $gst_total_sales +=$set_ord['prices']; } $total_gst_sales +=$gst_total_sales; } $get_sales = mysqli_query($conn, "SELECT * from tbl_confirmorder where userid='".$set_deal['user_id']."' and orderstatus in (0,1,5,15,2,3) and refid like '%CO%' and orderid IN(SELECT orderid from tbl_order where totprice!=0) and date(order_date_time) like '%$both%' order by orid asc"); $check_cash_rows = mysqli_num_rows($get_sales); if($check_cash_rows > 0){ while($set_sales = mysqli_fetch_assoc($get_sales)) { $get_ord = mysqli_query($conn, "SELECT sum(totprice) as prices FROM tbl_order where orderid='".$set_sales['orderid']."'"); $set_ord=mysqli_fetch_assoc($get_ord); $cash_total_sales +=$set_ord['prices']; } echo $total_cash_sales +=$cash_total_sales; } } if(date('Y-m', strtotime($set_deal['date'])) == $both){ $style='style="text-align:right; padding-right:0px; background-color:#DAF7A6"'; }else{ $style='style="text-align:right;padding-right:0px;"'; } ?>>GST: = $total_sales_ap;?> CASH: = $cash_total_sales;?> | >= $total_sales;?> | GST: = $total_gst_sales;?>
CASH: = $total_cash_sales;?> |
= $total_amount;?> |
S. NO. | Dealer | City | = $month;?> | Total | ||
---|---|---|---|---|---|---|
= ($j=$j+1)?> | = $set_deal['name']?> | = $set_deal['city']?> | 0){ while($set_sales = mysqli_fetch_assoc($get_sales)) { $get_ord = mysqli_query($conn, "SELECT sum(totprice) as prices FROM tbl_order where orderid='".$set_sales['orderid']."'"); $set_ord=mysqli_fetch_assoc($get_ord); $gst_total_sales +=$set_ord['prices']; } $total_gst_sales +=$gst_total_sales; } $get_sales1 = mysqli_query($conn, "SELECT * from tbl_confirmorder where userid='".$set_deal['user_id']."' and orderstatus in (0,1,5,15,2,3) and refid like '%CO%' and orderid IN(SELECT orderid from tbl_order where totprice!=0) and date(order_date_time) like '%$both%' order by orid asc"); $check_cash_rows = mysqli_num_rows($get_sales1); if($check_cash_rows > 0){ while($set_sales1 = mysqli_fetch_assoc($get_sales1)) { $get_ord1 = mysqli_query($conn, "SELECT sum(totprice) as prices FROM tbl_order where orderid='".$set_sales1['orderid']."'"); $set_ord1=mysqli_fetch_assoc($get_ord1); $cash_total_sales +=$set_ord1['prices']; } } $total_cash_sales +=$cash_total_sales; } if(date('Y-m', strtotime($set_deal['date'])) == $both){ $style='style="text-align:right; padding-right:0px; background-color:#DAF7A6"'; }else{ $style='style="text-align:right; padding-right:0px;"'; } ?>>GST: = $total_sales_ap;?> CASH: = $cash_total_sales;?> | >= $total_sales;?> | GST: = $total_gst_sales;?>
CASH: = $total_cash_sales;?> |
= $total_amount;?> |
= ($j=$j+1)?> | = 'Patients'?> | = 'Chennai'?> | = ($tot_month_sales_1+$tot_month_sales_2);?> | = $annual_patient_sales;?> |