Monthly Report
DATE_SUB(NOW(), INTERVAL 1 WEEK) ORDER BY score DESC; $Query = "SELECT `id`, `client_code`,`client_extn`, `client_name`, `client_email`, `client_contact`, `concern_name`, `concern_email`, `concern_contact`, `financial_email`, `client_status`, `create_date`,`local`,`local_status` FROM `tbl_client_details` WHERE local='1' order by id asc"; $nameemp_chat=$DB->query($Query); $pricing1=0; $tot_avg=0; while($rowemp_chat = mysql_fetch_array($nameemp_chat)) { /*while ($DB->Multicoloums()) {*/ $local=$rowemp_chat["local"] ; $local_status=$rowemp_chat["local_status"] ; $c_id=$rowemp_chat["id"] ; $client_id=$rowemp_chat["id"] ; $Query_local_pre_j = "SELECT count(`id`),sum(pricing*20) as new from tbl_job_details where month(job_create_date)='$req_month' and YEAR(job_create_date)='$re_year' and client_id='$c_id' and pricingstatus='1' and job_status='3' and job_type!='3' "; $name_local_pre_j=$DB->query($Query_local_pre_j); $num_local_pre_j = mysql_fetch_array($name_local_pre_j); $pricing1=$num_local_pre_j[1]; $Query1239999 = "SELECT id,pricing,job_est_time,cancel_sta,job_status from tbl_job_details where month(job_create_date)='$req_month' and YEAR(job_create_date)='$re_year' and client_id='$c_id' and pricingstatus='1' and job_status='3' and job_type!='3' "; $name1239999=$DB->query($Query1239999); $num_rowscompleted123 = mysql_num_rows($name1239999); $secondsmsss=0; $time_seconds1=0; $time_seconds=0; while($row1239999 = mysql_fetch_array($name1239999)) { $amo=$row123_man['amo1']; $n_job_id=$row1239999['id']; $job_est_time=$row1239999['job_est_time']; if($num_rowscompleted123_para_ven!=0) { $amo=$row123_man['amo1']; } $est_name=($job_est_time.':00'); $str_time = "$est_name"; $str_time = preg_replace("/^([\d]{1,2})\:([\d]{2})$/", "00:$1:$2", $str_time); sscanf($str_time, "%d:%d:%d", $hours, $minutes, $seconds); $time_seconds1 = $hours * 3600 + $minutes * 60 + $seconds; $time_seconds=($time_seconds1); $secondsmsss +=$time_seconds; ?> query($Query1239999_mas); $num_rowscompleted123_para_ven = mysql_num_rows($name1239999_hhh); $row123_man = mysql_fetch_array($name1239999_hhh); $row123_man['amo1']; $Query1239999_mas_1 = "SELECT * from tbl_add_money where client_id='$client_id' and month(added_date)='$req_month' and YEAR(added_date)='$re_year' "; $name1239999_hhh_1=$DB->query($Query1239999_mas_1); $num_rowscompleted123_para_ven_1 = mysql_num_rows($name1239999_hhh_1); $row123_man_hhhh = mysql_fetch_array($name1239999_hhh); $hours = floor(($secondsmsss ) / 3600); $minutes = floor(($secondsmsss - ($hours * 3600))/60); $seconds_ms = floor(($secondsmsss - ($hours * 3600) - ($minutes*60))); $tot_avg=round((($pricing1/$secondsmsss)*3600)); ?>
S.No Company Name Client Email Job Count Amount Worked Hours Amount
:
Total