booking/active_book.php
2025-03-24 19:02:58 +03:00

1369 lines
120 KiB
PHP

<?php
require_once('fixed/config/go_con.php');
$today = date("Y-m-d");
if (!empty($_GET['date'])) {
$today = $_GET['date'];
if (DateTime::createFromFormat('Y-m-d', $today) == false) {
$today = date("Y-m-d");
}
}
$branch_id = $_SESSION['branch'];
if (!empty($_GET['branch'])) {
$branch_id = $_GET['branch'];
if (!is_numeric($branch_id)) {
$branch_id = $_SESSION['branch'];
} else {
if ($branch_id == 1) {
$branch_id = $_SESSION['branch'];
}
}
}
switch ($branch_id) {
case 2:
access(55);
break;
case 3:
access(56);
break;
case 4:
access(57);
break;
case 5:
access(58);
break;
}
$branch_sql = '`branch_id`='.$branch_id;
if ($branch_id == 1) {
$branch_sql = '`branch_id`<>'.$branch_id;
}
// work time
$commercial_register_sql = mysqli_query($db, "SELECT `commercial_register`.`start_work`, `commercial_register`.`start_work_fri`, `commercial_register`.`end_work`
FROM `branch`
LEFT JOIN `commercial_register` ON `branch`.`commercial_register_id` = `commercial_register`.`id`
WHERE `branch`.`id` = $branch_id"
);
$commercial_register = mysqli_fetch_assoc($commercial_register_sql);
$Next = date('Y-m-d', strtotime('+1 day', strtotime($today)));
$Previous = date('Y-m-d', strtotime('-1 day', strtotime($today)));
$Day = date('D', strtotime($today));
function Day_ar()
{
global $Day;
$find = array("Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri");
$replace = array("السبت", "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة");
$ar_day_format = $Day;
$Day_ar = str_replace($find, $replace, $ar_day_format);
return $Day_ar;
}
function Today_ar()
{
global $today;
$Today_ar = date('d-m-Y', strtotime($today));
return $Today_ar;
}
$tabs = $_SESSION['tab'];
if (empty($tabs)) {
$tabs = 1;
}
$not_eq = "=";
if ($tabs == 1) {
$not_eq = "<>";
}
$start_today_time_static = $commercial_register['start_work'];
if ($Day == "Fri") {
$start_today_time_static = $commercial_register['start_work_fri'];
}
$end_today_time_static = $commercial_register['end_work'];
$archives = false;
if (strtotime($today) <= strtotime(date('Y-m-d', strtotime('-1 month', strtotime(date('Y-m-d')))))) {
$archives = true;
}
if (strtotime($today) <= strtotime(date('2022-09-30'))) {
$archives = true;
}
?>
<!DOCTYPE html>
<html lang="en" dir="rtl">
<?php require_once('fixed/head/go.php'); ?>
<body class="rtl">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@6.5.95/css/materialdesignicons.min.css">
<?php require_once('fixed/loader/go.php'); ?>
<div class="page-wrapper" id="pageWrapper">
<?php require_once('fixed/header/go.php'); ?>
<div class="page-body-wrapper">
<?php require_once('fixed/sidebar/go.php'); ?>
<div class="page-body">
<div class="container-fluid">
<div class="row">
<style>
.mo-home-table {
box-shadow: 3px 3px 3px 3px rgba(0, 0, 0, 0.1);
}
.mo-home-table thead th { position: sticky; top: 0; background: #f0f3f5; border:#dadada solid 1px !important;}
.mo-home-table td { border:#dadada solid 1px; min-width: 125px !important; overflow: hidden; height: 150px !important; padding: 0px !important; }
td:hover .before { display: none;}
td:hover .after { display: block; }
.modal-header h5 { font-weight: bold;}
.modal-body table { border:#eff2f4 solid 1px; width: 100%;}
span.mdi {
cursor: pointer;
}
.table-responsive {
height: 80vh;
overflow-y: scroll;
}
table.mo-home-table tbody {
overflow: scroll;
height: 200px;
}
table thead th {
z-index: 100;
}
table thead th:first-child {
position: sticky;
left: 0;
z-index: 100;
}
tr > :first-child {
position: -webkit-sticky;
position: sticky;
background: rgba(255, 255, 255, .5);
right: 0;
z-index: 100;
}
.bg-gradient7 {
background-image: linear-gradient(120deg, #56ff00 0, #00e09e 100%) !important;
}
thead th { position: sticky; top: 0; }
</style>
<div class="col-12">
<div class="card">
<div class="card-body new-user order-list text-center">
<div class="row">
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
</div>
<div class="page-title mb-3 col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
<i class="mdi mdi-monitor mr-2">
</i>
<h4>
حجوزات يوم
<?= Day_ar() ?>
<br />
<?= Today_ar() ?>
</h4>
</div>
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
<?php
if ($commercial_register_id == 2) {
?>
<a href="active_book?branch=2&date=<?=$today?>">
<button class="btn btn-primary" type="button">15</button>
</a>
<a href="active_book?branch=3&date=<?=$today?>">
<button class="btn btn-primary" type="button">7</button>
</a>
<a href="active_book?branch=4&date=<?=$today?>">
<button class="btn btn-primary" type="button">29</button>
</a>
<?php
}
?>
</div>
</div>
<div class="row">
<div class="col-12 col-sm-12 col-md-2 col-lg-3 col-xl-3">
</div>
<div class="col-2 col-sm-2 col-md-1 col-lg-1 col-xl-1">
<a class="btn btn-danger btn-round waves-effect waves-light col-12" href="active_book?date=<?= $Previous ?>&branch=<?= $branch_id ?>" style="padding: 0.375rem 0.75rem;">-</a>
</div>
<div class="col-8 col-sm-8 col-md-6 col-lg-4 col-xl-4">
<input id="Select-date" class="form-control" type="date" value="" style="text-align: center !important;">
</div>
<div class="col-2 col-sm-2 col-md-1 col-lg-1 col-xl-1">
<a class="btn btn-primary btn-round waves-effect waves-light col-12" href="active_book?date=<?= $Next ?>&branch=<?= $branch_id ?>" style="padding: 0.375rem 0.75rem;">+</a>
</div>
<div class="col-12 col-sm-12 col-md-2 col-lg-3 col-xl-3">
</div>
</div>
</div>
<?php
$type_of_services_sql = mysqli_query($db, "SELECT `id`, `name`
FROM `type_of_services`
WHERE `show_in_table_id` = 2 AND `activation_id` = 2"
);
if (mysqli_num_rows($type_of_services_sql) > 0) {
?>
<div class="card-body" style="padding: 0 30px;">
<ul class="nav nav-pills nav-justified" role="tablist">
<?php
if (mysqli_num_rows($type_of_services_sql) > 1) {
?>
<li class="nav-item waves-effect waves-light">
<a class="nav-link <?php if($tabs == 1 ) {echo "active";} ?>" data-toggle="tab" onclick="window.location='work/order/php/tabs.php?num=1'" role="tab" aria-selected="true">الكل</a>
</li>
<?php
}
?>
<?php
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
?>
<li class="nav-item waves-effect waves-light">
<a class="nav-link <?php if($tabs == $type_of_services['id'] ) {echo "active";} ?>" data-toggle="tab" onclick="window.location='work/order/php/tabs.php?num=<?=$type_of_services['id']?>'" role="tab" aria-selected="false"><?=$type_of_services['name']?></a>
</li>
<?php
}
?>
</ul>
</div>
<?php
}
?>
<div class="tab-content">
<div class="tab-pane p-3 active" id="tab<?=$tabs?>" role="tabpanel">
<div class="card-body new-user order-list">
<div class="table-responsive" style="zoom:0.<?=$table_size?>;">
<table style="width: 0 !important; margin: 0 auto !important;" class="table table-hover mb-3 text-center mo-home-table">
<thead class="thead-light">
<tr>
<th></th>
<?php
$start_today_time = $start_today_time_static;
$end_today_time = $end_today_time_static;
for ($start_today_time; $start_today_time <= $end_today_time; $start_today_time++) {
$restart_temp = $start_today_time;
if ($start_today_time > 23) {
$restart_temp = $start_today_time - 24;
}
if ($restart_temp < 10) {
$start_today_time_temp = "0" . $restart_temp . ":00:00";
} else {
$start_today_time_temp = $restart_temp . ":00:00";
}
$today_temp = $today;
if ($start_today_time > 23) {
$today_temp = $Next;
}
?>
<th><?=date((date("H", strtotime($start_today_time_temp)) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($start_today_time_temp))?><a href="work/php/one_clock_close.php?date=<?=$today_temp?>&time=<?=$start_today_time_temp?>&branch=<?=$branch_id?>"> <span style="float: right;font-size: 15px;height: 100%;" class="mdi mdi-close-outline"></span></a></th>
<?php
}
?>
<th colspan="4">التفاصيل</th>
</tr>
</thead>
<tbody>
<?php
$tretment_details_state = array();
// العمالة
$get_emplyee_sql = mysqli_query($db, "SELECT
`emplyee`.`id`,
`emplyee`.`name`,
`holi_days`.`day`,
`emplyee`.`branch_id`
FROM `occupation`
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
LEFT JOIN `holi_days` ON `emplyee`.`holi_days_id` = `holi_days`.`id`
LEFT JOIN `table_postion` ON `emplyee`.`id` = `table_postion`.`emplyee_id`
WHERE `occupation`.`show_in_table_id` = 2
AND `emplyee`.$branch_sql
AND `occupation`.`type_of_services_id` $not_eq $tabs
AND `emplyee`.`activation_id` = 2
AND `branch`.`commercial_register_id` = $commercial_register_id
ORDER BY -`table_postion`.`postion` DESC, `emplyee`.`id` ASC
");
$count_total_p = 0;
$count_time_00 = 0;
$count_time_01 = 0;
$count_time_02 = 0;
$count_time_03 = 0;
$count_time_04 = 0;
$count_time_05 = 0;
$count_time_06 = 0;
$count_time_07 = 0;
$count_time_08 = 0;
$count_time_09 = 0;
$count_time_10 = 0;
$count_time_11 = 0;
$count_time_12 = 0;
$count_time_13 = 0;
$count_time_14 = 0;
$count_time_15 = 0;
$count_time_16 = 0;
$count_time_17 = 0;
$count_time_18 = 0;
$count_time_19 = 0;
$count_time_20 = 0;
$count_time_21 = 0;
$count_time_22 = 0;
$count_time_23 = 0;
while ($get_emplyee = mysqli_fetch_assoc($get_emplyee_sql)) {
$start_today_time = $start_today_time_static;
$end_today_time = $end_today_time_static;
$start_today_time_sql = $start_today_time . ":00:00";
$end_today_time_sql = $end_today_time . ":59:59";
$emp_id = $get_emplyee['id'];
$emp_neme = $get_emplyee['name'];
?>
<tr>
<td class="sorting_1" style ="padding: 15px !important;">
<div style="height:120px; overflow:revert">
<img class="rounded-circle" src="uploads/emplyee/user/1.png" alt="user" data-bs-toggle="modal" data-animation="bounce" data-bs-target=".emp_<?=$get_emplyee['id']?>" style="width: 90px !important;height: 90px !important;">
<div style="margin-top: 10px;">
<?= $get_emplyee['name'] ?>
</div>
</div>
</td>
<?php
if ($archives) {
include('work/files/book/archives.php');
} else {
$get_tretment_details_sql_state = mysqli_query($db,
"SELECT
`bd`.`day_date`,
`bd`.`day_time`,
`bd`.`branch_id`,
`bd`.`emplyee_id`,
`bd`.`status_id`,
`bd`.`date_time`,
`bd`.`book_id` AS `book_id`,
`bd`.`name`,
`bd`.`tretment_id`,
`bd`.`notes`,
`bd`.`date_time` AS `user_date`,
`bd`.`user_book`,
`bd`.`tr_name`,
`bd`.`number`
FROM `book_temp` AS `bd`
WHERE `bd`.`day_date`='$today'
AND (`bd`.`day_time` >= '$start_today_time_sql' AND `bd`.`day_time` <= '$end_today_time_sql')
AND `bd`.`emplyee_id`='$emp_id'
AND `bd`.$branch_sql
AND `bd`.`status_id` IN (6,14,15)
GROUP BY `bd`.`day_time`
ORDER BY `bd`.`day_time`, `bd`.`date_time`
");
}
$tretment_details_state_temp = array();
while ($get_tretment_details_state = mysqli_fetch_assoc($get_tretment_details_sql_state)) {
array_push($tretment_details_state, $get_tretment_details_state);
array_push($tretment_details_state_temp, $get_tretment_details_state);
}
if ($end_today_time > 23) { // greter than 24 hour
$end_today_time_sql = "23:59:59";
$how_many_left = ($end_today_time - 23) - 1 . ":59:59";
if ($archives) {
include('work/files/book/archives_above_23.php');
} else {
$get_tretment_details_sql_state2 = mysqli_query($db,
"SELECT
`bd`.`day_date`,
`bd`.`day_time`,
`bd`.`branch_id`,
`bd`.`emplyee_id`,
`bd`.`status_id`,
`bd`.`date_time`,
`bd`.`book_id` AS `book_id`,
`bd`.`name`,
`bd`.`tretment_id`,
`bd`.`notes`,
`bd`.`user_date`,
`bd`.`user_book`,
`bd`.`tr_name`,
`bd`.`number`
FROM `book_temp` AS `bd`
WHERE `bd`.`day_date` = '$Next'
AND `bd`.`day_time` <= '$how_many_left'
AND `bd`.`emplyee_id`='$emp_id'
AND `bd`.$branch_sql
AND `bd`.`status_id` IN (6,14,15)
GROUP BY `bd`.`day_time`
ORDER BY `bd`.`day_time`, `bd`.`date_time`
");
}
while ($get_tretment_details_state2 = mysqli_fetch_assoc($get_tretment_details_sql_state2)) {
array_push($tretment_details_state, $get_tretment_details_state2);
array_push($tretment_details_state_temp, $get_tretment_details_state2);
}
}
$branch_id = $get_emplyee['branch_id'];
$temp_count = 0;
$count_all_s = 0;
$count_all_p = 0;
$count_full = 0;
$count_foot = 0;
$count_body = 0;
for ($start_today_time; $start_today_time <= $end_today_time; $start_today_time++) {
$restart_temp = $start_today_time;
if ($start_today_time > 23) {
$restart_temp = $start_today_time - 24;
}
if ($restart_temp < 10) {
$start_today_time_temp = "0" . $restart_temp . ":00:00";
} else {
$start_today_time_temp = $restart_temp . ":00:00";
}
$today_temp = $today;
if ($start_today_time > 23) {
$today_temp = $Next;
}
$price_now = 0;
if (($tretment_details_state_temp[$temp_count]['day_time']) == ($start_today_time_temp) && $tretment_details_state_temp[$temp_count]['emplyee_id'] == $emp_id) {
switch ($tretment_details_state_temp[$temp_count]['status_id']) {
case 6: case 7:
$for_pay_id = $tretment_details_state_temp[$temp_count]['book_id'];
$pay_sql = mysqli_query($db, "SELECT
`services`.`price` AS `serv_p`,
IFNULL(
(SELECT
SUM(`invoices_discount_details`.`discount`)
FROM `invoices_discount_details`
LEFT JOIN `invoices_discount` ON `invoices_discount_details`.`invoices_discount_id` = `invoices_discount`.`id`
LEFT JOIN `invoices_details` ON `invoices_discount`.`invoices_details_id` = `invoices_details`.`id`
WHERE `invoices_details`.`invoices_id` = `invoices_has_book`.`invoices_id`
AND `invoices_discount_details`.`services_id` = `services`.`id`
AND `invoices_discount_details`.`id` IN (SELECT
`invoices_discount_details`.`id`
FROM `invoices_discount_details`
LEFT JOIN `invoices_discount` ON `invoices_discount_details`.`invoices_discount_id` = `invoices_discount`.`id`
LEFT JOIN `invoices_details` ON `invoices_discount`.`invoices_details_id` = `invoices_details`.`id`
WHERE `invoices_details`.`invoices_id` = `invoices_has_book`.`invoices_id`
AND `invoices_discount_details`.`services_id` = `services`.`id`
GROUP BY `invoices_discount_details`.`reason`
)
)
,0) AS `desc`
FROM `book_details` AS `bd`
INNER JOIN `book` ON `bd`.`book_id` = `book`.`id`
INNER JOIN `invoices_has_book` ON `invoices_has_book`.`book_id` = `book`.`id`
INNER JOIN `services` ON `bd`.`services_id` = `services`.`id`
WHERE `bd`.`book_id`='$for_pay_id'
AND `bd`.`status_id` IN (6,14,15)
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`)
ORDER BY `bd`.`day_date`, `bd`.`day_time`");
$get_pay = mysqli_fetch_assoc($pay_sql);
$count_all_p += round($get_pay['serv_p'] - $get_pay['desc'] + (($get_pay['serv_p'] - $get_pay['desc'])*$vat/100),2);
$count_total_p += $count_all_p;
?>
<td class="bg-gradient4">
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $tretment_details_state_temp[$temp_count]['book_id'] ?>" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div><?= $tretment_details_state_temp[$temp_count]['name'] ?></div>
</div>
<div style="white-space: nowrap;">
<div>المدفوع</div>
</div>
<div style="white-space: nowrap;">
<div><?= round($get_pay['serv_p'] - $get_pay['desc'] + (($get_pay['serv_p'] - $get_pay['desc'])*$vat/100),2)?></div>
</div>
</div>
<div style="height:30px">
</div>
</div>
</td>
<?php
break;
case 8: case 9:
?>
<td class="bg-gradient1">
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" data-bs-target="#booking_<?= $tretment_details_state_temp[$temp_count]['book_id'] ?>" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div><?= $tretment_details_state_temp[$temp_count]['name'] ?></div>
</div>
<div style="white-space: nowrap;">
<div>المدفوع</div>
</div>
<div style="white-space: nowrap;">
<div>0</div>
</div>
</div>
<div style="height:30px">
</div>
</div>
</td>
<?php
break;
}
switch ($start_today_time_temp) {
case '00:00:00':
$count_time_00 += 1;
break;
case '01:00:00':
$count_time_01 += 1;
break;
case '02:00:00':
$count_time_02 += 1;
break;
case '03:00:00':
$count_time_03 += 1;
break;
case '04:00:00':
$count_time_04 += 1;
break;
case '05:00:00':
$count_time_05 += 1;
break;
case '06:00:00':
$count_time_06 += 1;
break;
case '07:00:00':
$count_time_07 += 1;
break;
case '08:00:00':
$count_time_08 += 1;
break;
case '09:00:00':
$count_time_09 += 1;
break;
case '10:00:00':
$count_time_10 += 1;
break;
case '11:00:00':
$count_time_11 += 1;
break;
case '12:00:00':
$count_time_12 += 1;
break;
case '13:00:00':
$count_time_13 += 1;
break;
case '14:00:00':
$count_time_14 += 1;
break;
case '15:00:00':
$count_time_15 += 1;
break;
case '16:00:00':
$count_time_16 += 1;
break;
case '17:00:00':
$count_time_17 += 1;
break;
case '18:00:00':
$count_time_18 += 1;
break;
case '19:00:00':
$count_time_19 += 1;
break;
case '20:00:00':
$count_time_20 += 1;
break;
case '21:00:00':
$count_time_21 += 1;
break;
case '22:00:00':
$count_time_22 += 1;
break;
case '23:00:00':
$count_time_23 += 1;
break;
}
$count_all_s += 1;
if ($tretment_details_state_temp[$temp_count]['name'] == 'تدليك الاقدام') {
$count_foot += 1;
}
if ($tretment_details_state_temp[$temp_count]['name'] == 'تدليك الجسم') {
$count_body += 1;
}
if ($tretment_details_state_temp[$temp_count]['name'] == 'تدليك كامل') {
$count_full += 1;
}
$temp_count = $temp_count + 1;
} else {
?>
<td class="bg-gradient5">
<div title="اغلق بواسطة النظام" style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div style="height: 100px; display: flex; justify-content: center; align-items: center;">
<div>غير متاح</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<?php
}
}
?>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_all_s?></div>
</div>
<div style="white-space: nowrap;">
<div>ايراد الفني</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_all_p?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>الأقدام</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_foot?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>الجسم</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_body?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>الكامل</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_full?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
</tr>
<?php
}
?>
<?php
if ($commercial_register_id == 2) {
?>
<tr>
<td></td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_09?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_10?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_11?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_12?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_13?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_14?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_15?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_16?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_17?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_18?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_19?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_20?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_21?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_22?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_23?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_00?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>المجموع</div>
</div>
<div style="white-space: nowrap;">
<div><?=+$count_time_00+$count_time_01+$count_time_02+$count_time_03+$count_time_04+$count_time_05+$count_time_06+$count_time_07+$count_time_08+$count_time_09+$count_time_10+$count_time_11+$count_time_12+$count_time_13+$count_time_14+$count_time_15+$count_time_16+$count_time_17+$count_time_18+$count_time_19+$count_time_20+$count_time_21+$count_time_22+$count_time_23?></div>
</div>
<div style="white-space: nowrap;">
<div>الايرادات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_total_p?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td colspan="3">
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>للمزيد من التقاصيل</div>
</div>
<div style="white-space: nowrap;">
<a href="active_book_d">اضغط هنا</a>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
</tr>
<?php
}
if ($commercial_register_id == 3) {
?>
<tr>
<td></td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_09?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_10?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_11?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_12?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_13?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_14?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_15?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_16?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_17?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_18?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_19?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_20?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_21?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>عدد الخدمات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_time_22?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td>
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>المجموع</div>
</div>
<div style="white-space: nowrap;">
<div><?=+$count_time_00+$count_time_01+$count_time_02+$count_time_03+$count_time_04+$count_time_05+$count_time_06+$count_time_07+$count_time_08+$count_time_09+$count_time_10+$count_time_11+$count_time_12+$count_time_13+$count_time_14+$count_time_15+$count_time_16+$count_time_17+$count_time_18+$count_time_19+$count_time_20+$count_time_21+$count_time_22+$count_time_23?></div>
</div>
<div style="white-space: nowrap;">
<div>الايرادات</div>
</div>
<div style="white-space: nowrap;">
<div><?=$count_total_p?></div>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<td colspan="3">
<div style="display: flex !important; flex-direction: column;">
<div style="height: 25px;">
</div>
<div data-bs-toggle="modal" data-animation="bounce" style="color:black; min-height: 100px; display: flex; justify-content: center; align-items: center; flex-direction: column;">
<div style="white-space: nowrap;">
<div>للمزيد من التقاصيل</div>
</div>
<div style="white-space: nowrap;">
<a href="active_book_d">اضغط هنا</a>
</div>
</div>
<div style="height: 30px;">
</div>
</div>
</td>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php require_once('fixed/footer/go.php'); ?>
</div>
</div>
<?php require_once('fixed/js/go.php'); ?>
<script>
$("#Select-date").change(function() {
var SelectedDate = $(this).val();
window.location = 'active_book?branch=<?= $branch_id ?>&date=' + SelectedDate
});
function refrish() {
window.location.reload(1);
}
$( document ).ready(function() {
window.setInterval(function() {
getInfo();
}, 25000);
function getInfo() {
refrish();
}
});
</script>
</body>
</html>