booking/on_hold_cancel.php

130 lines
9.3 KiB
PHP
Executable File

<?php
require_once('fixed/config/go_con.php');
access(73);
?>
<!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">
<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>
الملغيات المعلقة
</h4>
</div>
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
</div>
</div>
</div>
<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">
<table class="table table-bordered text-center" style="vertical-align: middle;">
<thead class="table-primary">
<tr>
<th scope="col">#</th>
<th scope="col">التاريخ</th>
<th scope="col">الوقت</th>
<th scope="col">الفني</th>
<th scope="col">العميل</th>
<th scope="col">الموظف</th>
</tr>
</thead>
<tbody>
<?php
$get_invoices_sql = mysqli_query($db,
"SELECT
`bd`.`day_date`,
`bd`.`day_time`,
`bd`.`branch_id`,
`emplyee`.`name` ,
`bd`.`status_id`,
`bd`.`date_time`,
`bd`.`book_id`,
`book`.`tretment_id`,
`book`.`notes`,
`book`.`date_time` AS `user_date`,
`user`.`name` AS `user_book`,
`tretment`.`name` AS `tr_name`,
`tretment`.`number`
FROM `book_details` AS `bd`
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
LEFT JOIN `user` ON `bd`.`user_id` = `user`.`id`
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
LEFT JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
WHERE `bd`.`status_id` IN (21)
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
FROM `book_details`
WHERE `book_details`.`book_id` = `bd`.`book_id` -- must make all like that
GROUP BY `book_details`.`book_id`
)
AND `bd`.`day_date` > '2023-05-01'
AND `bd`.`branch_id` IN (2,3,4,5,6)
GROUP BY `bd`.`day_time`
ORDER BY `bd`.`day_date` ASC, `bd`.`date_time` ASC
");
if (mysqli_num_rows($get_invoices_sql) > 0) {
$count = 1;
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
?>
<tr>
<th scope="row"><?=$count?></th>
<td><?=$get_invoices['day_date']?></td>
<td><?=$get_invoices['day_time']?></td>
<td><?=$get_invoices['name']?></td>
<td><?=$get_invoices['tr_name']?> <br> <?=$get_invoices['number']?></td>
<td><?=$get_invoices['user_book']?></td>
</tr>
<?php
$count++;
}
} else {
?>
<tr>
لا يوجد بيانات
</tr>
<?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'); ?>
</body>
</html>