first commit
This commit is contained in:
commit
77dec8d171
73
PROCESSLIST.php
Normal file
73
PROCESSLIST.php
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(50);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!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="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">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Id</th>
|
||||||
|
<th scope="col">User</th>
|
||||||
|
<th scope="col">Host</th>
|
||||||
|
<th scope="col">db</th>
|
||||||
|
<th scope="col">Command</th>
|
||||||
|
<th scope="col">Time</th>
|
||||||
|
<th scope="col">State</th>
|
||||||
|
<th scope="col">Info</th>
|
||||||
|
<th scope="col">Progress</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$get_PROCESSLIST_sql = mysqli_query($db, "SHOW FULL PROCESSLIST");
|
||||||
|
while ($get_PROCESSLIST = mysqli_fetch_assoc($get_PROCESSLIST_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$get_PROCESSLIST['Id']?></th>
|
||||||
|
<td><?=$get_PROCESSLIST['User']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['Host']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['db']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['Command']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['Time']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['State']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['Info']?></td>
|
||||||
|
<td><?=$get_PROCESSLIST['Progress']?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</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>
|
||||||
38
WORK_FILES.php
Normal file
38
WORK_FILES.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(50);
|
||||||
|
?>
|
||||||
|
<!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="tab-pane p-3 active" id="tab<?=$tabs?>" role="tabpanel">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<pre style="text-align:left;">
|
||||||
|
<?=shell_exec("ps aux | grep data_test.php")?>
|
||||||
|
</pre>
|
||||||
|
</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>
|
||||||
25
active.php
Normal file
25
active.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(165); // 7
|
||||||
|
$variable = 2;
|
||||||
|
if (!empty($_GET['m']) && $_GET['m'] == 1) {
|
||||||
|
require_once('work/files/active/3.php');
|
||||||
|
} else {
|
||||||
|
switch ($variable) {
|
||||||
|
case 1: // from frist lunch
|
||||||
|
require_once('work/files/active/1.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: // from 12/02/2023 12:00
|
||||||
|
require_once('work/files/active/5.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
require_once('work/files/active/3.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
1369
active_book.php
Normal file
1369
active_book.php
Normal file
File diff suppressed because it is too large
Load Diff
294
active_book_d.php
Normal file
294
active_book_d.php
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(59);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$Next = date('Y-m-d', strtotime('+1 day', strtotime($today)));
|
||||||
|
$Previous = date('Y-m-d', strtotime('-1 day', strtotime($today)));
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
$branch_sql = '='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>'.$branch_id;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!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">
|
||||||
|
<style>
|
||||||
|
a.active {
|
||||||
|
background-color: #e6edef;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
background: #24695c;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: white;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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="email-wrap bookmark-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<a class="nav-link mb-0 active" data-toggle="pill" href="#d" aria-selected="false" onclick="window.location='active_book_d?b=<?=$commercial_register['id']?>&date=<?=$today?>'">يومي</a>
|
||||||
|
<a class="nav-link mb-0" data-toggle="pill" href="#m" aria-selected="false" onclick="window.location='active_book_m?b=<?=$commercial_register['id']?>&date=<?=$today?>'">شهري</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`"
|
||||||
|
);
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if($branch_id == $commercial_register['id']){echo 'active';}?> ?>" data-toggle="pill" href="#branch-<?=$commercial_register['id']?>" aria-selected="false" onclick="window.location='active_book_d?b=<?=$commercial_register['id']?>&date=<?=$today?>'"><?=$commercial_register['branch_name']?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<div class="card">
|
||||||
|
<div class="tab-content" id="profile-tabContent">
|
||||||
|
<div class="tab-pane fade show active" id="all">
|
||||||
|
<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>
|
||||||
|
تقرير جدول يوم
|
||||||
|
<br/>
|
||||||
|
<?=$today?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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_d?date=<?= $Previous ?>&b=<?= $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_d?date=<?= $Next ?>&b=<?= $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
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
WHERE `bd`.`day_date`='$today'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `bd`.`book_id`
|
||||||
|
GROUP BY `book_details`.`book_id`
|
||||||
|
)
|
||||||
|
AND `services`.`commercial_register_id` = $commercial_register_id
|
||||||
|
GROUP BY `services`.`id`
|
||||||
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
// اسم الخدمات
|
||||||
|
$serv_data = array();
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$serv_data[$get_book_details['id']] = array();
|
||||||
|
array_push($serv_data[$get_book_details['id']], $get_book_details['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`bd`.`day_time`
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
WHERE `bd`.`day_date`='$today'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `bd`.`book_id`
|
||||||
|
GROUP BY `book_details`.`book_id`
|
||||||
|
)
|
||||||
|
GROUP BY `bd`.`day_time`
|
||||||
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
// الاوقات اللتي تم الحجز بها
|
||||||
|
$data = array();
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$data[$get_book_details['day_time']] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`bd`.`day_time`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`,
|
||||||
|
COUNT(`book`.`id`) AS `total`
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
WHERE `bd`.`day_date`='$today'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `bd`.`book_id`
|
||||||
|
GROUP BY `book_details`.`book_id`
|
||||||
|
)
|
||||||
|
GROUP BY `bd`.`day_time`, `services`.`id`
|
||||||
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
// اضافة الحجوزات خدمة لكل وقت
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$data[$get_book_details['day_time']][$get_book_details['id']] = $get_book_details['total'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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 id="employee_data" class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
#
|
||||||
|
</th>
|
||||||
|
<?php
|
||||||
|
$data_keys = array_keys($data);
|
||||||
|
$serv_data_keys = array_keys($serv_data);
|
||||||
|
for ($i=0; $i < count($data_keys); $i++) {
|
||||||
|
?>
|
||||||
|
<th scope="col"><?=date((date("H", strtotime($data_keys[$i])) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($data_keys[$i]))?></th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th scope="col">
|
||||||
|
المجموع
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($f=0; $f < count($serv_data_keys); $f++) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?=$serv_data[$serv_data_keys[$f]][0]?></td>
|
||||||
|
<?php
|
||||||
|
$total_td = 0;
|
||||||
|
for ($i=0; $i < count($data_keys); $i++) {
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if($data[$data_keys[$i]][$serv_data_keys[$f]]) {
|
||||||
|
$total_td += $data[$data_keys[$i]][$serv_data_keys[$f]];
|
||||||
|
echo $data[$data_keys[$i]][$serv_data_keys[$f]];
|
||||||
|
} else {
|
||||||
|
echo 0;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<?=$total_td?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button type="button" id="export_button" class="btn btn-success btn-sm">ملف excel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$("#Select-date").change(function() {
|
||||||
|
var SelectedDate = $(this).val();
|
||||||
|
window.location = 'active_book_d?b=<?=$branch_id?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
function html_table_to_excel(type)
|
||||||
|
{
|
||||||
|
var data = document.getElementById('employee_data');
|
||||||
|
var file = XLSX.utils.table_to_book(data, {sheet: "sheet1"});
|
||||||
|
XLSX.write(file, { bookType: type, bookSST: true, type: 'base64' });
|
||||||
|
XLSX.writeFile(file, 'ايراد الفرع.' + type);
|
||||||
|
}
|
||||||
|
const export_button = document.getElementById('export_button');
|
||||||
|
export_button.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
294
active_book_m.php
Normal file
294
active_book_m.php
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(59);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$Next = date('Y-m', strtotime('+1 month', strtotime($today)));
|
||||||
|
$Previous = date('Y-m', strtotime('-1 month', strtotime($today)));
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
$branch_sql = '='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>'.$branch_id;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!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">
|
||||||
|
<style>
|
||||||
|
a.active {
|
||||||
|
background-color: #e6edef;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
background: #24695c;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: white;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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="email-wrap bookmark-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<a class="nav-link mb-0" data-toggle="pill" href="#d" aria-selected="false" onclick="window.location='active_book_d?b=<?=$commercial_register['id']?>&date=<?=$today?>'">يومي</a>
|
||||||
|
<a class="nav-link mb-0 active" data-toggle="pill" href="#m" aria-selected="false" onclick="window.location='active_book_m?b=<?=$commercial_register['id']?>&date=<?=$today?>'">شهري</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`"
|
||||||
|
);
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if($branch_id == $commercial_register['id']){echo 'active';}?> ?>" data-toggle="pill" href="#branch-<?=$commercial_register['id']?>" aria-selected="false" onclick="window.location='active_book_m?b=<?=$commercial_register['id']?>&date=<?=$today?>'"><?=$commercial_register['branch_name']?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<div class="card">
|
||||||
|
<div class="tab-content" id="profile-tabContent">
|
||||||
|
<div class="tab-pane fade show active" id="all">
|
||||||
|
<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>
|
||||||
|
تقرير جدول شهر
|
||||||
|
<br/>
|
||||||
|
<?=$today?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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_m?date=<?= $Previous ?>&b=<?= $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_m?date=<?= $Next ?>&b=<?= $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
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
WHERE DATE_FORMAT(`bd`.`day_date`, '%Y-%m') ='$today'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `bd`.`book_id`
|
||||||
|
GROUP BY `book_details`.`book_id`
|
||||||
|
)
|
||||||
|
AND `services`.`commercial_register_id` = $commercial_register_id
|
||||||
|
GROUP BY `services`.`id`
|
||||||
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
// اسم الخدمات
|
||||||
|
$serv_data = array();
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$serv_data[$get_book_details['id']] = array();
|
||||||
|
array_push($serv_data[$get_book_details['id']], $get_book_details['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`bd`.`day_time`
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
WHERE DATE_FORMAT(`bd`.`day_date`, '%Y-%m') ='$today'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `bd`.`book_id`
|
||||||
|
GROUP BY `book_details`.`book_id`
|
||||||
|
)
|
||||||
|
GROUP BY `bd`.`day_time`
|
||||||
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
// الاوقات اللتي تم الحجز بها
|
||||||
|
$data = array();
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$data[$get_book_details['day_time']] = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`bd`.`day_time`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`,
|
||||||
|
COUNT(`book`.`id`) AS `total`
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
WHERE DATE_FORMAT(`bd`.`day_date`, '%Y-%m') ='$today'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `bd`.`book_id`
|
||||||
|
GROUP BY `book_details`.`book_id`
|
||||||
|
)
|
||||||
|
GROUP BY `bd`.`day_time`, `services`.`id`
|
||||||
|
ORDER BY `bd`.`day_time`, `bd`.`date_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
// اضافة الحجوزات خدمة لكل وقت
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$data[$get_book_details['day_time']][$get_book_details['id']] = $get_book_details['total'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<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 id="employee_data" class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
#
|
||||||
|
</th>
|
||||||
|
<?php
|
||||||
|
$data_keys = array_keys($data);
|
||||||
|
$serv_data_keys = array_keys($serv_data);
|
||||||
|
for ($i=0; $i < count($data_keys); $i++) {
|
||||||
|
?>
|
||||||
|
<th scope="col"><?=date((date("H", strtotime($data_keys[$i])) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($data_keys[$i]))?></th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th scope="col">
|
||||||
|
المجموع
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($f=0; $f < count($serv_data_keys); $f++) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?=$serv_data[$serv_data_keys[$f]][0]?></td>
|
||||||
|
<?php
|
||||||
|
$total_td = 0;
|
||||||
|
for ($i=0; $i < count($data_keys); $i++) {
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if($data[$data_keys[$i]][$serv_data_keys[$f]]) {
|
||||||
|
$total_td += $data[$data_keys[$i]][$serv_data_keys[$f]];
|
||||||
|
echo $data[$data_keys[$i]][$serv_data_keys[$f]];
|
||||||
|
} else {
|
||||||
|
echo 0;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<?=$total_td?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button type="button" id="export_button" class="btn btn-success btn-sm">ملف excel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$("#Select-date").change(function() {
|
||||||
|
var SelectedDate = $(this).val();
|
||||||
|
window.location = 'active_book_m?b=<?=$branch_id?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
function html_table_to_excel(type)
|
||||||
|
{
|
||||||
|
var data = document.getElementById('employee_data');
|
||||||
|
var file = XLSX.utils.table_to_book(data, {sheet: "sheet1"});
|
||||||
|
XLSX.write(file, { bookType: type, bookSST: true, type: 'base64' });
|
||||||
|
XLSX.writeFile(file, 'ايراد الفرع.' + type);
|
||||||
|
}
|
||||||
|
const export_button = document.getElementById('export_button');
|
||||||
|
export_button.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
583
active_physical_therapy.php
Normal file
583
active_physical_therapy.php
Normal file
@ -0,0 +1,583 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(77);
|
||||||
|
|
||||||
|
function check($id_number)
|
||||||
|
{
|
||||||
|
$id = trim($id_number);
|
||||||
|
if (!is_numeric($id))
|
||||||
|
return -1;
|
||||||
|
if (strlen($id) !== 10)
|
||||||
|
return -1;
|
||||||
|
$type = substr($id, 0, 1);
|
||||||
|
if ($type != 2 && $type != 1)
|
||||||
|
return -1;
|
||||||
|
$sum = 0;
|
||||||
|
for ($i = 0; $i < 10; $i++) {
|
||||||
|
if ($i % 2 == 0) {
|
||||||
|
$ZFOdd = str_pad((substr($id, $i, 1) * 2), 2, "0", STR_PAD_LEFT);
|
||||||
|
$sum += substr($ZFOdd, 0, 1) + substr($ZFOdd, 1, 1);
|
||||||
|
} else {
|
||||||
|
$sum += substr($id, $i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $sum % 10 ? -1 : $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
$booking_id = mysqli_real_escape_string($db, $_GET['booking_id']);
|
||||||
|
|
||||||
|
$get_invoices_sql = mysqli_query($db, "SELECT * FROM `invoices_has_book` WHERE `book_id`='$booking_id'");
|
||||||
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_physical_therapy';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`activation_id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`book_details`.`status_id`,
|
||||||
|
`book_details`.`day_date`,
|
||||||
|
`book`.`id` AS `book_id`,
|
||||||
|
`tretment`.`an_employee_offer_id`,
|
||||||
|
`tretment`.`name`,
|
||||||
|
`branch`.`id` AS `br_id`,
|
||||||
|
`an_employee_offer`.`id` AS `emp_id`,
|
||||||
|
`an_employee_offer`.`name` AS `emp_name`,
|
||||||
|
`book`.`tretment_id`,
|
||||||
|
`total_points`.`point`,
|
||||||
|
`tretment`.`id_number`,
|
||||||
|
`tretment`.`date_time`,
|
||||||
|
(SELECT `name` FROM `ranks` WHERE `total_points`.`point` BETWEEN `start` AND `end`) AS `rank`
|
||||||
|
|
||||||
|
FROM `book_details`
|
||||||
|
LEFT JOIN `services` ON `book_details`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `book` ON `book_details`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
LEFT JOIN `an_employee_offer` ON `tretment`.`an_employee_offer_id` = `an_employee_offer`.`id`
|
||||||
|
LEFT JOIN `commercial_register` ON `tretment`.`commercial_register_id` = `commercial_register`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `book_details`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
LEFT JOIN `total_points` ON `total_points`.`tretment_id` = `tretment`.`id`
|
||||||
|
|
||||||
|
WHERE `book_details`.`book_id` = $booking_id
|
||||||
|
AND `branch`.`commercial_register_id` = `tretment`.`commercial_register_id`
|
||||||
|
ORDER BY `book_details`.`id` DESC LIMIT 1"
|
||||||
|
);
|
||||||
|
$row_services = mysqli_fetch_assoc($get_services_sql);
|
||||||
|
|
||||||
|
$day_date = $row_services['day_date'];
|
||||||
|
$Next_day = date('Y-m-d', strtotime('+1 day', strtotime($day_date)));
|
||||||
|
$br_id = $row_services['br_id'];
|
||||||
|
$name = $row_services['name'];
|
||||||
|
$emp_id = $row_services['emp_id'];
|
||||||
|
$emp_name = $row_services['emp_name'];
|
||||||
|
$tretment_id = $row_services['tretment_id'];
|
||||||
|
$an_employee_offer_id = $row_services['an_employee_offer_id'];
|
||||||
|
$booking_id = $row_services['book_id'];
|
||||||
|
$tretment_date_time = $row_services['date_time'];
|
||||||
|
$tretment_points = $row_services['point'];
|
||||||
|
$tretment_id_number = $row_services['id_number'];
|
||||||
|
$tretment_rank = $row_services['rank'];
|
||||||
|
|
||||||
|
if ($row_services['status_id'] == 6 || $row_services['status_id'] == 8) {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_physical_therapy';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($row_services['activation_id'] == 1) {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_physical_therapy';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$price = $row_services['price'];
|
||||||
|
$price_vat = 0;
|
||||||
|
$has_vat = true;
|
||||||
|
|
||||||
|
if(check($tretment_id_number) == 1) {
|
||||||
|
$price_vat = 0;
|
||||||
|
$has_vat = false;
|
||||||
|
} else {
|
||||||
|
if (!empty($vat)) {
|
||||||
|
$price_vat = ($price * $vat) / 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$show_price = $price + $price_vat;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check,
|
||||||
|
.custom-control {
|
||||||
|
padding-right: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: 1px solid rgb(0 0 0 / 40%) !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 1rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-primary-custom input[type="radio"]+label::before {
|
||||||
|
border-color: #ff0000 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center"
|
||||||
|
style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">العميل</th>
|
||||||
|
<td style="background-color: #fff;" scope="col">
|
||||||
|
<?= $name ?>
|
||||||
|
</td>
|
||||||
|
<th scope="col">جهه العمل</th>
|
||||||
|
<td style="background-color: #fff;" scope="col">
|
||||||
|
<?= $emp_name ?>
|
||||||
|
</td>
|
||||||
|
<th scope="col">العضوية</th>
|
||||||
|
<td style="background-color: #fff;" scope="col">
|
||||||
|
<?= $tretment_rank ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th colspan="2" scope="col">الخدمات</th>
|
||||||
|
<th scope="col">الفرع</th>
|
||||||
|
<th scope="col">السعر</th>
|
||||||
|
<th scope="col">اجراءات</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$get_book_details_sql = mysqli_query($db, "SELECT
|
||||||
|
`book`.`id` AS `book_id`,
|
||||||
|
`dd`.`id` AS `bd_id`,
|
||||||
|
`dd`.`day_time`,
|
||||||
|
`dd`.`day_date`,
|
||||||
|
`branch`.`branch_name`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`,
|
||||||
|
`services`.`price`
|
||||||
|
|
||||||
|
FROM `book_details` AS `dd`
|
||||||
|
LEFT JOIN `book` ON `dd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
LEFT JOIN `services` ON `dd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `branch` ON `dd`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `tretment`.`id` = $tretment_id
|
||||||
|
AND `services`.`activation_id` = 2
|
||||||
|
AND `dd`.`status_id` IN (4)
|
||||||
|
AND ((`dd`.`day_date` = '$day_date') OR (`dd`.`day_date` = '$Next_day' AND `dd`.`day_time` = '00:00:00'))
|
||||||
|
AND `dd`.`id` IN (
|
||||||
|
SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `dd`.`book_id`)
|
||||||
|
ORDER BY `dd`.`day_time`"
|
||||||
|
);
|
||||||
|
|
||||||
|
$count = 1;
|
||||||
|
$total = 0;
|
||||||
|
$total_w_vat = 0;
|
||||||
|
$services_ids = array();
|
||||||
|
if (mysqli_num_rows($get_book_details_sql) > 0) {
|
||||||
|
while ($row_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$price_temp = 0;
|
||||||
|
if ($row_book_details['id'] == 0) {
|
||||||
|
$bd_id = $row_book_details['book_id'];
|
||||||
|
$get_bundle_services_sql = mysqli_query($db, "SELECT `bundle_services_id` FROM `book_details_has_bundle_services` WHERE `book_details_id` IN (SELECT
|
||||||
|
MIN(`dd`.`id`)
|
||||||
|
FROM `book_details` AS `dd`
|
||||||
|
WHERE `dd`.`book_id` = $bd_id AND `dd`.`status_id` = 4) LIMIT 1");
|
||||||
|
if (mysqli_num_rows($get_bundle_services_sql) > 0) {
|
||||||
|
$row_bundle_services = mysqli_fetch_assoc($get_bundle_services_sql);
|
||||||
|
$bundle_services_id = $row_bundle_services['bundle_services_id'];
|
||||||
|
$get_bundle_services_has_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`bundle_services_has_services`.`how_many`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`,
|
||||||
|
`services`.`price`
|
||||||
|
|
||||||
|
FROM `bundle_services_has_services`
|
||||||
|
LEFT JOIN `services` ON `services`.`id` = `bundle_services_has_services`.`services_id`
|
||||||
|
|
||||||
|
WHERE `bundle_services_has_services`.`bundle_services_id` = $bundle_services_id
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_bundle_services_has_services_sql) > 0) {
|
||||||
|
while ($row_bundle_services_has_services = mysqli_fetch_assoc($get_bundle_services_has_services_sql)) {
|
||||||
|
for ($i = 0; $i < $row_bundle_services_has_services['how_many']; $i++) {
|
||||||
|
array_push($services_ids,
|
||||||
|
array(
|
||||||
|
'book_id' => $row_book_details['book_id'],
|
||||||
|
'book_time' => $row_book_details['day_time'],
|
||||||
|
'book_day' => $row_book_details['day_date'],
|
||||||
|
'id' => $row_bundle_services_has_services['id'],
|
||||||
|
'name' => $row_bundle_services_has_services['name'],
|
||||||
|
'price' => $row_bundle_services_has_services['price'],
|
||||||
|
'price_v' => round($row_bundle_services_has_services['price'] + ($row_bundle_services_has_services['price'] * $vat) / 100, 2)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$price_temp += $row_bundle_services_has_services['price'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "
|
||||||
|
<script>
|
||||||
|
swalfun('LT115-7','','error');
|
||||||
|
click = 0;
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "
|
||||||
|
<script>
|
||||||
|
swalfun('LT245-7','','error');
|
||||||
|
click = 0;
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
array_push($services_ids,
|
||||||
|
array(
|
||||||
|
'book_id' => $row_book_details['book_id'],
|
||||||
|
'book_time' => $row_book_details['day_time'],
|
||||||
|
'book_day' => $row_book_details['day_date'],
|
||||||
|
'id' => $row_book_details['id'],
|
||||||
|
'name' => $row_book_details['name'],
|
||||||
|
'price' => $row_book_details['price'],
|
||||||
|
'price_v' => round($row_book_details['price'] + ($row_book_details['price'] * $vat) / 100, 2)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$price_temp += $row_book_details['price'];
|
||||||
|
}
|
||||||
|
if(check($tretment_id_number) == 1) {
|
||||||
|
$price_temp = $price_temp;
|
||||||
|
} else {
|
||||||
|
if (!empty($vat)) {
|
||||||
|
$price_temp = round($price_temp + ($price_temp * $vat) / 100, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td scope="row">
|
||||||
|
<?= $count ?>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">
|
||||||
|
<?= $row_book_details['name'] ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $row_book_details['branch_name'] ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $price_temp ?>
|
||||||
|
</td>
|
||||||
|
<td><a class="btn btn-square btn-danger"
|
||||||
|
href="work/order/php/cancel?booking_id=<?= $row_book_details['book_id'] ?>&loc=1&lo=book">الغاء</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$count++;
|
||||||
|
$total += $row_book_details['price'];
|
||||||
|
$total_w_vat += $price_temp;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_physical_therapy'
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
//collect data
|
||||||
|
$data['has_vat'] = $has_vat;
|
||||||
|
$data['serv'] = $services_ids;
|
||||||
|
$data['total'] = $total;
|
||||||
|
//collect data end
|
||||||
|
|
||||||
|
$show_price = $total_w_vat;
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th colspan="4" scope="col">المجموع</th>
|
||||||
|
<th style="background-color: #fff;" scope="col">
|
||||||
|
<?= $total_w_vat ?>
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id='current_price' style="color:red">
|
||||||
|
<?= round($show_price, 2) ?>
|
||||||
|
</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="show_price_change" class="col-form-label text-right">المبلغ
|
||||||
|
المستحق</label>
|
||||||
|
<input id="show_price_change" class="form-control clickfun" type="number"
|
||||||
|
step="any" value="<?= round($show_price, 2) ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="resone_change" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<input id="resone_change" class="form-control clickfun" type="text"
|
||||||
|
value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);"
|
||||||
|
class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any"
|
||||||
|
value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control"
|
||||||
|
type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);"
|
||||||
|
class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any"
|
||||||
|
value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type"
|
||||||
|
data-parsley-multiple="groups" data-parsley-mincheck="2"
|
||||||
|
value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type"
|
||||||
|
data-parsley-multiple="groups" data-parsley-mincheck="2"
|
||||||
|
value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type"
|
||||||
|
data-parsley-multiple="groups" data-parsley-mincheck="2"
|
||||||
|
value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر
|
||||||
|
كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);"
|
||||||
|
class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number"
|
||||||
|
value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);"
|
||||||
|
class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control"
|
||||||
|
type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="pay-action" class="form-control"
|
||||||
|
style="background-color: #086367; color:white; text-align:center; cursor: pointer;">
|
||||||
|
سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='get_data'></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
let data = <?= json_encode($data); ?>;
|
||||||
|
|
||||||
|
$("[name='cash_pay']").keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
pay1()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("[name='card_pay']").keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
pay1()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(function () {
|
||||||
|
$("#pay-action").click(function () {
|
||||||
|
pay1();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let click = 0;
|
||||||
|
|
||||||
|
let curr_price = parseFloat($('#current_price').html());
|
||||||
|
|
||||||
|
function pay1() {
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let show_price_change = parseFloat($("#show_price_change").val());
|
||||||
|
let total_temp = curr_price;
|
||||||
|
let total_discount = 0;
|
||||||
|
let total_add = 0;
|
||||||
|
let reason_for_change = $("#resone_change").val()
|
||||||
|
|
||||||
|
if (show_price_change != total_temp) {
|
||||||
|
if (show_price_change > total_temp) {
|
||||||
|
total_add = show_price_change - total_temp;
|
||||||
|
} else {
|
||||||
|
total_discount = total_temp - show_price_change;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reason_for_change == "") {
|
||||||
|
swalfun('يرجى التحقق', 'سبب التعديل فارغ', 'info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cash_pay < 0 || card_pay < 0) {
|
||||||
|
swalfun("يرجى التحقق", "لا يمكن ان يكون المبلغ المدخل بالسالب", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (show_price_change != (cash_pay + card_pay)) {
|
||||||
|
swalfun('يرجى التحقق', 'مدخلات الدفع غير مطابقه المبلغ المستحق', 'info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'has_vat': data['has_vat'],
|
||||||
|
'serv': <?= json_encode($services_ids) ?>,
|
||||||
|
'total': total_temp,
|
||||||
|
'total_discount': total_discount,
|
||||||
|
'total_add': total_add,
|
||||||
|
'reason': reason_for_change,
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_serv = data['serv'];
|
||||||
|
|
||||||
|
let tretment_id = <?= json_encode($tretment_id); ?>;
|
||||||
|
let br_id = <?= json_encode($br_id); ?>;
|
||||||
|
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
//for more action
|
||||||
|
let day_date = <?= json_encode($day_date); ?>;
|
||||||
|
click = 0
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/active_physical_therapy_ajax.php", {
|
||||||
|
data,
|
||||||
|
tretment_id,
|
||||||
|
br_id,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
|
||||||
|
// for more actions
|
||||||
|
day_date
|
||||||
|
}, function (get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
875
active_visits.php
Normal file
875
active_visits.php
Normal file
@ -0,0 +1,875 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(64); //
|
||||||
|
|
||||||
|
$booking_id = mysqli_real_escape_string($db, $_GET['booking_id']);
|
||||||
|
|
||||||
|
$get_invoices_sql = mysqli_query($db, "SELECT * FROM `invoices_has_book` WHERE `book_id`='$booking_id'");
|
||||||
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_visits';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`activation_id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`book_details`.`status_id`,
|
||||||
|
`book_details`.`day_date`,
|
||||||
|
`book`.`id` AS `book_id`,
|
||||||
|
`tretment`.`an_employee_offer_id`,
|
||||||
|
`tretment`.`name`,
|
||||||
|
`branch`.`id` AS `br_id`,
|
||||||
|
`an_employee_offer`.`id` AS `emp_id`,
|
||||||
|
`an_employee_offer`.`name` AS `emp_name`,
|
||||||
|
`book`.`tretment_id`,
|
||||||
|
`total_points`.`point`,
|
||||||
|
`tretment`.`date_time`,
|
||||||
|
(SELECT `name` FROM `ranks` WHERE `total_points`.`point` BETWEEN `start` AND `end`) AS `rank`
|
||||||
|
|
||||||
|
FROM `book_details`
|
||||||
|
LEFT JOIN `services` ON `book_details`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `book` ON `book_details`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
LEFT JOIN `an_employee_offer` ON `tretment`.`an_employee_offer_id` = `an_employee_offer`.`id`
|
||||||
|
LEFT JOIN `commercial_register` ON `tretment`.`commercial_register_id` = `commercial_register`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `book_details`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
LEFT JOIN `total_points` ON `total_points`.`tretment_id` = `tretment`.`id`
|
||||||
|
|
||||||
|
WHERE `book_details`.`book_id` = $booking_id
|
||||||
|
AND `branch`.`commercial_register_id` = `tretment`.`commercial_register_id`
|
||||||
|
ORDER BY `book_details`.`id` DESC LIMIT 1"
|
||||||
|
);
|
||||||
|
$row_services = mysqli_fetch_assoc($get_services_sql);
|
||||||
|
|
||||||
|
$day_date = $row_services['day_date'];
|
||||||
|
$Next_day = date('Y-m-d', strtotime('+1 day', strtotime($day_date)));
|
||||||
|
$br_id = $row_services['br_id'];
|
||||||
|
$name = $row_services['name'];
|
||||||
|
$emp_id = $row_services['emp_id'];
|
||||||
|
$emp_name = $row_services['emp_name'];
|
||||||
|
$tretment_id = $row_services['tretment_id'];
|
||||||
|
$an_employee_offer_id = $row_services['an_employee_offer_id'];
|
||||||
|
$booking_id = $row_services['book_id'];
|
||||||
|
$tretment_date_time = $row_services['date_time'];
|
||||||
|
$tretment_points = $row_services['point'];
|
||||||
|
$tretment_rank = $row_services['rank'];
|
||||||
|
|
||||||
|
if ($row_services['status_id'] == 12) {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_visits';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($row_services['activation_id'] == 1) {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_visits';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
$price = $row_services['price'];
|
||||||
|
$price_vat = 0;
|
||||||
|
|
||||||
|
if (!empty($vat)) {
|
||||||
|
$price_vat = ($price*$vat)/100;
|
||||||
|
}
|
||||||
|
|
||||||
|
$show_price = $price + $price_vat;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-check, .custom-control {
|
||||||
|
padding-right:0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-top: 1px solid rgb(0 0 0 / 40%) !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 1rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-primary-custom input[type="radio"] + label::before {
|
||||||
|
border-color: #ff0000 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">العميل</th>
|
||||||
|
<td style ="background-color: #fff;" scope="col"><?= $name ?></td>
|
||||||
|
<th scope="col">جهه العمل</th>
|
||||||
|
<td style ="background-color: #fff;" scope="col"><?= $emp_name ?></td>
|
||||||
|
<th scope="col">العضوية</th>
|
||||||
|
<td style ="background-color: #fff;" scope="col"><?= $tretment_rank ?></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th colspan="2" scope="col">الخدمات</th>
|
||||||
|
<th scope="col">الفرع</th>
|
||||||
|
<th scope="col">السعر</th>
|
||||||
|
<th scope="col">اجراءات</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$get_book_details_sql = mysqli_query($db, "SELECT
|
||||||
|
`book`.`id` AS `book_id`,
|
||||||
|
`dd`.`id` AS `bd_id`,
|
||||||
|
`dd`.`day_time`,
|
||||||
|
`dd`.`day_date`,
|
||||||
|
`branch`.`branch_name`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`,
|
||||||
|
`services`.`price`
|
||||||
|
|
||||||
|
FROM `book_details` AS `dd`
|
||||||
|
LEFT JOIN `book` ON `dd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
LEFT JOIN `services` ON `dd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `branch` ON `dd`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `tretment`.`id` = $tretment_id
|
||||||
|
AND `services`.`activation_id` = 2
|
||||||
|
AND `dd`.`status_id` IN (10)
|
||||||
|
AND ((`dd`.`day_date` = '$day_date') OR (`dd`.`day_date` = '$Next_day' AND `dd`.`day_time` = '00:00:00'))
|
||||||
|
AND `dd`.`id` IN (
|
||||||
|
SELECT MAX(`book_details`.`id`)
|
||||||
|
FROM `book_details`
|
||||||
|
WHERE `book_details`.`book_id` = `dd`.`book_id`)
|
||||||
|
ORDER BY `dd`.`day_time`"
|
||||||
|
);
|
||||||
|
|
||||||
|
$count = 1;
|
||||||
|
$total = 0;
|
||||||
|
$total_w_vat = 0;
|
||||||
|
$services_ids = array();
|
||||||
|
if (mysqli_num_rows($get_book_details_sql) > 0) {
|
||||||
|
while ($row_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
$price_temp = 0;
|
||||||
|
if ($row_book_details['id'] == 0) {
|
||||||
|
$bd_id = $row_book_details['book_id'];
|
||||||
|
$get_bundle_services_sql = mysqli_query($db, "SELECT `bundle_services_id` FROM `book_details_has_bundle_services` WHERE `book_details_id` IN (SELECT
|
||||||
|
MIN(`dd`.`id`)
|
||||||
|
FROM `book_details` AS `dd`
|
||||||
|
WHERE `dd`.`book_id` = $bd_id AND `dd`.`status_id` = 4) LIMIT 1");
|
||||||
|
if (mysqli_num_rows($get_bundle_services_sql) > 0) {
|
||||||
|
$row_bundle_services = mysqli_fetch_assoc($get_bundle_services_sql);
|
||||||
|
$bundle_services_id = $row_bundle_services['bundle_services_id'];
|
||||||
|
$get_bundle_services_has_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`bundle_services_has_services`.`how_many`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`,
|
||||||
|
`services`.`price`
|
||||||
|
|
||||||
|
FROM `bundle_services_has_services`
|
||||||
|
LEFT JOIN `services` ON `services`.`id` = `bundle_services_has_services`.`services_id`
|
||||||
|
|
||||||
|
WHERE `bundle_services_has_services`.`bundle_services_id` = $bundle_services_id
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_bundle_services_has_services_sql) > 0) {
|
||||||
|
while ($row_bundle_services_has_services = mysqli_fetch_assoc($get_bundle_services_has_services_sql)) {
|
||||||
|
for ($i=0; $i < $row_bundle_services_has_services['how_many']; $i++) {
|
||||||
|
array_push($services_ids,
|
||||||
|
array(
|
||||||
|
'book_id' => $row_book_details['book_id'],
|
||||||
|
'book_time' => $row_book_details['day_time'],
|
||||||
|
'book_day' => $row_book_details['day_date'],
|
||||||
|
'id' => $row_bundle_services_has_services['id'],
|
||||||
|
'name' => $row_bundle_services_has_services['name'],
|
||||||
|
'price' => $row_bundle_services_has_services['price'],
|
||||||
|
'price_v' => round($row_bundle_services_has_services['price'] + ($row_bundle_services_has_services['price']*$vat)/100, 2)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$price_temp += $row_bundle_services_has_services['price'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo"
|
||||||
|
<script>
|
||||||
|
swalfun('LT115-7','','error');
|
||||||
|
click = 0;
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo"
|
||||||
|
<script>
|
||||||
|
swalfun('LT245-7','','error');
|
||||||
|
click = 0;
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
array_push($services_ids,
|
||||||
|
array(
|
||||||
|
'book_id' => $row_book_details['book_id'],
|
||||||
|
'book_time' => $row_book_details['day_time'],
|
||||||
|
'book_day' => $row_book_details['day_date'],
|
||||||
|
'id' => $row_book_details['id'],
|
||||||
|
'name' => $row_book_details['name'],
|
||||||
|
'price' => $row_book_details['price'],
|
||||||
|
'price_v' => round($row_book_details['price'] + ($row_book_details['price']*$vat)/100, 2)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$price_temp += $row_book_details['price'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($vat)) {
|
||||||
|
$price_temp = round($price_temp + ($price_temp*$vat)/100, 2);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td scope="row"><?=$count?></td>
|
||||||
|
<td colspan="2"><?=$row_book_details['name']?></td>
|
||||||
|
<td><?=$row_book_details['branch_name']?></td>
|
||||||
|
<td><?=$price_temp?></td>
|
||||||
|
<td><a class="btn btn-square btn-danger" href="work/order/php/cancel?booking_id=<?=$row_book_details['book_id']?>&loc=1&lo=book">الغاء</a></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$count++;
|
||||||
|
$total += $row_book_details['price'];
|
||||||
|
$total_w_vat += $price_temp;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'book_visits'
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
//collect data
|
||||||
|
$data['serv'] = $services_ids;
|
||||||
|
$data['total'] = $total;
|
||||||
|
//collect data end
|
||||||
|
|
||||||
|
$show_price = $total_w_vat;
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th colspan="4" scope="col">المجموع</th>
|
||||||
|
<th style ="background-color: #fff;" scope="col"><?=$total_w_vat?></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" scope="col">رصيد الخدمات</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
$get_tretment_has_service_sql = mysqli_query($db,
|
||||||
|
"SELECT `services`.`id`, `services`.`name`, COUNT(`tretment_has_service`.`id`) AS `how_many`
|
||||||
|
FROM `tretment_has_service`
|
||||||
|
LEFT JOIN `services` ON `tretment_has_service`.`services_id` = `services`.`id`
|
||||||
|
|
||||||
|
WHERE `tretment_has_service`.`tretment_id` = $tretment_id
|
||||||
|
AND `tretment_has_service`.`done_id` = 1
|
||||||
|
AND `tretment_has_service`.`activation_id` = 2
|
||||||
|
|
||||||
|
GROUP BY `services`.`id`"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_tretment_has_service_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">الخدمة</th>
|
||||||
|
<th scope="col">العدد</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
while ($row_tretment_has_service = mysqli_fetch_assoc($get_tretment_has_service_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$row_tretment_has_service['name']?></th>
|
||||||
|
<th scope="row"><?=$row_tretment_has_service['how_many']?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" scope="row">غير متوفر</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-2 col-lg-2 col-xl-2">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col" colspan="2">رصيد اموال</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
$get_v_tretment_money_sql = mysqli_query($db,
|
||||||
|
"SELECT `money` FROM `tretment_money` WHERE `tretment_id` = $tretment_id"
|
||||||
|
);
|
||||||
|
$static_money_stuck = 0;
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_v_tretment_money_sql) > 0) {
|
||||||
|
$row_v_tretment_money = mysqli_fetch_assoc($get_v_tretment_money_sql);
|
||||||
|
$static_money_stuck = $row_v_tretment_money['money'];
|
||||||
|
?>
|
||||||
|
<th scope="col">مدفوع</th>
|
||||||
|
<th scope="col"><?=$row_v_tretment_money['money']?> ريال</th>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<th scope="col">مدفوع</th>
|
||||||
|
<th scope="col">0 ريال</th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
$get_v_tretment_money_sql = mysqli_query($db,
|
||||||
|
"SELECT `money` FROM `tretment_free_money` WHERE `tretment_id` = $tretment_id"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_v_tretment_money_sql) > 0) {
|
||||||
|
$row_v_tretment_money = mysqli_fetch_assoc($get_v_tretment_money_sql)
|
||||||
|
?>
|
||||||
|
<th scope="col">مجاني</th>
|
||||||
|
<th scope="col"><?=$row_v_tretment_money['money']?> ريال</th>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<th scope="col">مجاني</th>
|
||||||
|
<th scope="col">0 ريال</th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-2 col-lg-2 col-xl-2">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">رصيد نقاط</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">0 نقطة</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-2 col-lg-2 col-xl-2">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" scope="col">عرض مره وحدة</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
if (false) {
|
||||||
|
?>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">الخدمة</th>
|
||||||
|
<th scope="col">العدد</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">#</th>
|
||||||
|
<th scope="row">#</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" scope="row">غير متوفر</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" scope="col">خدمات مجانية</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
$get_tretment_has_free_service_sql = mysqli_query($db,
|
||||||
|
"SELECT `services`.`id`, `services`.`name`, COUNT(`tretment_has_free_service`.`id`) AS `how_many`
|
||||||
|
FROM `tretment_has_free_service`
|
||||||
|
LEFT JOIN `services` ON `tretment_has_free_service`.`services_id` = `services`.`id`
|
||||||
|
|
||||||
|
WHERE `tretment_has_free_service`.`tretment_id` = $tretment_id
|
||||||
|
AND `tretment_has_free_service`.`done_id` = 1
|
||||||
|
AND `tretment_has_free_service`.`activation_id` = 2
|
||||||
|
|
||||||
|
GROUP BY `services`.`id`"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_tretment_has_free_service_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">الخدمة</th>
|
||||||
|
<th scope="col">العدد</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
while ($row_tretment_has_free_service = mysqli_fetch_assoc($get_tretment_has_free_service_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$row_tretment_has_free_service['name']?></th>
|
||||||
|
<th scope="row"><?=$row_tretment_has_free_service['how_many']?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2" scope="row">غير متوفر</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id='current_price' style="color:red"> <?= round($show_price, 2) ?> </span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="show_price_change" class="col-form-label text-right">المبلغ المستحق</label>
|
||||||
|
<input id="show_price_change" class="form-control clickfun" type="number" step="any" value="<?= round($show_price, 2) ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="resone_change" class="col-form-label text-right">سبب التعديل</label>
|
||||||
|
<input id="resone_change" class="form-control clickfun" type="text" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" id="pills-tab" role="tablist">
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="w-serv-tab" data-bs-toggle="pill" href="#w-serv" role="tab" aria-controls="w-serv" aria-selected="true">
|
||||||
|
رصيد الخدمات
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="w-money-tab" data-bs-toggle="pill" href="#w-money" role="tab" aria-controls="w-money" aria-selected="false">
|
||||||
|
رصيد اموال
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="w-points-tab" data-bs-toggle="pill" href="#w-points" role="tab" aria-controls="w-points" aria-selected="false">
|
||||||
|
رصيد نقاط
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="w-free-tab" data-bs-toggle="pill" href="#w-free" role="tab" aria-controls="w-free" aria-selected="false">
|
||||||
|
خدمات مجانية
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<div class="tab-pane fade" id="w-serv" role="tabpanel" aria-labelledby="w-serv-tab">
|
||||||
|
<p class="mb-0 m-t-30">
|
||||||
|
1
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="w-money" role="tabpanel" aria-labelledby="w-money-tab">
|
||||||
|
<div class="row theme-form mt-3">
|
||||||
|
<div class="col-xxl-6 mb-3 d-flex">
|
||||||
|
<label class="col-form-label pe-2" for="money_stuck" style="white-space: nowrap;">المبلغ المدفوع</label>
|
||||||
|
<input class="form-control" id="money_stuck" type="number" name="money_stuck" placeholder="المبلغ" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-xxl-4 mb-3 d-flex">
|
||||||
|
<button class="btn btn-primary">احسب</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row theme-form mt-3">
|
||||||
|
<div class="col-xxl-6 mb-3 d-flex">
|
||||||
|
<label class="col-form-label pe-2" for="free_money_stuck" style="white-space: nowrap;">المبلغ المجاني</label>
|
||||||
|
<input class="form-control" id="free_money_stuck" type="number" name="free_money_stuck" placeholder="المبلغ" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-xxl-4 mb-3 d-flex">
|
||||||
|
<button class="btn btn-primary">احسب</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="w-points" role="tabpanel" aria-labelledby="w-points-tab">
|
||||||
|
<p class="mb-0 m-t-30">
|
||||||
|
3
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="w-free" role="tabpanel" aria-labelledby="w-free-tab">
|
||||||
|
<p class="mb-0 m-t-30">
|
||||||
|
4
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0); border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
تحويل
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="trans_pay" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input id="trans_pay" name="trans_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="trans_type" class="col-form-label text-right">الى حساب</label>
|
||||||
|
<select id="trans_type" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="0">المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$trans_to_sql = mysqli_query($db, "SELECT `id`, `name` FROM `how_pay` WHERE `id` IN (6,7,8,9)
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($trans_to_sql) > 0) {
|
||||||
|
while ($trans_to = mysqli_fetch_assoc($trans_to_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$trans_to['id']?>"><?=$trans_to['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="trans_date" class="col-form-label text-right">تاريخ التحويل</label>
|
||||||
|
<input id="trans_date" name="trans_date" class="form-control" type="date" style="text-align: center;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="trans_note" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea id="trans_note" rows="6" name="trans_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="pay-action" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id='get_data'></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
let data = <?=json_encode($data);?>;
|
||||||
|
let money_stuck = 0;
|
||||||
|
let static_money_stuck = parseFloat(<?=json_encode($static_money_stuck)?>);
|
||||||
|
|
||||||
|
$("[name='cash_pay']").keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
pay1()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("[name='card_pay']").keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
pay1()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(function() {
|
||||||
|
$("#pay-action").click(function() {
|
||||||
|
pay1();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let click = 0;
|
||||||
|
|
||||||
|
let curr_price = parseFloat($('#current_price').html());
|
||||||
|
|
||||||
|
function money_stuck_value() {
|
||||||
|
money_stuck = $("#money_stuck").val();
|
||||||
|
if(money_stuck > static_money_stuck) {
|
||||||
|
swalfun("يرجى التحقق", "لا يمكن ان يكون المبلغ المدخل اكبر من رصيد العميل", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
curr_price = (Math.round((curr_price - money_stuck) * 100) / 100);
|
||||||
|
if(curr_price < 0){
|
||||||
|
swalfun("يرجى التحقق", "لا يمكن ان يكون المبلغ المستحق اقل من 0", "warning");
|
||||||
|
curr_price = parseFloat($('#current_price').html());
|
||||||
|
}
|
||||||
|
$('#current_price').html(curr_price)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#money_stuck').change(function() {
|
||||||
|
money_stuck_value()
|
||||||
|
})
|
||||||
|
|
||||||
|
function pay1() {
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let trans_pay = parseFloat($("[name='trans_pay']").val());
|
||||||
|
let show_price_change = parseFloat($("#show_price_change").val());
|
||||||
|
let total_temp = curr_price;
|
||||||
|
let total_discount = 0;
|
||||||
|
let total_add = 0;
|
||||||
|
let reason_for_change = $("#resone_change").val()
|
||||||
|
|
||||||
|
let money_stuck = parseFloat($("#money_stuck").val());
|
||||||
|
if(money_stuck > static_money_stuck) {
|
||||||
|
swalfun("يرجى التحقق", "لا يمكن ان يكون المبلغ المدخل اكبر من رصيد العميل", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(money_stuck <= 0 || money_stuck == undefined) {
|
||||||
|
money_stuck = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (show_price_change != total_temp) {
|
||||||
|
if (show_price_change > total_temp) {
|
||||||
|
total_add = show_price_change - total_temp;
|
||||||
|
} else {
|
||||||
|
total_discount = total_temp - show_price_change;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reason_for_change == "") {
|
||||||
|
swalfun('يرجى التحقق','سبب التعديل فارغ','info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cash_pay < 0 || card_pay < 0 || trans_pay < 0) {
|
||||||
|
swalfun("يرجى التحقق", "لا يمكن ان يكون المبلغ المدخل بالسالب", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (show_price_change != (cash_pay + card_pay + trans_pay + money_stuck)) {
|
||||||
|
swalfun('يرجى التحقق','مدخلات الدفع غير مطابقه المبلغ المستحق','info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'serv':<?=json_encode($services_ids)?>,
|
||||||
|
'total': total_temp,
|
||||||
|
'total_discount': total_discount,
|
||||||
|
'total_add': total_add,
|
||||||
|
'reason': reason_for_change,
|
||||||
|
'money_stuck': money_stuck,
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_serv = data['serv'];
|
||||||
|
|
||||||
|
let tretment_id = <?=json_encode($tretment_id);?>;
|
||||||
|
let br_id = <?=json_encode($br_id);?>;
|
||||||
|
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
let trans_type = $('#trans_type').find(":selected").val();
|
||||||
|
let trans_date = $("[name='trans_date']").val();
|
||||||
|
let trans_note = $("[name='trans_note']").val();
|
||||||
|
|
||||||
|
if(trans_pay > 0) {
|
||||||
|
if(trans_type == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد الحساب المحول له', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (trans_date == '' || trans_date == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار تاريخ التحويل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
trans_note += ' تاريخ التحويل ' + trans_date
|
||||||
|
}
|
||||||
|
|
||||||
|
//for more action
|
||||||
|
let day_date = <?=json_encode($day_date);?>;
|
||||||
|
click = 0
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/active_visits_ajax.php", {
|
||||||
|
data,
|
||||||
|
tretment_id,
|
||||||
|
br_id,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
money_stuck,
|
||||||
|
trans_pay,
|
||||||
|
trans_type,
|
||||||
|
trans_date,
|
||||||
|
trans_note,
|
||||||
|
|
||||||
|
// for more actions
|
||||||
|
day_date
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
335
add_emp_offer.php
Normal file
335
add_emp_offer.php
Normal file
@ -0,0 +1,335 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(29);
|
||||||
|
|
||||||
|
$Select2 = true;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<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">
|
||||||
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
<h4 class="mt-0 header-title">معلومات العرض</h4>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="an_emp_name" class="col-form-label text-right">اسم جهه العمل</label>
|
||||||
|
<input id="an_emp_name" class="form-control clickfun" type="text" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="an_emp_type" class="col-form-label text-right">نوع الخصم</label>
|
||||||
|
<select id="an_emp_type" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_an_employee_offer_sql = mysqli_query($db, "SELECT `id`, `name` FROM `type_discount` WHERE `activation_id` = 2");
|
||||||
|
while ($get_an_employee_offer = mysqli_fetch_assoc($get_an_employee_offer_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_an_employee_offer['id']?>" data-upload="<?=$get_an_employee_offer['upload_image_id']?>" ><?=$get_an_employee_offer['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="an_emp_number" class="col-form-label text-right">مبلغ الخصم / نسبة الخصم</label>
|
||||||
|
<input id="an_emp_number" class="form-control clickfun" type="number" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="an_emp_upload" class="col-form-label text-right">هل يجب رفع صوره ؟</label>
|
||||||
|
<select id="an_emp_upload" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_an_employee_offer_sql = mysqli_query($db, "SELECT `id`, `name` FROM `upload_image` WHERE `activation_id` = 2");
|
||||||
|
while ($get_an_employee_offer = mysqli_fetch_assoc($get_an_employee_offer_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_an_employee_offer['id']?>" data-upload="<?=$get_an_employee_offer['upload_image_id']?>" ><?=$get_an_employee_offer['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="an_emp_enters" class="col-form-label text-right">هل يدخل الخصم مع خصوم اخرى ؟</label>
|
||||||
|
<select id="an_emp_enters" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_how_to_hear_sql = mysqli_query($db, "SELECT `id`,`name`FROM `does_discount_enters` WHERE `activation_id` = 2");
|
||||||
|
while ($get_how_to_hear = mysqli_fetch_assoc($get_how_to_hear_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_how_to_hear['id']?>"><?=$get_how_to_hear['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="offer_does_have_dayoff" class="col-form-label text-right">هل يوجد له ايام محددة ؟</label>
|
||||||
|
<select id="offer_does_have_dayoff" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_how_to_hear_sql = mysqli_query($db, "SELECT `id`,`name`FROM `offer_does_have_dayoff` WHERE `activation_id` = 2");
|
||||||
|
while ($get_how_to_hear = mysqli_fetch_assoc($get_how_to_hear_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_how_to_hear['id']?>"><?=$get_how_to_hear['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="offer_does_have_spical_time" class="col-form-label text-right">هل يوجد له وقت محدد ؟</label>
|
||||||
|
<select id="offer_does_have_spical_time" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_how_to_hear_sql = mysqli_query($db, "SELECT `id`,`name`FROM `offer_does_have_spical_time` WHERE `activation_id` = 2");
|
||||||
|
while ($get_how_to_hear = mysqli_fetch_assoc($get_how_to_hear_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_how_to_hear['id']?>"><?=$get_how_to_hear['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6 col-sm-6" style="display:none; visibility: hidden;">
|
||||||
|
<label for="days" class="col-form-label text-right">يرجى تحديد الايام</label>
|
||||||
|
<select id="days" class="select2 mb-3 select2-multiple" style="width: 100%;" multiple="multiple" data-placeholder="اضافة الايام">
|
||||||
|
<?php
|
||||||
|
$get_days_sql = mysqli_query($db, "SELECT `id`, `name` FROM `days` WHERE `activation_id` = 2 AND `id` > 1"
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<optgroup label="ايام لااسبوع">
|
||||||
|
<?php
|
||||||
|
while ($days_row = mysqli_fetch_assoc($get_days_sql)) {
|
||||||
|
|
||||||
|
?>
|
||||||
|
<option value="<?=$days_row['id']?>"><?=$days_row['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</optgroup>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6 col-sm-6" style="display:none; visibility: hidden;">
|
||||||
|
<label for="days" class="col-form-label text-right">يرجى تحديد الاوقات</label>
|
||||||
|
<select id="days" class="select2 mb-3 select2-multiple" style="width: 100%;" multiple="multiple" data-placeholder="اضافة الاوقات">
|
||||||
|
<?php
|
||||||
|
$get_days_sql = mysqli_query($db, "SELECT `id`, `time` FROM `times` WHERE `activation_id` = 2"
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<optgroup label="اوقات اليوم">
|
||||||
|
<?php
|
||||||
|
while ($days_row = mysqli_fetch_assoc($get_days_sql)) {
|
||||||
|
|
||||||
|
?>
|
||||||
|
<option value="<?=$days_row['id']?>"><?=$days_row['time']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</optgroup>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="emp_offer" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" class="form-control">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<thead class="table-primary">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th scope="col">اسم الجهه</th>
|
||||||
|
<th scope="col">نوع الخصم</th>
|
||||||
|
<th scope="col">مبلغ / نسبة الخصم</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$count = 1;
|
||||||
|
$get_an_employee_offer_sql = mysqli_query($db, "SELECT
|
||||||
|
`an_employee_offer`.`name`, `an_employee_offer`.`discount`,`type_discount`.`name` AS `t_name`
|
||||||
|
FROM `an_employee_offer`
|
||||||
|
LEFT JOIN `type_discount` ON `an_employee_offer`.`type_discount_id` = `type_discount`.`id`
|
||||||
|
|
||||||
|
WHERE `an_employee_offer`.`activation_id` = 2 AND `an_employee_offer`.`id` > 1");
|
||||||
|
while ($get_an_employee_offer = mysqli_fetch_assoc($get_an_employee_offer_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$count?></th>
|
||||||
|
<td><?=$get_an_employee_offer['name']?></td>
|
||||||
|
<td><?=$get_an_employee_offer['t_name']?></td>
|
||||||
|
<td><?=$get_an_employee_offer['discount']?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
<h4 class="mt-0 header-title">اضافة خدمات خاصه للعرض</h4>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="tretment_offer_serv" class="col-form-label text-right">العروض</label>
|
||||||
|
<select id="tretment_offer_serv" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_an_employee_offer_sql = mysqli_query($db, "SELECT `id`,`name`,`upload_image_id` FROM `an_employee_offer` WHERE `activation_id` = 2");
|
||||||
|
while ($get_an_employee_offer = mysqli_fetch_assoc($get_an_employee_offer_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_an_employee_offer['id']?>" data-upload="<?=$get_an_employee_offer['upload_image_id']?>" ><?=$get_an_employee_offer['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div id="an_employee_offer_has_services" class="col-lg-6 col-sm-6">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_serv_to_offer" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" class="form-control">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#emp_offer").click(function() {
|
||||||
|
add_emp_offer();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_emp_offer();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_emp_offer() {
|
||||||
|
let an_emp_name = $("#an_emp_name").val();
|
||||||
|
let an_emp_type = $("#an_emp_type").val();
|
||||||
|
let an_emp_number = $("#an_emp_number").val();
|
||||||
|
let an_emp_upload = $("#an_emp_upload").val();
|
||||||
|
let an_emp_enters = $("#an_emp_enters").val();
|
||||||
|
if (an_emp_type == 1 && an_emp_number > 0) {
|
||||||
|
swalfun("لا يوجد خصم", "يجب ان يكون مبلغ الخصم يساوي 0", "warning");
|
||||||
|
return;
|
||||||
|
} else
|
||||||
|
if (an_emp_name == '' && an_emp_type != 1) {
|
||||||
|
swalfun("يرجى ادخال اسم جهه العمل", "", "warning");
|
||||||
|
return;
|
||||||
|
} else
|
||||||
|
if (an_emp_number == '') {
|
||||||
|
swalfun("يرجى ادخال مبلغ / نسبة الخصم", "", "warning");
|
||||||
|
return;
|
||||||
|
} else
|
||||||
|
if (an_emp_type == 3 && an_emp_number > 100 ) {
|
||||||
|
swalfun("نسبة الخصم اكبر من 100%", "", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++
|
||||||
|
$.post("work/order/ajax/add_emp_offer_ajax.php", {
|
||||||
|
an_emp_name,
|
||||||
|
an_emp_type,
|
||||||
|
an_emp_number,
|
||||||
|
an_emp_upload,
|
||||||
|
an_emp_enters
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$("#tretment_offer_serv").change(function() {
|
||||||
|
var empName = $(this).val();
|
||||||
|
$.post("work/order/ajax/get_services_from_an_emplyee_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(theService) {
|
||||||
|
$("#an_employee_offer_has_services").html(theService);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".select2").select2({
|
||||||
|
width: '100%'
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$("#add_serv_to_offer").click(function() {
|
||||||
|
add_serv_to_offer();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_serv_to_offer() {
|
||||||
|
let services = $("#services").val();
|
||||||
|
let tretment_offer_serv = $("#tretment_offer_serv").val();
|
||||||
|
|
||||||
|
$.post("work/order/ajax/add_serv_to_offer_ajax.php", {
|
||||||
|
services,
|
||||||
|
tretment_offer_serv
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
104
add_emplyee.php
Normal file
104
add_emplyee.php
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
|
||||||
|
access(38);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h3>إضافة موظف جديد</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
<div id="get_tretment"></div>
|
||||||
|
<h4 class="mt-0 header-title">معلومات الموظف</h4>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="name" class="col-form-label text-right">الاسم الكامل</label>
|
||||||
|
<input id="name" class="form-control clickfun" type="text">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="card_number" class="col-form-label text-right">رقم الحدود</label>
|
||||||
|
<input id="card_number" class="form-control clickfun" type="number">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="nationality" class="col-form-label text-right">القسم</label>
|
||||||
|
<select id="nationality" class="form-control">
|
||||||
|
<option value="0" selected>يرجى الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_Nationality_sql = mysqli_query($db, "SELECT `id`,`name` FROM `Nationality` WHERE `activation_id` = 2");
|
||||||
|
while ($get_Nationality = mysqli_fetch_assoc($get_Nationality_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_Nationality['id']?>"><?=$get_Nationality['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="occ" class="col-form-label text-right">القسم</label>
|
||||||
|
<select id="occ" class="form-control">
|
||||||
|
<option value="0" selected>يرجى الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_occupation_sql = mysqli_query($db, "SELECT `id`,`name` FROM `occupation` WHERE `activation_id` = 2");
|
||||||
|
while ($get_occupation = mysqli_fetch_assoc($get_occupation_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_occupation['id']?>"><?=$get_occupation['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="home_number" class="col-form-label text-right">رقم الجوال في البلد الام</label>
|
||||||
|
<input id="home_number" class="form-control clickfun" type="text">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 col-sm-12">
|
||||||
|
<label for="note" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea id="note" class="form-control" rows="15" style="width: 100%;"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_emplyee" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" class="form-control">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
282
add_on.php
Normal file
282
add_on.php
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(26);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الحجز</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_book">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_book">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الشراء</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="" class="col-form-label text-right">الاضافات</label>
|
||||||
|
<select id="add_on_name" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_add_on_product_sql = mysqli_query($db, "SELECT `id`, `name`, `price` FROM `add_on_product` WHERE `commercial_register_id`=$commercial_register_id AND `activation_id` = 2");
|
||||||
|
|
||||||
|
while ($row_add_on_product = mysqli_fetch_assoc($get_add_on_product_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$row_add_on_product['id']?>" data-price="<?php if(!empty($vat)){echo round($row_add_on_product['price'] + (($row_add_on_product['price']*$vat)/100),2);}else{echo round($row_add_on_product['price'],2);} ?>"><?=$row_add_on_product['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea id="add_on_note" row="4" class="form-control" type="text"> </textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id="true_price" style="color:red">0</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_on" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// for limit clicks
|
||||||
|
searchClick = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#search_book").click(function() {
|
||||||
|
search_book();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_book();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_book() {
|
||||||
|
var bookNumber = $("#number").val();
|
||||||
|
if (bookNumber.length <= 0 || bookNumber == '') {
|
||||||
|
swalfun('حدث خطأ', 'يرجى كتابة رقم حجز صحيح', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_book_ajax.php", {
|
||||||
|
bookNumber,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_book").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// for limit clicks
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_on").click(function() {
|
||||||
|
add_on();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_on();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let curr_price = 0
|
||||||
|
$("[name='cash_pay']").change(function() {
|
||||||
|
cash_pay = $("[name='cash_pay']").val();
|
||||||
|
$("[name='card_pay']").val(curr_price - cash_pay)
|
||||||
|
})
|
||||||
|
$("[name='card_pay']").change(function() {
|
||||||
|
card_pay = $("[name='card_pay']").val();
|
||||||
|
$("[name='cash_pay']").val(curr_price - card_pay)
|
||||||
|
})
|
||||||
|
|
||||||
|
function add_on() {
|
||||||
|
|
||||||
|
cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
if (cash_pay < 0 || card_pay < 0) {
|
||||||
|
swalfun("يرجى التحقق", "لا يمكن ان يكون المبلغ المدخل بالسالب", "warning");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (curr_price != (cash_pay + card_pay)) {
|
||||||
|
swalfun('يرجى التحقق','مدخلات الدفع غير مطابقه المبلغ المستحق','info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let book_id = $("[name='book_id']").val();
|
||||||
|
if (book_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى ادخال رقم الحجز', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let add_on = $("#add_on_name").val();
|
||||||
|
if (add_on == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الاضافة ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let price = curr_price
|
||||||
|
let add_on_note = $("#add_on_note").val();
|
||||||
|
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_add_on_ajax.php", {
|
||||||
|
book_id,
|
||||||
|
add_on,
|
||||||
|
add_on_note,
|
||||||
|
price,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// get price when change add_on
|
||||||
|
$(function() {
|
||||||
|
$("#add_on_name").change(function() {
|
||||||
|
let add_on_p = $(this).find(':selected').data('price');
|
||||||
|
$("#true_price").html(add_on_p);
|
||||||
|
curr_price = add_on_p
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
978
add_to_rolls_group.php
Normal file
978
add_to_rolls_group.php
Normal file
@ -0,0 +1,978 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
$rolls_temp = array(
|
||||||
|
array(
|
||||||
|
"id" => 59,
|
||||||
|
"name" => "تقرير جدول الخدمات المفعلة يومي",
|
||||||
|
"php_file" => "active_book_d",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 164,
|
||||||
|
"name" => "تقرير جدول الخدمات المفعلة شهري",
|
||||||
|
"php_file" => "active_book_m",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 80,
|
||||||
|
"name" => "تقرير جدول الخدمات المفعلة جدول يومي",
|
||||||
|
"php_file" => "active_book",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 55, "name" => "الدخول فقط ل مخرج 15"),
|
||||||
|
array("id" => 56, "name" => "الدخول فقط ل مخرج 7"),
|
||||||
|
array("id" => 57, "name" => "الدخول فقط ل مخرج 29"),
|
||||||
|
array("id" => 81, "name" => "الدخول فقط ل مخرج خميس مشيط"),
|
||||||
|
array("id" => 58, "name" => "الدخول فقط ل مخرج 6"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 82,
|
||||||
|
"name" => "تفعيل جلسات العلاج الطبيعي",
|
||||||
|
"php_file" => "active_physical_therapy",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 83,
|
||||||
|
"name" => "تفعيل جلسات الزيارات",
|
||||||
|
"php_file" => "active_visits",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 7,
|
||||||
|
"name" => "تفعيل جلسات مركز اقدامي",
|
||||||
|
"php_file" => "active",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 84, "name" => "إمكانية تفعيل الجلسات المستقبلية"),
|
||||||
|
array("id" => 85, "name" => "إمكانية تفعيل الجلسات القديمة"),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 29,
|
||||||
|
"name" => "إضافة عرض جهه العمل",
|
||||||
|
"php_file" => "add_emp_offer",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 38,
|
||||||
|
"name" => "إضافة موظف",
|
||||||
|
"php_file" => "add_emplyee",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 26,
|
||||||
|
"name" => "إضافة منتجات للفاتورة (كاسات ،اومواس)",
|
||||||
|
"php_file" => "add_on",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 19,
|
||||||
|
"name" => "إضافة عميل",
|
||||||
|
"php_file" => "add_tretment",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 86,
|
||||||
|
"name" => "تقرير جميع السندات شهري",
|
||||||
|
"php_file" => "all_bonds",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 71,
|
||||||
|
"name" => "تقرير جميع الفواتير شهري",
|
||||||
|
"php_file" => "all_invoices",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 87,
|
||||||
|
"name" => "تقرير رصيد العملاء",
|
||||||
|
"php_file" => "bonds_int_dec",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 6,
|
||||||
|
"name" => "الجلسات الملغية",
|
||||||
|
"php_file" => "book_cancel",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 77,
|
||||||
|
"name" => "حجوزات العلاج الطبيعي",
|
||||||
|
"php_file" => "book_physical_therapy",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 88, "name" => "الدخول فقط ل مخرج 7 العلاج الطبيعي")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 64,
|
||||||
|
"name" => "حجوزات الزيارات",
|
||||||
|
"php_file" => "book_visits",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 89, "name" => "الدخول فقط ل مخرج 15"),
|
||||||
|
array("id" => 90, "name" => "الدخول فقط ل مخرج 7"),
|
||||||
|
array("id" => 91, "name" => "الدخول فقط ل مخرج 29"),
|
||||||
|
array("id" => 92, "name" => "الدخول فقط ل مخرج خميس مشيط"),
|
||||||
|
array("id" => 93, "name" => "الدخول فقط ل مخرج 6"),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 161,
|
||||||
|
"name" => "حجوزات مركز اقدامي",
|
||||||
|
"php_file" => "book",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 1, "name" => "الدخول فقط ل مخرج 15"),
|
||||||
|
array("id" => 2, "name" => "الدخول فقط ل مخرج 7"),
|
||||||
|
array("id" => 3, "name" => "الدخول فقط ل مخرج 29"),
|
||||||
|
array("id" => 94, "name" => "الدخول فقط ل مخرج خميس مشيط"),
|
||||||
|
array("id" => 4, "name" => "الدخول فقط ل مخرج 6")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 5,
|
||||||
|
"name" => "تفاصيل حجوزات العميل",
|
||||||
|
"php_file" => "booking_detail",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 95,
|
||||||
|
"name" => "حجز جديد للعلاج الطبيعي",
|
||||||
|
"php_file" => "booking_physical_therapy",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 96, "name" => "إمكانية الحجز في وقت سابق")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 97,
|
||||||
|
"name" => "حجز جديد للزيارات المنزالية",
|
||||||
|
"php_file" => "booking_visits",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 98, "name" => "إمكانية الحجز في وقت سابق")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 23,
|
||||||
|
"name" => "حجز جديد مركز اقدامي",
|
||||||
|
"php_file" => "booking",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 65, "name" => "إمكانية الحجز في وقت سابق")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 25,
|
||||||
|
"name" => "عرض الفروع",
|
||||||
|
"php_file" => "branch",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 27,
|
||||||
|
"name" => "إضافة خدمات مجمعة",
|
||||||
|
"php_file" => "bundle_services",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 99,
|
||||||
|
"name" => "اضافة رصيد أموال",
|
||||||
|
"php_file" => "buy_money",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 9,
|
||||||
|
"name" => "إضافة باقة",
|
||||||
|
"php_file" => "buy_pack",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 8,
|
||||||
|
"name" => "إضافة رصيد خدمات",
|
||||||
|
"php_file" => "buy_serv",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 100,
|
||||||
|
"name" => "إضافة رصيد خدمات خصم 50% خميس مشيط",
|
||||||
|
"php_file" => "buy_servs",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 101,
|
||||||
|
"name" => "نفعيل الكوبونات",
|
||||||
|
"php_file" => "coupon_active",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 10,
|
||||||
|
"name" => "شراء كوبون",
|
||||||
|
"php_file" => "coupons",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 72,
|
||||||
|
"name" => "إضافة خصم خاص للعميل",
|
||||||
|
"php_file" => "custom_discount",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 67,
|
||||||
|
"name" => "تقرير الايراد اليومي (أبو أسامة) قديم",
|
||||||
|
"php_file" => "daily_branchs_report_old",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 42,
|
||||||
|
"name" => "تقرير الايراد اليومي (أبو أسامة) جديد",
|
||||||
|
"php_file" => "daily_branchs_report",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 102,
|
||||||
|
"name" => "تفاصيل ايراد الموظف اليومي",
|
||||||
|
"php_file" => "daily_user_d",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 30,
|
||||||
|
"name" => "الايراد اليومي للموظفين",
|
||||||
|
"php_file" => "daily_user",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 103,
|
||||||
|
"name" => "حالة المشروبات",
|
||||||
|
"php_file" => "drinks_status",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 104,
|
||||||
|
"name" => "تعديل حجوزات الزيارات",
|
||||||
|
"php_file" => "edit_booking_visits",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 43,
|
||||||
|
"name" => "تعديل حجوزات مركز اقدامي",
|
||||||
|
"php_file" => "edit_booking",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 66, "name" => "إمكانية التعديل لوقت سابق")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 44,
|
||||||
|
"name" => "تعديل تفاصيل الفروع",
|
||||||
|
"php_file" => "edit_branch",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 24,
|
||||||
|
"name" => "تعديل الموظفين",
|
||||||
|
"php_file" => "edit_emplyee",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 49, "name" => "تعديل المعلومات الأساسية"),
|
||||||
|
array("id" => 51, "name" => "تعديل فترات الدوام"),
|
||||||
|
array("id" => 52, "name" => "تعديل جدول الحجوزات"),
|
||||||
|
array("id" => 53, "name" => "الصلاحيات"),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 105,
|
||||||
|
"name" => "تفاصيل تقرير نسبة الحمام المغربي",
|
||||||
|
"php_file" => "emp_bath_points_d",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 62,
|
||||||
|
"name" => "تقرير نسبة الحمام المغربي",
|
||||||
|
"php_file" => "emp_bath_points",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 106,
|
||||||
|
"name" => "تقرير نسبة الرجوع خلال سنة واحدة",
|
||||||
|
"php_file" => "emp_come_back_1_year",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 35,
|
||||||
|
"name" => "تقرير نسبة الرجوع",
|
||||||
|
"php_file" => "emp_come_back",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 107,
|
||||||
|
"name" => "تفاصيل تقرير نسبة البدكير",
|
||||||
|
"php_file" => "emp_pedicure_points_d",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 63,
|
||||||
|
"name" => "تقرير نسبة البدكير",
|
||||||
|
"php_file" => "emp_pedicure_points",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 45,
|
||||||
|
"name" => "تقاصيل تقرير نسبة المدلكين (النقاط)",
|
||||||
|
"php_file" => "emp_points_d",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 37,
|
||||||
|
"name" => "تقرير نسبة المدلكين (النقاط)",
|
||||||
|
"php_file" => "emp_points",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 22,
|
||||||
|
"name" => "الموظفين",
|
||||||
|
"php_file" => "emplyees",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 162, "name" => "اظهار علامه التعديل")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 108,
|
||||||
|
"name" => "المساعدة الدعم" . "// لاحقا //",
|
||||||
|
"php_file" => "faq",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 109,
|
||||||
|
"name" => "عرض يوم الأب",
|
||||||
|
"php_file" => "father_day",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 110,
|
||||||
|
"name" => "ملفات الدرايف",
|
||||||
|
"php_file" => "ifram",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 111,
|
||||||
|
"name" => "الغاء الفواتير (خاص للمبيعات)",
|
||||||
|
"php_file" => "inv_cancel_admin",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 15,
|
||||||
|
"name" => "الغاء الفواتير",
|
||||||
|
"php_file" => "inv_cancel",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 112,
|
||||||
|
"name" => "تقرير الفواتير يومي",
|
||||||
|
"php_file" => "invoice_day",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 113,
|
||||||
|
"name" => "تقرير الخصومات عالفاتورة شهري",
|
||||||
|
"php_file" => "invoice_desc_report",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 114,
|
||||||
|
"name" => "بحث فواتير ",
|
||||||
|
"php_file" => "invoice_search",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
"id" => 28,
|
||||||
|
"name" => "اهداءات الادارة",
|
||||||
|
"php_file" => "managers_gift",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 68, "name" => "إضافة اسمة بقائمة بتوجيه")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 163,
|
||||||
|
"name" => "قائمة الطلبات المرسلة اهداءات الإدارة",
|
||||||
|
"php_file" => "managers_orders",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 69, "name" => "إضافة اسمة بقائمة الكود لإستلام الاكواد")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 32,
|
||||||
|
"name" => "تقرير الباقات المفعلة",
|
||||||
|
"php_file" => "month_packs",
|
||||||
|
'can_do' => array()
|
||||||
|
,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 31,
|
||||||
|
"name" => "تقرير الايراد شهري",
|
||||||
|
"php_file" => "month_user",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 40,
|
||||||
|
"name" => "حجوزاتي (للفنيين)",
|
||||||
|
"php_file" => "my_books",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 41,
|
||||||
|
"name" => "نقاطي (للفنيين)",
|
||||||
|
"php_file" => "my_points",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 39,
|
||||||
|
"name" => "متابعة العميل (للفنيين)",
|
||||||
|
"php_file" => "my_work",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
"id" => 115,
|
||||||
|
"name" => "اودو المراكز التحليلية",
|
||||||
|
"php_file" => "odoo_analytical_centers",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 116,
|
||||||
|
"name" => "اودو العملاء اقدامي",
|
||||||
|
"php_file" => "odoo_customers_a",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 117,
|
||||||
|
"name" => "اودو العملاء العلاج الطبيعي",
|
||||||
|
"php_file" => "odoo_customers_p",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 118,
|
||||||
|
"name" => "اودو العملاء الزيارات",
|
||||||
|
"php_file" => "odoo_customers_v",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 119,
|
||||||
|
"name" => "اودو المرتجعات اقدامي",
|
||||||
|
"php_file" => "odoo_invoice_credit_notes_a",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 120,
|
||||||
|
"name" => "اودو المرتجعات العلاج الطبيعي",
|
||||||
|
"php_file" => "odoo_invoice_credit_notes_p",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 121,
|
||||||
|
"name" => "اودو المرتجعات الزيارات",
|
||||||
|
"php_file" => "odoo_invoice_credit_notes_v",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 122,
|
||||||
|
"name" => "اودو الفواتير اقدامي",
|
||||||
|
"php_file" => "odoo_invoices_a",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 123,
|
||||||
|
"name" => "اودو الفواتير العلاج الطبيعي",
|
||||||
|
"php_file" => "odoo_invoices_p",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 124,
|
||||||
|
"name" => "اودو الفواتير الزيارات",
|
||||||
|
"php_file" => "odoo_invoices_v",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 125,
|
||||||
|
"name" => "اودو المدفوعات اقدامي ",
|
||||||
|
"php_file" => "odoo_payments_account_payment_a",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 126,
|
||||||
|
"name" => "اودو المدفوعات العلاج الطبيعي",
|
||||||
|
"php_file" => "odoo_payments_account_payment_p",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 127,
|
||||||
|
"name" => "اودو المدفوعات الزيارات",
|
||||||
|
"php_file" => "odoo_payments_account_payment_v",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 73,
|
||||||
|
"name" => "الجلسات الملغية المعلقة",
|
||||||
|
"php_file" => "on_hold_cancel",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 128,
|
||||||
|
"name" => "الضيافة صفحة وصول الطلبات",
|
||||||
|
"php_file" => "order_receiver",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 36,
|
||||||
|
"name" => "تقرير اوفر تايم الفنيين",
|
||||||
|
"php_file" => "overtime",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 129,
|
||||||
|
"name" => "حجوزاتي (العلاج الطبيعي)",
|
||||||
|
"php_file" => "p_mybooks",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 130,
|
||||||
|
"name" => "مدفوعات العصائر",
|
||||||
|
"php_file" => "pos",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 131,
|
||||||
|
"name" => "طباعه أي ملف",
|
||||||
|
"php_file" => "print",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 132,
|
||||||
|
"name" => "تفاصيل الحجوزات بحركتة (للمبيعات)",
|
||||||
|
"php_file" => "procedures_book_details",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 50,
|
||||||
|
"name" => "PROCESSLIST (it)",
|
||||||
|
"php_file" => "PROCESSLIST",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 133,
|
||||||
|
"name" => "تقرير المستفيدين من عرض 30% شهري",
|
||||||
|
"php_file" => "r_30_p_descount_blocks_m",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 134,
|
||||||
|
"name" => "تقرير المستفيدين من عرض 30% يومي",
|
||||||
|
"php_file" => "r_30_p_descount_blocks",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 135,
|
||||||
|
"name" => "تفاصيل تقرير المستفيدين من عرض 30% شهري",
|
||||||
|
"php_file" => "r_descount_30_p",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 74,
|
||||||
|
"name" => "تقرير الخدمات المجانية شهري",
|
||||||
|
"php_file" => "r_free_serv",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 136,
|
||||||
|
"name" => "تقرير الايراد الشهري للعلاج الطبيعي",
|
||||||
|
"php_file" => "r_month_user_therapy",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 137,
|
||||||
|
"name" => "تقرير العملاء الماسيين المستحقين",
|
||||||
|
"php_file" => "r_royality_tretment",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 138,
|
||||||
|
"name" => "تقرير الأحذية",
|
||||||
|
"php_file" => "r_shoes",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 75,
|
||||||
|
"name" => "تقرير المستفيدين من عرض ولاء",
|
||||||
|
"php_file" => "r_walla",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
"id" => 139,
|
||||||
|
"name" => "تقرير المرتجعات يومي",
|
||||||
|
"php_file" => "returns_daily",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 76,
|
||||||
|
"name" => "تقرير تفاصيل المستفيدين من الكود الماسيين المستحقين",
|
||||||
|
"php_file" => "royality_tretment_comes",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 140,
|
||||||
|
"name" => "صفحة التواصل للماسيين المستحقيين",
|
||||||
|
"php_file" => "royality_tretment",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 70,
|
||||||
|
"name" => "ايراد الخدمات للفاتورة",
|
||||||
|
"php_file" => "serv_come_inv",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 33,
|
||||||
|
"name" => "ايراد الخدمات",
|
||||||
|
"php_file" => "serv_come",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 47,
|
||||||
|
"name" => "الخدمات",
|
||||||
|
"php_file" => "services",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 48,
|
||||||
|
"name" => "الرسائل النصية",
|
||||||
|
"php_file" => "sms_taqnyat",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 141, "name" => "تقنيات")
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 79,
|
||||||
|
"name" => "test (it)",
|
||||||
|
"php_file" => "test",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 142,
|
||||||
|
"name" => "تفاصيل الأسعار",
|
||||||
|
"php_file" => "tretment_serv_details",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 20,
|
||||||
|
"name" => "إدارة العملاء",
|
||||||
|
"php_file" => "tretments",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
"id" => 46,
|
||||||
|
"name" => "تقرير نسبة الباقات",
|
||||||
|
"php_file" => "user_bonds",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 34,
|
||||||
|
"name" => "تقرير نسبة الحجوزات والتفعيل",
|
||||||
|
"php_file" => "user_book_inv",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 165,
|
||||||
|
"name" => "WORK_FILES (it)",
|
||||||
|
"php_file" => "WORK_FILES",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 143,
|
||||||
|
"name" => "تقرير رصيد الاموال",
|
||||||
|
"php_file" => "month_money",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 144,
|
||||||
|
"name" => "تقرير رصيد الخدمات",
|
||||||
|
"php_file" => "month_serv",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 145,
|
||||||
|
"name" => "تقرير مرتجعات الباقات",
|
||||||
|
"php_file" => "month_return_bonds",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => 146,
|
||||||
|
"name" => "تقرير نسب السائقين",
|
||||||
|
"php_file" => "driver_points_month",
|
||||||
|
'can_do' => array()
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
"id" => -1,
|
||||||
|
"name" => "أخرى",
|
||||||
|
"php_file" => "",
|
||||||
|
'can_do' => array(
|
||||||
|
array("id" => 54, "name" => "التنقل بين المؤسسات"),
|
||||||
|
array("id" => 60, "name" => "المشروبات"),
|
||||||
|
array("id" => 61, "name" => "ادارة المشروبات"),
|
||||||
|
array("id" => 78, "name" => "ادارة المبيعات"),
|
||||||
|
array("id" => 11, "name" => "تعديل فاتورة"),
|
||||||
|
array("id" => 12, "name" => "تعديل خدمة"),
|
||||||
|
array("id" => 13, "name" => "تعديل باقة"),
|
||||||
|
array("id" => 14, "name" => "تعديل كوبون"),
|
||||||
|
array("id" => 16, "name" => "الغاء خدمة"),
|
||||||
|
array("id" => 17, "name" => "الغاء باقة"),
|
||||||
|
array("id" => 18, "name" => "الغاء كوبون"),
|
||||||
|
array("id" => 21, "name" => "القائمة السوداء"),
|
||||||
|
array("id" => 147, "name" => "الغاء رصيد خدمات"),
|
||||||
|
array("id" => 148, "name" => "الغاء رصيد أموال"),
|
||||||
|
array("id" => 149, "name" => "تحويل رصيد خدمات لعميل اخر"),
|
||||||
|
array("id" => 150, "name" => "تحويل رصيد أموال لعميل اخر"),
|
||||||
|
array("id" => 151, "name" => "تحويل رصيد الخدمات ل رصيد أموال"),
|
||||||
|
array("id" => 152, "name" => "تفعيل الجلسات عن الموظفين ( من له صلاحية التفعيل )"),
|
||||||
|
array("id" => 153, "name" => "تحويل طريقة الدفع الى أخرى (كاش الى شبكة والعكس)"),
|
||||||
|
array("id" => 154, "name" => "تعديل الخدمات في الجدول (يلزم الدخول والسداد اشعار مدين)"),
|
||||||
|
array("id" => 155, "name" => "تفعيل جسابات لتسجيل الدخول"),
|
||||||
|
array("id" => 156, "name" => "الغاء خدمات مجانية"),
|
||||||
|
array("id" => 157, "name" => "الغاء رصيد أموال مجاني"),
|
||||||
|
array("id" => 158, "name" => "اشعارات دائنة للفاتورة دون الغاء"),
|
||||||
|
array("id" => 159, "name" => "تغيير الخدمات المجانية"),
|
||||||
|
array("id" => 160, "name" => "إضافة رصيد أموال مجاني"),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
$group_id = mysqli_real_escape_string($db, $_GET['id']);
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<h1 class="text-center">
|
||||||
|
الصلاحيات
|
||||||
|
</h1>
|
||||||
|
<hr class="hrline">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <h4 class="mt-0 header-title">تحديد القروب</h4> -->
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-2 ">
|
||||||
|
<label for="" class="col-form-label text-right">تحديد القروب</label>
|
||||||
|
<select id="rolls_group" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT `rolls_group`.`id` AS `id`, `rolls_group`.`name`
|
||||||
|
|
||||||
|
FROM `rolls_group`
|
||||||
|
WHERE `rolls_group`.`id` > 1");
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<option <?php if($emp_id == $emplyee_row['id']) {$branch_name = $emplyee_row['br_name']; echo 'selected';}?> value="<?= $emplyee_row['id'] ?>"><?= $emplyee_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="g_rolls">عرض</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-5">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header" style="display: flex;justify-content: space-between;">
|
||||||
|
<h5>الصلاحيات</h5>
|
||||||
|
<div class="checkbox checkbox-dark">
|
||||||
|
<input id="select-all" type="checkbox" name="select-all">
|
||||||
|
<label for="select-all">تحديد الكل</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="card-block row">
|
||||||
|
<div class="col-sm-12 col-lg-12 col-xl-12">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered checkbox-td-width">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 25px;">#</td>
|
||||||
|
<td style="width: 25px;">#</td>
|
||||||
|
<td>الصلاحية</td>
|
||||||
|
<td>شرح</td>
|
||||||
|
<td>الحالة</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$countall = 1;
|
||||||
|
$count1 = 1;
|
||||||
|
$count2 = 1;
|
||||||
|
$user_has_rolls = array();
|
||||||
|
$get_user_has_rolls_sql = mysqli_query($db, "SELECT `rolls_group_has_rolls`.`rolls_id`
|
||||||
|
|
||||||
|
FROM `rolls_group_has_rolls`
|
||||||
|
WHERE `rolls_group_has_rolls`.`rolls_group_id` = '$group_id'");
|
||||||
|
while ($user_has_rolls_row = mysqli_fetch_assoc($get_user_has_rolls_sql)) {
|
||||||
|
array_push($user_has_rolls , $user_has_rolls_row['rolls_id']);
|
||||||
|
}
|
||||||
|
foreach ($rolls_temp as $key => $value) {
|
||||||
|
?>
|
||||||
|
<tr <?php if($rolls_temp[$key]['id'] == 0) { echo 'style="background: red;"'; }?> >
|
||||||
|
<td><?=$countall?></td>
|
||||||
|
<td><?=$count1?></td>
|
||||||
|
<td>
|
||||||
|
<?= $rolls_temp[$key]['name'] ?>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td <?php if (in_array($rolls_temp[$key]['id'], $user_has_rolls)) { echo 'style="background: green;"'; }?>>
|
||||||
|
<div class="checkbox checkbox-dark">
|
||||||
|
<input id="id-<?=$rolls_temp[$key]['id']?>" type="checkbox"
|
||||||
|
name="roll" value='<?=$rolls_temp[$key]['id']?>' <?php if (in_array($rolls_temp[$key]['id'], $user_has_rolls)) {
|
||||||
|
echo "checked";
|
||||||
|
} ?>>
|
||||||
|
<label for="id-<?=$rolls_temp[$key]['id']?>">
|
||||||
|
<?php if (in_array($rolls_temp[$key]['id'], $user_has_rolls)) {
|
||||||
|
echo "مفعل";
|
||||||
|
} else {
|
||||||
|
echo "غير مفعل";
|
||||||
|
} ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (count($rolls_temp[$key]['can_do']) > 0) {
|
||||||
|
$count2 = 1;
|
||||||
|
foreach ($rolls_temp[$key]['can_do'] as $key2 => $value2) {
|
||||||
|
?>
|
||||||
|
<tr style="background-color: #c3c3c3;" <?php if($rolls_temp[$key]['can_do'][$key2]['id'] == 0) { echo 'style="background: red;"'; }?>>
|
||||||
|
<td><?=$countall?></td>
|
||||||
|
<td><?=$count2?></td>
|
||||||
|
<td style="padding-right: 50px;">
|
||||||
|
----- <?= $rolls_temp[$key]['can_do'][$key2]['name'] ?>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td <?php if (in_array($rolls_temp[$key]['can_do'][$key2]['id'], $user_has_rolls)) { echo 'style="background: green;"'; }?>>
|
||||||
|
<div class="checkbox checkbox-dark">
|
||||||
|
<input id="id-<?=$rolls_temp[$key]['can_do'][$key2]['id']?>" type="checkbox"
|
||||||
|
name="roll" value='<?=$rolls_temp[$key]['can_do'][$key2]['id']?>' <?php if (in_array($rolls_temp[$key]['can_do'][$key2]['id'], $user_has_rolls)) {
|
||||||
|
echo "checked";
|
||||||
|
} ?>>
|
||||||
|
<label for="id-<?=$rolls_temp[$key]['can_do'][$key2]['id']?>">
|
||||||
|
<?php if (in_array($rolls_temp[$key]['can_do'][$key2]['id'], $user_has_rolls)) {
|
||||||
|
echo "مفعل";
|
||||||
|
} else {
|
||||||
|
echo "غير مفعل";
|
||||||
|
} ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$countall++;
|
||||||
|
$count2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$countall++;
|
||||||
|
$count1++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_rolls">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#add_rolls").click(function() {
|
||||||
|
rollsUpdate();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function rollsUpdate() {
|
||||||
|
let all_rolls = [];
|
||||||
|
$('input[name="roll"]:checked').each(function(){
|
||||||
|
all_rolls.push($(this).val());
|
||||||
|
})
|
||||||
|
let rolls_group = $("#rolls_group").val();
|
||||||
|
if (rolls_group == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار القروب ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.post("work/order/ajax/add_rolls_group_ajax.php", {
|
||||||
|
rolls_group,
|
||||||
|
all_rolls
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$("#g_rolls").click(function() {
|
||||||
|
let rolls_group_temp = $("#rolls_group").val();
|
||||||
|
if (rolls_group_temp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار القروب ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
window.open("add_to_rolls_group?id=" + rolls_group_temp, '_self')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Listen for click on toggle checkbox
|
||||||
|
$('#select-all').click(function(event) {
|
||||||
|
if(this.checked) {
|
||||||
|
// Iterate each checkbox
|
||||||
|
$(':checkbox').each(function() {
|
||||||
|
this.checked = true;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$(':checkbox').each(function() {
|
||||||
|
this.checked = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php') ?>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
217
add_tretment.php
Normal file
217
add_tretment.php
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(19);
|
||||||
|
|
||||||
|
$number = $_GET['number'];
|
||||||
|
$emp_id = $_GET['emp_id'];
|
||||||
|
$branch_id = $_GET['branch'];
|
||||||
|
$booking_day_date = $_GET['date'];
|
||||||
|
$booking_day_time = $_GET['time'];
|
||||||
|
|
||||||
|
$location = 'index.php';
|
||||||
|
if (!empty($number)) {
|
||||||
|
if (!empty($booking_day_date)) {
|
||||||
|
if (!empty($booking_day_time)) {
|
||||||
|
if (!empty($emp_id)) {
|
||||||
|
if (!empty($branch_id)) {
|
||||||
|
if ($commercial_register_id == 5) {
|
||||||
|
$location = 'booking_physical_therapy?emp_id='.$emp_id.'&date='.$booking_day_date.'&time='.$booking_day_time.'&branch='.$branch_id.'&number='.$number;
|
||||||
|
} else {
|
||||||
|
$location = 'booking?emp_id='.$emp_id.'&date='.$booking_day_date.'&time='.$booking_day_time.'&branch='.$branch_id.'&number='.$number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h3>اضافة عميل</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
<div id="get_tretment"></div>
|
||||||
|
<h4 class="mt-0 header-title">معلومات العميل</h4>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="" class="col-form-label text-right">الاسم الكامل</label>
|
||||||
|
<input id="tretment_name" class="form-control clickfun" type="text" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="tretment_number" class="form-control clickfun" type="number" value="<?=$number?>" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4 col-sm-6">
|
||||||
|
<label for="" class="col-form-label text-right">العمر</label>
|
||||||
|
<input id="tretment_age" class="form-control clickfun" type="number">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="tretment_offer" class="col-form-label text-right">العروض</label>
|
||||||
|
<select id="tretment_offer" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_an_employee_offer_sql = mysqli_query($db, "SELECT `id`,`name`,`upload_image_id` FROM `an_employee_offer` WHERE `activation_id` = 2");
|
||||||
|
while ($get_an_employee_offer = mysqli_fetch_assoc($get_an_employee_offer_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_an_employee_offer['id']?>" data-upload="<?=$get_an_employee_offer['upload_image_id']?>" ><?=$get_an_employee_offer['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 col-sm-6">
|
||||||
|
<label for="tretment_how_hear" class="col-form-label text-right">كيف سمعت عنا ؟</label>
|
||||||
|
<select id="tretment_how_hear" class="form-control" >
|
||||||
|
<?php
|
||||||
|
$get_how_to_hear_sql = mysqli_query($db, "SELECT `id`,`name`FROM `how_to_hear` WHERE `activation_id` = 2");
|
||||||
|
while ($get_how_to_hear = mysqli_fetch_assoc($get_how_to_hear_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$get_how_to_hear['id']?>"><?=$get_how_to_hear['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!-- <option value="frind">صديق</option> -->
|
||||||
|
<option value="else">اخرى</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div id="showUploadImage" class="col-lg-6 col-sm-6" style="display:none;">
|
||||||
|
<label for="" class="col-form-label text-right">ارفاق صوره</label>
|
||||||
|
<input name="" class="form-control clickfun" type="file">
|
||||||
|
</div>
|
||||||
|
<div id="frind" class="col-lg-6 col-sm-6" style="display:none;">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الصديق</label>
|
||||||
|
<input name="" class="form-control clickfun" type="number">
|
||||||
|
</div>
|
||||||
|
<div id="else" class="col-lg-6 col-sm-6" style="display:none;">
|
||||||
|
<label for="" class="col-form-label text-right">يرجى ذكرها</label>
|
||||||
|
<input name="" class="form-control clickfun" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_tretment" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" class="form-control">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#tretment_offer").change(function() {
|
||||||
|
let showUploadImage = $("#tretment_offer").find(":selected").data('upload');
|
||||||
|
if (showUploadImage == 2) {
|
||||||
|
$("#showUploadImage").show()
|
||||||
|
} else {
|
||||||
|
$("#showUploadImage").hide()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$("#tretment_how_hear").change(function() {
|
||||||
|
let value = $(this).val();
|
||||||
|
console.log(value);
|
||||||
|
if (value == 'frind' || value == 'else') {
|
||||||
|
if (value == 'frind') {
|
||||||
|
$("#frind").show()
|
||||||
|
$("#else").hide()
|
||||||
|
}
|
||||||
|
if (value == 'else') {
|
||||||
|
$("#else").show()
|
||||||
|
$("#frind").hide()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$("#frind").hide()
|
||||||
|
$("#else").hide()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_tretment").click(function() {
|
||||||
|
add_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_tretment() {
|
||||||
|
let tretment_name = $("#tretment_name").val();
|
||||||
|
if (tretment_name == '') {
|
||||||
|
swalfun('حدث خطأ', 'يرجى ادخال اسم العميل', 'error');
|
||||||
|
}
|
||||||
|
let tretment_number = $("#tretment_number").val();
|
||||||
|
if (tretment_number.length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let tretment_age = $("#tretment_age").val();
|
||||||
|
if (tretment_age == '' || tretment_age == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى ادخال عمر العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let tretment_offer = $("#tretment_offer").val();
|
||||||
|
let tretment_how_hear = $("#tretment_how_hear").val();
|
||||||
|
if (tretment_how_hear == 1) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى ادخال كيف سمع عنا', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let location = <?=json_encode($location);?>; // where go after add
|
||||||
|
if (click == 0) {
|
||||||
|
click++
|
||||||
|
$.post("work/order/ajax/add_tretment_ajax.php", {
|
||||||
|
tretment_name,
|
||||||
|
tretment_number,
|
||||||
|
tretment_age,
|
||||||
|
tretment_offer,
|
||||||
|
tretment_how_hear,
|
||||||
|
location
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
36
all_bonds.php
Normal file
36
all_bonds.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(32);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(false) {
|
||||||
|
require_once('under_maintenance.php');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ($_GET['m'] == 50) {
|
||||||
|
require_once('work/files/reports/all_bonds/4.php');
|
||||||
|
} else {
|
||||||
|
if (strtotime($today) < strtotime('2023-01-01 00:00:00')) {
|
||||||
|
require_once('work/files/reports/all_bonds/1.php');
|
||||||
|
}
|
||||||
|
// else if (strtotime($today) < strtotime('2023-01-30 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/all_bonds/1.php');
|
||||||
|
// }
|
||||||
|
else {
|
||||||
|
require_once('work/files/reports/all_bonds/2.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
36
all_invoices.php
Normal file
36
all_invoices.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(71);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(false) {
|
||||||
|
require_once('under_maintenance.php');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ($_GET['m'] == 50) {
|
||||||
|
require_once('work/files/reports/all_invoices/4.php');
|
||||||
|
} else {
|
||||||
|
if (strtotime($today) < strtotime('2023-01-01 00:00:00')) {
|
||||||
|
require_once('work/files/reports/all_invoices/1.php');
|
||||||
|
}
|
||||||
|
// else if (strtotime($today) < strtotime('2023-01-30 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/all_invoices/1.php');
|
||||||
|
// }
|
||||||
|
else {
|
||||||
|
require_once('work/files/reports/all_invoices/4.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
21
bonds_int_dec.php
Normal file
21
bonds_int_dec.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(31);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET['m'] == 50) {
|
||||||
|
require_once('work/files/reports/bonds_int_dec/3.php');
|
||||||
|
} else {
|
||||||
|
if (strtotime($today) < strtotime('2023-01-01 00:00:00')) {
|
||||||
|
require_once('work/files/reports/bonds_int_dec/1.php');
|
||||||
|
} else {
|
||||||
|
require_once('work/files/reports/bonds_int_dec/2.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
58
book.php
Normal file
58
book.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
|
||||||
|
if ($commercial_register_id == 5) {
|
||||||
|
echo "<script>window.location.href = 'book_physical_therapy';</script>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$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'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($branch_id == false) {
|
||||||
|
require_once('work/files/book/2.php');
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$variable = 3;
|
||||||
|
if (!empty($_GET['m']) && $_GET['m'] == 1) {
|
||||||
|
require_once('work/files/book/5.php');
|
||||||
|
} elseif (strtotime($today) > strtotime('2024-03-10') && strtotime($today) < strtotime('2024-04-10')) {
|
||||||
|
// for ramadan
|
||||||
|
// require_once('work/files/book/4.php');
|
||||||
|
require_once('work/files/book/6.php');
|
||||||
|
} else {
|
||||||
|
switch ($variable) {
|
||||||
|
case 1: // from frist lunch
|
||||||
|
require_once('work/files/book/1.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: // from 17/02/2023 09:00
|
||||||
|
require_once('work/files/book/3.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: // from 11/03/2024 09:00
|
||||||
|
require_once('work/files/book/7.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
277
book_cancel.php
Normal file
277
book_cancel.php
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(6);
|
||||||
|
|
||||||
|
$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'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$branch_sql = '`branch_id`='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '`branch_id`<>'.$branch_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$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 = "<>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!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'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<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>
|
||||||
|
حجوزات يوم
|
||||||
|
<?= Day_ar() ?>
|
||||||
|
<br />
|
||||||
|
<?= Today_ar() ?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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="book_cancel.php?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="book_cancel.php?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">
|
||||||
|
<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">
|
||||||
|
<table class="table table-bordered text-center">
|
||||||
|
<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>
|
||||||
|
<th scope="col">تاريخ ووقت الالغاء</th>
|
||||||
|
<th scope="col">بواسطة</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$get_book_cancel_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`book`.`id`,
|
||||||
|
`bd`.`day_time`,
|
||||||
|
`branch`.`branch_name`,
|
||||||
|
`tretment`.`name` AS `tr_name`,
|
||||||
|
`tretment`.`number`,
|
||||||
|
`services`.`name` AS `serv_name`,
|
||||||
|
`emplyee`.`name`,
|
||||||
|
`emplyee`.`his_img`,
|
||||||
|
`bd`.`date_time`,
|
||||||
|
`user`.`name` AS `user_cancel`
|
||||||
|
|
||||||
|
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 `book`.`user_id` = `user`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
LEFT JOIN `occupation` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `bd`.`branch_id` = `branch`.`id`
|
||||||
|
|
||||||
|
WHERE `bd`.`day_date`='$today'
|
||||||
|
AND `bd`.`status_id` IN (20,21,22,25)
|
||||||
|
AND `occupation`.`type_of_services_id` $not_eq $tabs
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`day_date`='$today' GROUP BY `book_details`.`day_time`)
|
||||||
|
ORDER BY `bd`.`day_time`
|
||||||
|
");
|
||||||
|
|
||||||
|
while ($get_book_cancel = mysqli_fetch_assoc($get_book_cancel_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$get_book_cancel['id']?></th>
|
||||||
|
<td><?=$get_book_cancel['tr_name']?></td>
|
||||||
|
<td><?=$get_book_cancel['number']?></td>
|
||||||
|
<td><?=$get_book_cancel['day_time']?></td>
|
||||||
|
<td><?=$get_book_cancel['serv_name']?></td>
|
||||||
|
<td><?=$get_book_cancel['name']?></td>
|
||||||
|
<td><?=$get_book_cancel['date_time']?></td>
|
||||||
|
<td><?=$get_book_cancel['user_cancel']?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--end card-body-->
|
||||||
|
</div>
|
||||||
|
<!--end card-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</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 = 'book_cancel.php?branch=<?= $branch_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$lastid_php_sql = mysqli_query($db, "SELECT MAX(`id`) AS `id` FROM `book_details`;");
|
||||||
|
$lastid_php = mysqli_fetch_assoc($lastid_php_sql);
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
function refrish() {
|
||||||
|
window.location.reload(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the entire page is already loaded
|
||||||
|
$( document ).ready(function() {
|
||||||
|
|
||||||
|
// Set the interval for the window refresh
|
||||||
|
window.setInterval(function() {
|
||||||
|
// get the database information
|
||||||
|
getInfo();
|
||||||
|
}, 1000); // Check every 30 seconds (60000 milliseconds = 60 seconds = 1 minute)
|
||||||
|
|
||||||
|
function getInfo() {
|
||||||
|
|
||||||
|
//make the ajax call
|
||||||
|
$.ajax({
|
||||||
|
url: 'work/order/ajax/book_ajax.php',
|
||||||
|
type: 'POST',
|
||||||
|
data: {lastid : <?= json_encode($lastid_php['id']) ?>},
|
||||||
|
success: function(data) {
|
||||||
|
// If data is available then reflect it to the sales container
|
||||||
|
if (data['val'] == 1) {
|
||||||
|
refrish();
|
||||||
|
}
|
||||||
|
console.log(data['val']);
|
||||||
|
},
|
||||||
|
error: function (request, status, error) {
|
||||||
|
//alert(request.responseText + 'يرجى اعادة تحديث الصفحة');
|
||||||
|
refrish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1253
book_physical_therapy.php
Normal file
1253
book_physical_therapy.php
Normal file
File diff suppressed because it is too large
Load Diff
1161
book_visits.php
Normal file
1161
book_visits.php
Normal file
File diff suppressed because it is too large
Load Diff
385
booking.php
Normal file
385
booking.php
Normal file
@ -0,0 +1,385 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(165); //23
|
||||||
|
|
||||||
|
$Select2 = true;
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
$number = $_GET['number'];
|
||||||
|
// if come with number end
|
||||||
|
|
||||||
|
// if come with booking_id
|
||||||
|
$booking_id = $_GET['booking_id'];
|
||||||
|
if (empty($booking_id)) {
|
||||||
|
$booking_id = 0;
|
||||||
|
} else {
|
||||||
|
if (!is_numeric($booking_id)) {
|
||||||
|
$booking_id = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if come with booking_id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$emp_id = $_GET['emp_id'];
|
||||||
|
$booking_day_date = $_GET['date'];
|
||||||
|
$booking_day_time = $_GET['time'];
|
||||||
|
$booking_branch_id = $_GET['branch'];
|
||||||
|
if (empty($booking_day_date) || empty($booking_day_time) || empty($booking_branch_id)) {
|
||||||
|
header('location:index.php');
|
||||||
|
}
|
||||||
|
$branch_name =''; // for view branch name in box
|
||||||
|
|
||||||
|
$Day = date('D', strtotime($booking_day_date));
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
mysqli_query($db,
|
||||||
|
"INSERT INTO `table`(`day_date`, `day_time`, `notes`, `branch_id`, `emplyee_id`, `status_id`, `date_time`, `user_id`, `activation_id`)
|
||||||
|
VALUES ('$booking_day_date', '$booking_day_time', '', '$booking_branch_id', '$emp_id', '3', '$date_time', '$admin_id', '2')"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT `branch`.`branch_name` AS `br_name`, `emplyee`.`id`,`emplyee`.`name` FROM `occupation`
|
||||||
|
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `occupation`.`show_in_table_id` = 2
|
||||||
|
AND `branch`.`commercial_register_id` = $commercial_register_id
|
||||||
|
AND `emplyee`.`activation_id` = 2
|
||||||
|
ORDER BY `branch`.`id`, `emplyee`.`name`");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الحجز</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">اسم الفني</label>
|
||||||
|
<select id="emp_name" style="font-family: system-ui;" class="form-control" name="booking_car_type">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<option <?php if($emp_id == $emplyee_row['id']) {$branch_name = $emplyee_row['br_name']; echo 'selected';}?> value="<?= $emplyee_row['id'] ?>"><?= $emplyee_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الخدمة المطلوبة</label>
|
||||||
|
<select id="theService" style="font-family: system-ui;" class="form-control">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<label for="send_sms" class="col-form-label text-right">ارسال رسالة</label>
|
||||||
|
<select id="send_sms" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="1" selected>لا</option>
|
||||||
|
<option value="2">نعم</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 bundle" style="display:none;">
|
||||||
|
<label for="bundle_name" class="col-form-label text-right">اسم الخدمات المجمعة</label>
|
||||||
|
<select id="bundle_name" style="font-family: system-ui;" class="form-control">
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div id="bundle_serv_id" class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 bundle" style="display:none;">
|
||||||
|
<label for="bundle_serv" class="col-form-label text-right">تفاصيل الخدمات المجمعة</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">التاريخ</label>
|
||||||
|
<input class="form-control clickfun" type="text" value="<?=$booking_day_date?> <?= Day_ar() ?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الوقت</label>
|
||||||
|
<input class="form-control clickfun" type="text" value="<?=$booking_day_time?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الفرع</label>
|
||||||
|
<input id="branch_vv" class="form-control clickfun" type="text" value="<?=$branch_name?>" disabled>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea row="4" name="booking_notes" class="form-control" type="text"> </textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_booking">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(".select2").select2({
|
||||||
|
width: '100%'
|
||||||
|
});
|
||||||
|
|
||||||
|
// for limit clicks
|
||||||
|
searchClick = 0;
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// get services
|
||||||
|
$(function() {
|
||||||
|
var empName = <?= json_encode($emp_id) ?>;
|
||||||
|
$.post("work/order/ajax/get_services_ajax.php", {
|
||||||
|
empName: empName
|
||||||
|
}, function(theService) {
|
||||||
|
$("#theService").html(theService);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
<?php
|
||||||
|
if (!empty($number)) {
|
||||||
|
?>
|
||||||
|
$("#number").val(<?=json_encode($number);?>);
|
||||||
|
search_tretment();
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
$(function() {
|
||||||
|
$("#add_booking").click(function() {
|
||||||
|
add_booking();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun2').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_booking();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_booking() {
|
||||||
|
|
||||||
|
tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentName = $("#tretmentName").html();
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
if (tretmentNumber.length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
emp = $("#emp_name").val();
|
||||||
|
if (emp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الفني ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
theService = $("#theService").val();
|
||||||
|
if (theService < 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bundle_id = $("#bundle_name").val();
|
||||||
|
if (bundle_id == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمات المجمعة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
booking_notes = $("[name='booking_notes']").val();
|
||||||
|
booking_id = <?=json_encode($booking_id);?>;
|
||||||
|
branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
emp_id = $("#emp_name").val();
|
||||||
|
|
||||||
|
emp_name = $("#emp_name").find(":selected").text();
|
||||||
|
booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
|
||||||
|
send_sms = $("#send_sms").val();
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_booking_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
emp_name,
|
||||||
|
tretmentNumber,
|
||||||
|
tretmentName,
|
||||||
|
booking_id,
|
||||||
|
theService,
|
||||||
|
booking_notes,
|
||||||
|
branch_id,
|
||||||
|
bundle_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
send_sms,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get branch when change emplyee
|
||||||
|
$(function() {
|
||||||
|
$("#emp_name").change(function() {
|
||||||
|
var empName = $(this).val();
|
||||||
|
$.post("work/order/ajax/get_services_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(theService) {
|
||||||
|
$("#theService").html(theService);
|
||||||
|
})
|
||||||
|
$.post("work/order/ajax/get_branch_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(data) {
|
||||||
|
$("#branch_vv").val(data['val']);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// get bundle name when change Service
|
||||||
|
$(function() {
|
||||||
|
$("#theService").change(function() {
|
||||||
|
if($(this).val() == 0){
|
||||||
|
$(".bundle").show();
|
||||||
|
tretment_id = $("[name='tretment_id']").val();
|
||||||
|
emp = $("#emp_name").val();
|
||||||
|
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
} else if(emp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الفني ', 'error');
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$.post("work/order/ajax/get_bundle_name_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
emp,
|
||||||
|
}, function(bundleNames) {
|
||||||
|
$("#bundle_name").html(bundleNames);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$(".bundle").hide()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// get bundle Service when change bundle name
|
||||||
|
$(function() {
|
||||||
|
$("#bundle_name").change(function() {
|
||||||
|
if($(this).val() > 0){
|
||||||
|
bundle_name = $("#bundle_name").val();
|
||||||
|
if(bundle_name == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى الخدمات المجمعة المطلوبة', 'error');
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$.post("work/order/ajax/get_bundle_services_has_services_ajax.php", {
|
||||||
|
bundle_name,
|
||||||
|
}, function(bundleServices) {
|
||||||
|
$("#bundle_serv_id").html(bundleServices);
|
||||||
|
$(".select2").select2({
|
||||||
|
width: '100%'
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
180
booking_detail.php
Normal file
180
booking_detail.php
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(5);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<h1 class="text-center">
|
||||||
|
الحجوزات
|
||||||
|
</h1>
|
||||||
|
<hr class="hrline">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="mt-0 header-title">معلومات البحث</h4>
|
||||||
|
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-2 ">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" name="tretment_number" class="form-control clickfun" type="number" value="<?php if (!empty($_GET['number'])) {echo $_GET['number'];}?>" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 ">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="table-responsive" id="get_data" style="vertical-align: middle;padding-bottom: 123px;padding-left: 69px;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-fluid custom_add">
|
||||||
|
<div class="row">
|
||||||
|
<style>
|
||||||
|
h3 {
|
||||||
|
font-size: 1.17em !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
$month = date('Y-m');
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT
|
||||||
|
`tretment`.`name` AS `tr_name`,
|
||||||
|
`tretment`.`number`,
|
||||||
|
`book_details`.`day_date`,
|
||||||
|
`book_details`.`day_time`,
|
||||||
|
`book`.`notes`,
|
||||||
|
`book_details`.`status_id`,
|
||||||
|
`book_details`.`branch_id`,
|
||||||
|
`emplyee`.`id` AS `emp_id`,
|
||||||
|
`emplyee`.`his_img`,
|
||||||
|
`emplyee`.`name` AS `emp_name`,
|
||||||
|
`services`.`name`,
|
||||||
|
`status`.`small_name` AS `state_string`
|
||||||
|
FROM user
|
||||||
|
LEFT JOIN `book` ON `book`.`user_id` = `user`.`id`
|
||||||
|
LEFT JOIN `book_details` ON `book`.`id` = `book_details`.`book_id`
|
||||||
|
LEFT JOIN `services` ON `book_details`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `book_details`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
LEFT JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
LEFT JOIN `status` ON `book_details`.`status_id` = `status`.`id`
|
||||||
|
|
||||||
|
WHERE `user`.`id` = '1' AND DATE_FORMAT(`book_details`.`date_time`, '%Y-%m') = '$month' AND `book_details`.`id` IN (SELECT MAX(`id`) FROM `book_details` GROUP BY `book_id`)
|
||||||
|
ORDER BY `book_details`.`date_time` DESC LIMIT 9");
|
||||||
|
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="card profile-card">
|
||||||
|
<div class="card-body p-0" style="background-color: #086367 !important;">
|
||||||
|
<div class="media p-3 align-items-center">
|
||||||
|
<img src="work/image/emp_img/<?=$emplyee_row['emp_id']?>/<?=$emplyee_row['his_img']?>" alt="user" class="rounded-circle thumb-xl">
|
||||||
|
<div class="media-body ml-3 align-self-center">
|
||||||
|
<h5 class="mb-1 text-white"><?=$emplyee_row['emp_name']?></h5>
|
||||||
|
<p class="mb-0 font-14 text-white"><?=$emplyee_row['name']?></p>
|
||||||
|
</div>
|
||||||
|
<a class="btn-light btn-sm" href="book.php?branch=<?=$emplyee_row['branch_id']?>&date=<?=$emplyee_row['day_date']?>">
|
||||||
|
<i class="fa fa-calendar" style="font-size: 18px;"></i></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body pb-0">
|
||||||
|
<h5 class="text-center"><?=$emplyee_row['tr_name']?> - <?=$emplyee_row['number']?></h5>
|
||||||
|
<p class="font-14 text-muted text-center"><?=$emplyee_row['notes']?></p>
|
||||||
|
</div>
|
||||||
|
<div class="card-body socials-data pb-0 px-0">
|
||||||
|
<div class="row text-center border-top m-0">
|
||||||
|
<div class="col-4 border-left py-3">
|
||||||
|
<h3 class="mt-0 mb-1"><?=$emplyee_row['day_date']?></h3>
|
||||||
|
<span class="font-14 text-muted">التاريخ</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 border-left py-3">
|
||||||
|
<h3 class="mt-0 mb-1"><?=date((date("H", strtotime($emplyee_row['day_time'])) > 11) ? 'h:i \م' : 'h:i \ص', strtotime($emplyee_row['day_time']))?></h3>
|
||||||
|
<span class="font-14 text-muted">الوقت</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 py-3">
|
||||||
|
<h3 class="mt-0 mb-1"><?=$emplyee_row['state_string']?></h3>
|
||||||
|
<span class="font-14 text-muted">الحالة</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#search").click(function() {
|
||||||
|
booking_d();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
booking_d();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
click = 0;
|
||||||
|
function booking_d() {
|
||||||
|
let number = $("#number").val();
|
||||||
|
if (number.length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++
|
||||||
|
$.post("work/order/ajax/booking_detail_ajax_1.php", {
|
||||||
|
number
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
$(".custom_add").hide();
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "تم بالفعل الضعط علية", "warning");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
if (!empty($_GET['number'])) {
|
||||||
|
echo "booking_d()";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
280
booking_physical_therapy.php
Normal file
280
booking_physical_therapy.php
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(23);
|
||||||
|
|
||||||
|
$emp_id = $_GET['emp_id'];
|
||||||
|
$booking_day_date = $_GET['date'];
|
||||||
|
$booking_day_time = $_GET['time'];
|
||||||
|
$booking_branch_id = $_GET['branch'];
|
||||||
|
if (empty($booking_day_date) || empty($booking_day_time) || empty($booking_branch_id)) {
|
||||||
|
echo "
|
||||||
|
<script>
|
||||||
|
window.location.href = 'book_visits';
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
$branch_name =''; // for view branch name in box
|
||||||
|
mysqli_query($db,
|
||||||
|
"INSERT INTO `table`(`day_date`, `day_time`, `notes`, `branch_id`, `emplyee_id`, `status_id`, `date_time`, `user_id`, `activation_id`)
|
||||||
|
VALUES ('$booking_day_date', '$booking_day_time', '', '$booking_branch_id', '$emp_id', '3', '$date_time', '$admin_id', '2')"
|
||||||
|
);
|
||||||
|
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT `branch`.`branch_name` AS `br_name`, `emplyee`.`id`,`emplyee`.`name` FROM `occupation`
|
||||||
|
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `occupation`.`show_in_table_id` = 2");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الحجز</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="" class="col-form-label text-right">اسم الفني</label>
|
||||||
|
<select id="emp_name" style="font-family: system-ui;" class="form-control" name="booking_car_type">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<option <?php if($emp_id == $emplyee_row['id']) {$branch_name = $emplyee_row['br_name']; echo 'selected';}?> value="<?= $emplyee_row['id'] ?>"><?= $emplyee_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="" class="col-form-label text-right">الخدمة المطلوبة</label>
|
||||||
|
<select id="theService" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="-1" data-cuPrice="0" data-price="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_Service_sql = mysqli_query($db, "SELECT `id`, `name`, `price` FROM `services`
|
||||||
|
WHERE `type_of_services_id` = 15
|
||||||
|
AND `commercial_register_id` = 5
|
||||||
|
AND `activation_id` = 2
|
||||||
|
");
|
||||||
|
while($Service_row = mysqli_fetch_assoc($get_Service_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$Service_row['id']?>" data-cuPrice="<?=round($Service_row['price'],2)?>" data-price="<?=round($Service_row['price'] + (($Service_row['price'])*$vat)/100,2)?>"><?=$Service_row['name']?> >>> السعر : <?=round($Service_row['price'] + (($Service_row['price'])*$vat)/100, 2) ?> </option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="send_sms" class="col-form-label text-right">ارسال رسالة</label>
|
||||||
|
<select id="send_sms" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="1">لا</option>
|
||||||
|
<option value="2" selected>نعم</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">التاريخ</label>
|
||||||
|
<input class="form-control clickfun" type="text" value="<?=$booking_day_date?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الوقت</label>
|
||||||
|
<input class="form-control clickfun" type="text" value="<?=$booking_day_time?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الفرع</label>
|
||||||
|
<input id="branch_vv" class="form-control clickfun" type="text" value="<?=$branch_name?>" disabled>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea row="4" name="booking_notes" class="form-control" type="text"> </textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_booking">إضافة</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>
|
||||||
|
// for limit clicks
|
||||||
|
searchClick = 0;
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
<?php
|
||||||
|
if (!empty($number)) {
|
||||||
|
?>
|
||||||
|
$("#number").val(<?=json_encode($number);?>);
|
||||||
|
search_tretment();
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
$(function() {
|
||||||
|
$("#add_booking").click(function() {
|
||||||
|
add_booking();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun2').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_booking();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_booking() {
|
||||||
|
|
||||||
|
tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentName = $("#tretmentName").html();
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
if (tretmentNumber.length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
emp = $("#emp_name").val();
|
||||||
|
if (emp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الفني ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
theService = $("#theService").val();
|
||||||
|
if (theService <= 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
send_sms = $("#send_sms").val();
|
||||||
|
|
||||||
|
bundle_id = $("#bundle_name").val();
|
||||||
|
if (bundle_id == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمات المجمعة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
booking_notes = $("[name='booking_notes']").val();
|
||||||
|
booking_id = <?=json_encode($booking_id);?>;
|
||||||
|
branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
emp_id = $("#emp_name").val();
|
||||||
|
emp_name = $("#emp_name").find(":selected").text();
|
||||||
|
booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_booking_physical_therapy_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
emp_name,
|
||||||
|
tretmentNumber,
|
||||||
|
tretmentName,
|
||||||
|
booking_id,
|
||||||
|
theService,
|
||||||
|
send_sms,
|
||||||
|
booking_notes,
|
||||||
|
branch_id,
|
||||||
|
bundle_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get branch when change emplyee
|
||||||
|
$(function() {
|
||||||
|
$("#emp_name").change(function() {
|
||||||
|
var empName = $(this).val();
|
||||||
|
$.post("work/order/ajax/get_branch_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(data) {
|
||||||
|
$("#branch_vv").val(data['val']);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
303
booking_visits.php
Normal file
303
booking_visits.php
Normal file
@ -0,0 +1,303 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(23);
|
||||||
|
|
||||||
|
$emp_id = $_GET['emp_id'];
|
||||||
|
$booking_day_date = $_GET['date'];
|
||||||
|
$booking_day_time = $_GET['time'];
|
||||||
|
$booking_branch_id = $_GET['branch'];
|
||||||
|
if (empty($booking_day_date) || empty($booking_day_time) || empty($booking_branch_id)) {
|
||||||
|
echo "
|
||||||
|
<script>
|
||||||
|
window.location.href = 'book_visits';
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
$branch_name =''; // for view branch name in box
|
||||||
|
mysqli_query($db,
|
||||||
|
"INSERT INTO `table`(`day_date`, `day_time`, `notes`, `branch_id`, `emplyee_id`, `status_id`, `date_time`, `user_id`, `activation_id`)
|
||||||
|
VALUES ('$booking_day_date', '$booking_day_time', '', '$booking_branch_id', '$emp_id', '3', '$date_time', '$admin_id', '2')"
|
||||||
|
);
|
||||||
|
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT `branch`.`branch_name` AS `br_name`, `emplyee`.`id`,`emplyee`.`name` FROM `occupation`
|
||||||
|
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `occupation`.`show_in_table_id` = 2");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الحجز</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="" class="col-form-label text-right">اسم الفني</label>
|
||||||
|
<select id="emp_name" style="font-family: system-ui;" class="form-control" name="booking_car_type">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<option <?php if($emp_id == $emplyee_row['id']) {$branch_name = $emplyee_row['br_name']; echo 'selected';}?> value="<?= $emplyee_row['id'] ?>"><?= $emplyee_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="" class="col-form-label text-right">الخدمة المطلوبة</label>
|
||||||
|
<select id="theService" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="-1" data-cuPrice="0" data-price="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_Service_sql = mysqli_query($db, "SELECT `id`, `name`, `price` FROM `services`
|
||||||
|
WHERE `type_of_services_id` = 14
|
||||||
|
AND `commercial_register_id` = 1
|
||||||
|
AND `activation_id` = 2
|
||||||
|
");
|
||||||
|
while($Service_row = mysqli_fetch_assoc($get_Service_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$Service_row['id']?>" data-cuPrice="<?=round($Service_row['price'],2)?>" data-price="<?=round($Service_row['price'] + (($Service_row['price'])*$vat)/100,2)?>"><?=$Service_row['name']?> >>> السعر : <?=round($Service_row['price'] + (($Service_row['price'])*$vat)/100, 2) ?> </option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="driver" class="col-form-label text-right">السائق</label>
|
||||||
|
<select id="driver" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="0" data-cuPrice="0" data-price="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_Service_sql = mysqli_query($db, "SELECT `id`, `name` FROM `emplyee`
|
||||||
|
WHERE `occupation_id` = 7
|
||||||
|
AND `activation_id` = 2
|
||||||
|
");
|
||||||
|
while($Service_row = mysqli_fetch_assoc($get_Service_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?=$Service_row['id']?>" ><?=$Service_row['name']?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="send_sms" class="col-form-label text-right">ارسال رسالة</label>
|
||||||
|
<select id="send_sms" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="1">لا</option>
|
||||||
|
<option value="2" selected>نعم</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">التاريخ</label>
|
||||||
|
<input class="form-control clickfun" type="text" value="<?=$booking_day_date?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الوقت</label>
|
||||||
|
<input class="form-control clickfun" type="text" value="<?=$booking_day_time?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الفرع</label>
|
||||||
|
<input id="branch_vv" class="form-control clickfun" type="text" value="<?=$branch_name?>" disabled>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea row="4" name="booking_notes" class="form-control" type="text"> </textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_booking">إضافة</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>
|
||||||
|
// for limit clicks
|
||||||
|
searchClick = 0;
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
<?php
|
||||||
|
if (!empty($number)) {
|
||||||
|
?>
|
||||||
|
$("#number").val(<?=json_encode($number);?>);
|
||||||
|
search_tretment();
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
$(function() {
|
||||||
|
$("#add_booking").click(function() {
|
||||||
|
add_booking();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun2').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_booking();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_booking() {
|
||||||
|
|
||||||
|
tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentName = $("#tretmentName").html();
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
if (tretmentNumber.length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
emp = $("#emp_name").val();
|
||||||
|
if (emp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الفني ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
theService = $("#theService").val();
|
||||||
|
if (theService <= 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
driver = $("#driver").val();
|
||||||
|
if (driver <= 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
send_sms = $("#send_sms").val();
|
||||||
|
|
||||||
|
bundle_id = $("#bundle_name").val();
|
||||||
|
if (bundle_id == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمات المجمعة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
booking_notes = $("[name='booking_notes']").val();
|
||||||
|
booking_id = <?=json_encode($booking_id);?>;
|
||||||
|
branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
emp_id = $("#emp_name").val();
|
||||||
|
emp_name = $("#emp_name").find(":selected").text();
|
||||||
|
booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_booking_visits_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
emp_name,
|
||||||
|
tretmentNumber,
|
||||||
|
tretmentName,
|
||||||
|
booking_id,
|
||||||
|
theService,
|
||||||
|
driver,
|
||||||
|
send_sms,
|
||||||
|
booking_notes,
|
||||||
|
branch_id,
|
||||||
|
bundle_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get branch when change emplyee
|
||||||
|
$(function() {
|
||||||
|
$("#emp_name").change(function() {
|
||||||
|
var empName = $(this).val();
|
||||||
|
$.post("work/order/ajax/get_branch_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(data) {
|
||||||
|
$("#branch_vv").val(data['val']);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
87
branch.php
Normal file
87
branch.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(25);
|
||||||
|
|
||||||
|
$get_branch_sql_1 = mysqli_query($db, "SELECT
|
||||||
|
`branch`.`id`,
|
||||||
|
`branch`.`branch_name`,
|
||||||
|
`branch`.`branch_located`,
|
||||||
|
`branch`.`activation_id`
|
||||||
|
|
||||||
|
FROM `branch`
|
||||||
|
WHERE `branch`.`id` > 1
|
||||||
|
");
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid user-card">
|
||||||
|
<div class="row">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($get_branch_sql) > 0) {
|
||||||
|
while ($branch_row_1 = mysqli_fetch_assoc($get_branch_sql_1)) {
|
||||||
|
?>
|
||||||
|
<div class="col-md-6 col-lg-6 col-xl-4 box-col-6">
|
||||||
|
<div class="card custom-card">
|
||||||
|
<div class="card-header"><img class="img-fluid" src="../assets/images/user-card/1.jpg" alt=""></div>
|
||||||
|
<div class="card-profile" style="height: 80px;"></div>
|
||||||
|
<ul class="card-social">
|
||||||
|
<li><a href="javascript:void(0)"><i class="fa fa-map-marker"></i></a></li>
|
||||||
|
<li><a href="book.php?branch=<?=$branch_row_1['id']?>"><i class="fa fa-calendar"></i></a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i class="fa fa-image"></i></a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i class="fa fa-users"></i></a></li>
|
||||||
|
<li><a href="edit_branch.php?branch=<?=$branch_row_1['id']?>"><i class="fa fa-cog"></i></a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="text-center profile-details">
|
||||||
|
<h4><?=$branch_row_1['branch_name']?></h4>
|
||||||
|
<h6><?=$branch_row_1['branch_located']?></h6>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer row">
|
||||||
|
<div class="col-6 col-sm-6">
|
||||||
|
<h6>الغرف</h6>
|
||||||
|
<h3 class="counter">
|
||||||
|
<?=$branch_row_1['id']?>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 col-sm-6">
|
||||||
|
<h6>الكراسي</h6>
|
||||||
|
<h3 class="counter">
|
||||||
|
<?=$branch_row_1['id']?>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
hiiiiiiiiiiiiiii
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
204
bundle_services.php
Normal file
204
bundle_services.php
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(27);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الحجز</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="bundle_name" class="col-form-label text-right">اسم المجموعة</label>
|
||||||
|
<input id="bundle_name" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="emp_name" class="col-form-label text-right">اسم الفني</label>
|
||||||
|
<select id="emp_name" style="font-family: system-ui;" class="form-control" name="booking_car_type">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT `branch`.`branch_name` AS `br_name`, `emplyee`.`id`,`emplyee`.`name` FROM `occupation`
|
||||||
|
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `occupation`.`show_in_table_id` = 2");
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?= $emplyee_row['id'] ?>"><?= $emplyee_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_bundle">إضافة</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_bundle").click(function() {
|
||||||
|
add_bundle();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_bundle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_bundle() {
|
||||||
|
let data = {};
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مجمعة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let bundle_name = $("#bundle_name").val();
|
||||||
|
if (bundle_name == '') {
|
||||||
|
swalfun('حدث خطأ', 'يرجى كتابة اسم للمجموعة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let emp = $("#emp_name").val();
|
||||||
|
if (emp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الفني ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_bundle_services_ajax.php", {
|
||||||
|
data,
|
||||||
|
bundle_name,
|
||||||
|
tretment_id,
|
||||||
|
emp,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get branch when change emplyee
|
||||||
|
$(function() {
|
||||||
|
$("#emp_name").change(function() {
|
||||||
|
var empName = $(this).val();
|
||||||
|
$.post("work/order/ajax/get_bundle_services_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(theService) {
|
||||||
|
$("#theService").html(theService);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
20
buy_money.php
Normal file
20
buy_money.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(9);
|
||||||
|
|
||||||
|
|
||||||
|
$variable = 2;
|
||||||
|
if (!empty($_GET['m']) && $_GET['m'] == 1) {
|
||||||
|
require_once('work/files/active/3.php');
|
||||||
|
} else {
|
||||||
|
switch ($variable) {
|
||||||
|
case 2: // from frist lunch
|
||||||
|
require_once('work/files/buy_money/2.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
20
buy_pack.php
Normal file
20
buy_pack.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(9);
|
||||||
|
|
||||||
|
|
||||||
|
$variable = 2;
|
||||||
|
if (!empty($_GET['m']) && $_GET['m'] == 1) {
|
||||||
|
require_once('work/files/active/3.php');
|
||||||
|
} else {
|
||||||
|
switch ($variable) {
|
||||||
|
case 2: // from frist lunch
|
||||||
|
require_once('work/files/buy_pack/3.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
20
buy_serv.php
Normal file
20
buy_serv.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(28);
|
||||||
|
|
||||||
|
|
||||||
|
$variable = 2;
|
||||||
|
if (!empty($_GET['m']) && $_GET['m'] == 1) {
|
||||||
|
require_once('work/files/active/3.php');
|
||||||
|
} else {
|
||||||
|
switch ($variable) {
|
||||||
|
case 2: // from frist lunch
|
||||||
|
require_once('work/files/buy_serv/2.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
370
buy_servs.php
Normal file
370
buy_servs.php
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(28);
|
||||||
|
access(50);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 1) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="tap_id<?=$type_of_services['id']?>-tab" data-bs-toggle="pill" href="#tap_id<?=$type_of_services['id']?>" role="tab" aria-controls="tap_id<?=$type_of_services['id']?>" aria-selected="false"><?=$type_of_services['name']?></a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="tap_id<?=$type_of_services['id']?>" role="tabpanel" aria-labelledby="tap_id<?=$type_of_services['id']?>-tab">
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$temp_id = $type_of_services['id'];
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
WHERE `services`.`type_of_services_id` = $temp_id AND `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
||||||
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="serv_<?=$services_row['id']?>" class="col-form-label text-right">اسم الخدمة</label>
|
||||||
|
<input id="serv_<?=$services_row['id']?>" class="form-control" type="text" value="<?=$services_row['name']?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="many_<?=$services_row['id']?>" class="col-form-label text-right">العدد</label>
|
||||||
|
<input id="many_<?=$services_row['id']?>" name="how_many" data-price="<?=round(($services_row['price']) + (($services_row['price'] * 15)/100),2)?>" data-id="<?=$services_row['id']?>" class="form-control clickfun1" type="number" value="0">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_services">حساب المبلغ</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id="true_price" style="color:red">0</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_serv" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_services").click(function() {
|
||||||
|
add_services();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_services();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let total = 0;
|
||||||
|
function add_services() {
|
||||||
|
let data = {};
|
||||||
|
total = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
total = total /2;
|
||||||
|
$("#true_price").html(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// add pack
|
||||||
|
$(function() {
|
||||||
|
$("#add_serv").click(function() {
|
||||||
|
add_serv();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_serv();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_serv() {
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_temp = {};
|
||||||
|
let total_temp = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data_temp[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total_temp += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
total_temp = total_temp / 2;
|
||||||
|
if (Object.keys(data_temp).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (total_temp != total) {
|
||||||
|
swalfun('حدث خطأ', 'المبلغ المحسوب لا يتطابق', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
if (total != (cash_pay+card_pay)) {
|
||||||
|
swalfun('حدث خطأ', 'المدخلات غير متطابقة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_servs_stuck_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
data_temp,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
369
buy_servs_w.php
Normal file
369
buy_servs_w.php
Normal file
@ -0,0 +1,369 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(28);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 1) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="tap_id<?=$type_of_services['id']?>-tab" data-bs-toggle="pill" href="#tap_id<?=$type_of_services['id']?>" role="tab" aria-controls="tap_id<?=$type_of_services['id']?>" aria-selected="false"><?=$type_of_services['name']?></a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="tap_id<?=$type_of_services['id']?>" role="tabpanel" aria-labelledby="tap_id<?=$type_of_services['id']?>-tab">
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$temp_id = $type_of_services['id'];
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
WHERE `services`.`type_of_services_id` = $temp_id AND `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2 AND `services`.`id` IN (183)
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
||||||
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="serv_<?=$services_row['id']?>" class="col-form-label text-right">اسم الخدمة</label>
|
||||||
|
<input id="serv_<?=$services_row['id']?>" class="form-control" type="text" value="<?=$services_row['name']?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="many_<?=$services_row['id']?>" class="col-form-label text-right">العدد</label>
|
||||||
|
<input id="many_<?=$services_row['id']?>" name="how_many" data-price="<?=round(($services_row['price']) + (($services_row['price'] * 15)/100),2)?>" data-id="<?=$services_row['id']?>" class="form-control clickfun1" type="number" value="0">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_services">حساب المبلغ</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id="true_price" style="color:red">0</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_serv" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_services").click(function() {
|
||||||
|
add_services();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_services();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let total = 0;
|
||||||
|
function add_services() {
|
||||||
|
let data = {};
|
||||||
|
total = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
total = total /2;
|
||||||
|
$("#true_price").html(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// add pack
|
||||||
|
$(function() {
|
||||||
|
$("#add_serv").click(function() {
|
||||||
|
add_serv();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_serv();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_serv() {
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_temp = {};
|
||||||
|
let total_temp = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data_temp[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total_temp += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
total_temp = total_temp / 2;
|
||||||
|
if (Object.keys(data_temp).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (total_temp != total) {
|
||||||
|
swalfun('حدث خطأ', 'المبلغ المحسوب لا يتطابق', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
if (total != (cash_pay+card_pay)) {
|
||||||
|
swalfun('حدث خطأ', 'المدخلات غير متطابقة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_servs_stuck_w1_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
data_temp,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
423
buy_servs_wo.php
Normal file
423
buy_servs_wo.php
Normal file
@ -0,0 +1,423 @@
|
|||||||
|
<?php
|
||||||
|
require_once ('fixed/config/go_con.php');
|
||||||
|
access(28);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once ('fixed/head/go.php'); ?>
|
||||||
|
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control"
|
||||||
|
style="background-color: #086367; color:white; text-align:center; cursor: pointer;"
|
||||||
|
id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 1) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="tap_id<?= $type_of_services['id'] ?>-tab" data-bs-toggle="pill"
|
||||||
|
href="#tap_id<?= $type_of_services['id'] ?>" role="tab"
|
||||||
|
aria-controls="tap_id<?= $type_of_services['id'] ?>"
|
||||||
|
aria-selected="false"><?= $type_of_services['name'] ?></a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="tap_id<?= $type_of_services['id'] ?>" role="tabpanel"
|
||||||
|
aria-labelledby="tap_id<?= $type_of_services['id'] ?>-tab">
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$temp_id = $type_of_services['id'];
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`type_of_services`.`id` AS `t_id`,
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `services`.`type_of_services_id` = `type_of_services`.`id`
|
||||||
|
WHERE `services`.`type_of_services_id` = $temp_id AND `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
||||||
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="serv_<?= $services_row['id'] ?>" class="col-form-label text-right">اسم
|
||||||
|
الخدمة</label>
|
||||||
|
<input id="serv_<?= $services_row['id'] ?>" class="form-control" type="text"
|
||||||
|
value="<?= $services_row['name'] ?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="many_<?= $services_row['id'] ?>" class="col-form-label text-right">العدد</label>
|
||||||
|
<input id="many_<?= $services_row['id'] ?>" name="how_many"
|
||||||
|
data-t_id="<?= $services_row['t_id'] ?>"
|
||||||
|
data-price="<?= round(($services_row['price']) + (($services_row['price'] * 15) / 100), 2) ?>"
|
||||||
|
data-id="<?= $services_row['id'] ?>" class="form-control clickfun1" type="number"
|
||||||
|
value="0">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control"
|
||||||
|
style="background-color: #086367; color:white; text-align:center; cursor: pointer;"
|
||||||
|
id="add_services">حساب المبلغ</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id="true_price" style="color:red">0</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);"
|
||||||
|
class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);"
|
||||||
|
class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups"
|
||||||
|
data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups"
|
||||||
|
data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups"
|
||||||
|
data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_serv" class="form-control"
|
||||||
|
style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once ('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once ('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function () {
|
||||||
|
$("#search_tretment").click(function () {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?= json_encode($booking_branch_id); ?>;
|
||||||
|
var emp_id = <?= json_encode($emp_id); ?>;
|
||||||
|
var booking_day_date = <?= json_encode($booking_day_date); ?>;
|
||||||
|
var booking_day_time = <?= json_encode($booking_day_time); ?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function (get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
click = 0;
|
||||||
|
$(function () {
|
||||||
|
$("#add_services").click(function () {
|
||||||
|
add_services();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
add_services();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function hasDuplicates(array) {
|
||||||
|
var valuesSoFar = Object.create(null);
|
||||||
|
for (var i = 0; i < array.length; ++i) {
|
||||||
|
var value = array[i];
|
||||||
|
if (value in valuesSoFar) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
valuesSoFar[value] = true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let total = 0;
|
||||||
|
function add_services() {
|
||||||
|
let data = {};
|
||||||
|
total = 0;
|
||||||
|
t_name = [];
|
||||||
|
$("input[name='how_many']").each(function () {
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
t_name.push(parseFloat($(this).attr('data-t_id')))
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (hasDuplicates(t_name) == true) {
|
||||||
|
swalfun('حدث خطأ', 'لا يمكن اضافة اكثر من خدمة ل كل قسم', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Object.keys(data).forEach(key => {
|
||||||
|
if (key == 183) {
|
||||||
|
if (data[key] > 2) {
|
||||||
|
swalfun('حدث خطأ', 'لا اضافة اكثر من خدمتين قدم', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (data[key] > 1) {
|
||||||
|
swalfun('حدث خطأ', 'لا اضافة اكثر من خدمة واحدة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
total = total / 2;
|
||||||
|
$("#true_price").html(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// add pack
|
||||||
|
$(function () {
|
||||||
|
$("#add_serv").click(function () {
|
||||||
|
add_serv();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
add_serv();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_serv() {
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_temp = {};
|
||||||
|
let total_temp = 0;
|
||||||
|
$("input[name='how_many']").each(function () {
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data_temp[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total_temp += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
total_temp = total_temp / 2;
|
||||||
|
if (Object.keys(data_temp).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (total_temp != total) {
|
||||||
|
swalfun('حدث خطأ', 'المبلغ المحسوب لا يتطابق', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
if (total != (cash_pay + card_pay)) {
|
||||||
|
swalfun('حدث خطأ', 'المدخلات غير متطابقة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_servs_stuck_woo_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
data_temp,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
}, function (get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
369
buy_servs_woo.php
Normal file
369
buy_servs_woo.php
Normal file
@ -0,0 +1,369 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(28);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 1) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="tap_id<?=$type_of_services['id']?>-tab" data-bs-toggle="pill" href="#tap_id<?=$type_of_services['id']?>" role="tab" aria-controls="tap_id<?=$type_of_services['id']?>" aria-selected="false"><?=$type_of_services['name']?></a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="tap_id<?=$type_of_services['id']?>" role="tabpanel" aria-labelledby="tap_id<?=$type_of_services['id']?>-tab">
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$temp_id = $type_of_services['id'];
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
WHERE `services`.`type_of_services_id` = $temp_id AND `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
||||||
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="serv_<?=$services_row['id']?>" class="col-form-label text-right">اسم الخدمة</label>
|
||||||
|
<input id="serv_<?=$services_row['id']?>" class="form-control" type="text" value="<?=$services_row['name']?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="many_<?=$services_row['id']?>" class="col-form-label text-right">العدد</label>
|
||||||
|
<input id="many_<?=$services_row['id']?>" name="how_many" data-price="<?=round(($services_row['price']) + (($services_row['price'] * 15)/100),2)?>" data-id="<?=$services_row['id']?>" class="form-control clickfun1" type="number" value="0">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_services">حساب المبلغ</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id="true_price" style="color:red">0</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_serv" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_services").click(function() {
|
||||||
|
add_services();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_services();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let total = 0;
|
||||||
|
function add_services() {
|
||||||
|
let data = {};
|
||||||
|
total = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
total = Math.round((total * 0.70) * 100) / 100;
|
||||||
|
$("#true_price").html(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// add pack
|
||||||
|
$(function() {
|
||||||
|
$("#add_serv").click(function() {
|
||||||
|
add_serv();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_serv();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_serv() {
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_temp = {};
|
||||||
|
let total_temp = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
data_temp[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
total_temp += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
total_temp = Math.round((total_temp * 0.70) * 100) / 100;
|
||||||
|
if (Object.keys(data_temp).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (total_temp != total) {
|
||||||
|
swalfun('حدث خطأ', 'المبلغ المحسوب لا يتطابق', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
if (total != (cash_pay+card_pay)) {
|
||||||
|
swalfun('حدث خطأ', 'المدخلات غير متطابقة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_servs_stuck_wooo_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
data_temp,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
27
coming_soon.php
Normal file
27
coming_soon.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go.php');
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid p-0">
|
||||||
|
<div class="comingsoon auth-bg-video">
|
||||||
|
<video class="bgvideo-comingsoon" id="bgvid" poster="../assets/images/other-images/coming-soon-bg.jpg" playsinline="" autoplay="" muted="" loop="">
|
||||||
|
<source src="../assets/video/auth-bg.mp4" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
<div class="comingsoon-inner text-center"><a href="index.html"><img src="../assets/images/logo/logo-1.png" alt=""></a>
|
||||||
|
<h5>قادم قريبا</h5>
|
||||||
|
<a class="btn btn-primary" href="book.php" title="btn btn-primary" role="button">العودة لصفحة الحجوزات</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
5
composer.json
Normal file
5
composer.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"guzzlehttp/guzzle": "^7.9"
|
||||||
|
}
|
||||||
|
}
|
||||||
615
composer.lock
generated
Normal file
615
composer.lock
generated
Normal file
@ -0,0 +1,615 @@
|
|||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "7827c548fdcc7e87cb0ae341dd2c6b1b",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "guzzlehttp/guzzle",
|
||||||
|
"version": "7.9.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/guzzle/guzzle.git",
|
||||||
|
"reference": "d281ed313b989f213357e3be1a179f02196ac99b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
|
||||||
|
"reference": "d281ed313b989f213357e3be1a179f02196ac99b",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"guzzlehttp/promises": "^1.5.3 || ^2.0.3",
|
||||||
|
"guzzlehttp/psr7": "^2.7.0",
|
||||||
|
"php": "^7.2.5 || ^8.0",
|
||||||
|
"psr/http-client": "^1.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.2 || ^3.0"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/http-client-implementation": "1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||||
|
"ext-curl": "*",
|
||||||
|
"guzzle/client-integration-tests": "3.0.2",
|
||||||
|
"php-http/message-factory": "^1.1",
|
||||||
|
"phpunit/phpunit": "^8.5.39 || ^9.6.20",
|
||||||
|
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-curl": "Required for CURL handler support",
|
||||||
|
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||||
|
"psr/log": "Required for using the Log middleware"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"bamarni-bin": {
|
||||||
|
"bin-links": true,
|
||||||
|
"forward-command": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/functions_include.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"GuzzleHttp\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "hello@gjcampbell.co.uk",
|
||||||
|
"homepage": "https://github.com/GrahamCampbell"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Michael Dowling",
|
||||||
|
"email": "mtdowling@gmail.com",
|
||||||
|
"homepage": "https://github.com/mtdowling"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jeremy Lindblom",
|
||||||
|
"email": "jeremeamia@gmail.com",
|
||||||
|
"homepage": "https://github.com/jeremeamia"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "George Mponos",
|
||||||
|
"email": "gmponos@gmail.com",
|
||||||
|
"homepage": "https://github.com/gmponos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Nyholm",
|
||||||
|
"email": "tobias.nyholm@gmail.com",
|
||||||
|
"homepage": "https://github.com/Nyholm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Márk Sági-Kazár",
|
||||||
|
"email": "mark.sagikazar@gmail.com",
|
||||||
|
"homepage": "https://github.com/sagikazarmark"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Schultze",
|
||||||
|
"email": "webmaster@tubo-world.de",
|
||||||
|
"homepage": "https://github.com/Tobion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Guzzle is a PHP HTTP client library",
|
||||||
|
"keywords": [
|
||||||
|
"client",
|
||||||
|
"curl",
|
||||||
|
"framework",
|
||||||
|
"http",
|
||||||
|
"http client",
|
||||||
|
"psr-18",
|
||||||
|
"psr-7",
|
||||||
|
"rest",
|
||||||
|
"web service"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||||
|
"source": "https://github.com/guzzle/guzzle/tree/7.9.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/GrahamCampbell",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Nyholm",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-07-24T11:22:20+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "guzzlehttp/promises",
|
||||||
|
"version": "2.0.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/guzzle/promises.git",
|
||||||
|
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
|
||||||
|
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2.5 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||||
|
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"bamarni-bin": {
|
||||||
|
"bin-links": true,
|
||||||
|
"forward-command": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"GuzzleHttp\\Promise\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "hello@gjcampbell.co.uk",
|
||||||
|
"homepage": "https://github.com/GrahamCampbell"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Michael Dowling",
|
||||||
|
"email": "mtdowling@gmail.com",
|
||||||
|
"homepage": "https://github.com/mtdowling"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Nyholm",
|
||||||
|
"email": "tobias.nyholm@gmail.com",
|
||||||
|
"homepage": "https://github.com/Nyholm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Schultze",
|
||||||
|
"email": "webmaster@tubo-world.de",
|
||||||
|
"homepage": "https://github.com/Tobion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Guzzle promises library",
|
||||||
|
"keywords": [
|
||||||
|
"promise"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/guzzle/promises/issues",
|
||||||
|
"source": "https://github.com/guzzle/promises/tree/2.0.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/GrahamCampbell",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Nyholm",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-07-18T10:29:17+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "guzzlehttp/psr7",
|
||||||
|
"version": "2.7.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
|
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
|
||||||
|
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2.5 || ^8.0",
|
||||||
|
"psr/http-factory": "^1.0",
|
||||||
|
"psr/http-message": "^1.1 || ^2.0",
|
||||||
|
"ralouphie/getallheaders": "^3.0"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/http-factory-implementation": "1.0",
|
||||||
|
"psr/http-message-implementation": "1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||||
|
"http-interop/http-factory-tests": "0.9.0",
|
||||||
|
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"bamarni-bin": {
|
||||||
|
"bin-links": true,
|
||||||
|
"forward-command": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"GuzzleHttp\\Psr7\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "hello@gjcampbell.co.uk",
|
||||||
|
"homepage": "https://github.com/GrahamCampbell"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Michael Dowling",
|
||||||
|
"email": "mtdowling@gmail.com",
|
||||||
|
"homepage": "https://github.com/mtdowling"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "George Mponos",
|
||||||
|
"email": "gmponos@gmail.com",
|
||||||
|
"homepage": "https://github.com/gmponos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Nyholm",
|
||||||
|
"email": "tobias.nyholm@gmail.com",
|
||||||
|
"homepage": "https://github.com/Nyholm"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Márk Sági-Kazár",
|
||||||
|
"email": "mark.sagikazar@gmail.com",
|
||||||
|
"homepage": "https://github.com/sagikazarmark"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tobias Schultze",
|
||||||
|
"email": "webmaster@tubo-world.de",
|
||||||
|
"homepage": "https://github.com/Tobion"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Márk Sági-Kazár",
|
||||||
|
"email": "mark.sagikazar@gmail.com",
|
||||||
|
"homepage": "https://sagikazarmark.hu"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||||
|
"keywords": [
|
||||||
|
"http",
|
||||||
|
"message",
|
||||||
|
"psr-7",
|
||||||
|
"request",
|
||||||
|
"response",
|
||||||
|
"stream",
|
||||||
|
"uri",
|
||||||
|
"url"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
|
"source": "https://github.com/guzzle/psr7/tree/2.7.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/GrahamCampbell",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Nyholm",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-07-18T11:15:46+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/http-client",
|
||||||
|
"version": "1.0.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/http-client.git",
|
||||||
|
"reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
|
||||||
|
"reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.0 || ^8.0",
|
||||||
|
"psr/http-message": "^1.0 || ^2.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Http\\Client\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for HTTP clients",
|
||||||
|
"homepage": "https://github.com/php-fig/http-client",
|
||||||
|
"keywords": [
|
||||||
|
"http",
|
||||||
|
"http-client",
|
||||||
|
"psr",
|
||||||
|
"psr-18"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/http-client"
|
||||||
|
},
|
||||||
|
"time": "2023-09-23T14:17:50+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/http-factory",
|
||||||
|
"version": "1.1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/http-factory.git",
|
||||||
|
"reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
|
||||||
|
"reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1",
|
||||||
|
"psr/http-message": "^1.0 || ^2.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Http\\Message\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PSR-17: Common interfaces for PSR-7 HTTP message factories",
|
||||||
|
"keywords": [
|
||||||
|
"factory",
|
||||||
|
"http",
|
||||||
|
"message",
|
||||||
|
"psr",
|
||||||
|
"psr-17",
|
||||||
|
"psr-7",
|
||||||
|
"request",
|
||||||
|
"response"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/http-factory"
|
||||||
|
},
|
||||||
|
"time": "2024-04-15T12:06:14+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/http-message",
|
||||||
|
"version": "2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/http-message.git",
|
||||||
|
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||||
|
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2 || ^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Http\\Message\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for HTTP messages",
|
||||||
|
"homepage": "https://github.com/php-fig/http-message",
|
||||||
|
"keywords": [
|
||||||
|
"http",
|
||||||
|
"http-message",
|
||||||
|
"psr",
|
||||||
|
"psr-7",
|
||||||
|
"request",
|
||||||
|
"response"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||||
|
},
|
||||||
|
"time": "2023-04-04T09:54:51+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ralouphie/getallheaders",
|
||||||
|
"version": "3.0.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||||
|
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||||
|
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"php-coveralls/php-coveralls": "^2.1",
|
||||||
|
"phpunit/phpunit": "^5 || ^6.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/getallheaders.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Ralph Khattar",
|
||||||
|
"email": "ralph.khattar@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A polyfill for getallheaders.",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/ralouphie/getallheaders/issues",
|
||||||
|
"source": "https://github.com/ralouphie/getallheaders/tree/develop"
|
||||||
|
},
|
||||||
|
"time": "2019-03-08T08:55:37+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/deprecation-contracts",
|
||||||
|
"version": "v2.5.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
|
"reference": "80d075412b557d41002320b96a096ca65aa2c98d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d",
|
||||||
|
"reference": "80d075412b557d41002320b96a096ca65aa2c98d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "2.5-dev"
|
||||||
|
},
|
||||||
|
"thanks": {
|
||||||
|
"name": "symfony/contracts",
|
||||||
|
"url": "https://github.com/symfony/contracts"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"function.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-01-24T14:02:46+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": [],
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": [],
|
||||||
|
"platform-dev": [],
|
||||||
|
"plugin-api-version": "2.0.0"
|
||||||
|
}
|
||||||
132
coupon_active.php
Normal file
132
coupon_active.php
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(9);
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
$number = $_GET['number'];
|
||||||
|
// if come with number end
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<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">
|
||||||
|
<?php require_once('fixed/search_for_tretment/html.php'); ?>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الكوبون</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="coupon_type" class="col-form-label text-right">نوع الكوبون</label>
|
||||||
|
<select id="coupon_type" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<option value="1" data-latter="AQ-3">الماسيين المستحقين</option>
|
||||||
|
<option value="2" data-latter="AQ-4829">أولكم</option>
|
||||||
|
<option value="3" data-latter="AQ-2211">الماجد للعود</option>
|
||||||
|
<option value="4" data-latter="AQW0">مجاني أقدام 15 النسائي</option>
|
||||||
|
<option value="5" data-latter="AQR">عملاء الراجحي</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="coupon_code" class="col-form-label text-right">الكود</label>
|
||||||
|
<input id="coupon_code" class="form-control clickfun" type="text" value="">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea id="coupon_note" row="4" class="form-control" type="text"> </textarea>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12" style="margin-top:25px;">
|
||||||
|
<div id="add_coupon" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">تفعيل</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#coupon_type").change(function() {
|
||||||
|
var frist_latter = $("#coupon_type option:selected").attr('data-latter');
|
||||||
|
$("#coupon_code").val(frist_latter);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
<?php require_once('fixed/search_for_tretment/js.php'); ?>
|
||||||
|
// for limit clicks
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// add coupon
|
||||||
|
$(function() {
|
||||||
|
$("#add_coupon").click(function() {
|
||||||
|
add_coupon();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_coupon();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_coupon() {
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let coupon_id = $("#coupon_type").val();
|
||||||
|
if (coupon_id == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الكوبون ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let coupon_code = $("#coupon_code").val();
|
||||||
|
if (coupon_code == '') {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تعبة جميع الحقول ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let coupon_note = $("#coupon_note").val();
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_active_coupon_ajax.php", {
|
||||||
|
tretment_id,
|
||||||
|
coupon_id,
|
||||||
|
coupon_code,
|
||||||
|
coupon_note
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
139
coupons.php
Normal file
139
coupons.php
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(10);
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
$number = $_GET['number'];
|
||||||
|
// if come with number end
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_coupon">إضافة</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>
|
||||||
|
|
||||||
|
// for limit clicks
|
||||||
|
searchClick = 0;
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// if come with number
|
||||||
|
<?php
|
||||||
|
if (!empty($number)) {
|
||||||
|
?>
|
||||||
|
$("#number").val(<?=json_encode($number);?>);
|
||||||
|
search_tretment();
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
$(function() {
|
||||||
|
$("#add_coupon").click(function() {
|
||||||
|
add_coupon();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun2').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_coupon();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_coupon() {
|
||||||
|
|
||||||
|
tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_coupon_ajaxxx.php", {
|
||||||
|
tretment_id
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
306
custom_discount.php
Normal file
306
custom_discount.php
Normal file
@ -0,0 +1,306 @@
|
|||||||
|
<?php
|
||||||
|
require_once ('fixed/config/go_con.php');
|
||||||
|
access(72);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once ('fixed/head/go.php'); ?>
|
||||||
|
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control"
|
||||||
|
style="background-color: #086367; color:white; text-align:center; cursor: pointer;"
|
||||||
|
id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 1) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="tap_id<?= $type_of_services['id'] ?>-tab" data-bs-toggle="pill"
|
||||||
|
href="#tap_id<?= $type_of_services['id'] ?>" role="tab"
|
||||||
|
aria-controls="tap_id<?= $type_of_services['id'] ?>"
|
||||||
|
aria-selected="false"><?= $type_of_services['name'] ?></a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="tap_id<?= $type_of_services['id'] ?>" role="tabpanel"
|
||||||
|
aria-labelledby="tap_id<?= $type_of_services['id'] ?>-tab">
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$temp_id = $type_of_services['id'];
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
WHERE `services`.`type_of_services_id` = $temp_id AND `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
||||||
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="serv_<?= $services_row['id'] ?>" class="col-form-label text-right">اسم
|
||||||
|
الخدمة</label>
|
||||||
|
<input id="serv_<?= $services_row['id'] ?>" class="form-control" type="text"
|
||||||
|
value="<?= $services_row['name'] ?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="many_<?= $services_row['id'] ?>" class="col-form-label text-right">العدد</label>
|
||||||
|
<input id="many_<?= $services_row['id'] ?>" name="how_many"
|
||||||
|
data-id="<?= $services_row['id'] ?>" class="form-control clickfun" type="number" value="0"
|
||||||
|
max="12">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="type_<?= $services_row['id'] ?>" class="col-form-label text-right">نوع
|
||||||
|
الخصم</label>
|
||||||
|
<select id="type_<?= $services_row['id'] ?>" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_an_employee_offer_sql = mysqli_query($db, "SELECT `id`, `name` FROM `type_discount` WHERE `activation_id` = 2");
|
||||||
|
while ($get_an_employee_offer = mysqli_fetch_assoc($get_an_employee_offer_sql)) {
|
||||||
|
?>
|
||||||
|
<option value="<?= $get_an_employee_offer['id'] ?>"><?= $get_an_employee_offer['name'] ?>
|
||||||
|
</option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-3 col-xl-3">
|
||||||
|
<label for="d_number_<?= $services_row['id'] ?>" class="col-form-label text-right">مبلغ
|
||||||
|
الخصم
|
||||||
|
/ نسبة الخصم</label>
|
||||||
|
<input id="d_number_<?= $services_row['id'] ?>" class="form-control clickfun" type="number"
|
||||||
|
required>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="mt-0 header-title">السبب</h4>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="user_from" class="col-form-label text-right">يرجى وصف السبب كامل</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<textarea row="4" id="reason" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control"
|
||||||
|
style="background-color: #086367; color:white; text-align:center; cursor: pointer;"
|
||||||
|
id="add_custom_discount">إضافة</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>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function () {
|
||||||
|
$("#search_tretment").click(function () {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?= json_encode($booking_branch_id); ?>;
|
||||||
|
var emp_id = <?= json_encode($emp_id); ?>;
|
||||||
|
var booking_day_date = <?= json_encode($booking_day_date); ?>;
|
||||||
|
var booking_day_time = <?= json_encode($booking_day_time); ?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function (get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add_custom_discount
|
||||||
|
click = 0;
|
||||||
|
$(function () {
|
||||||
|
$("#add_custom_discount").click(function () {
|
||||||
|
add_custom_discount();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
add_custom_discount();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_custom_discount() {
|
||||||
|
let data = {};
|
||||||
|
let data_error = 0;
|
||||||
|
$("input[name='how_many']").each(function () {
|
||||||
|
if (parseInt($(this).val()) > 0) {
|
||||||
|
let q = $(this)[0].getAttribute("data-id");
|
||||||
|
let qun = $(this).val();
|
||||||
|
|
||||||
|
if (qun > 12) {
|
||||||
|
swalfun('حدث خطأ', 'لا يمكن اهداء العميل اكثر من 12 مجاني للخدمة', 'error');
|
||||||
|
data_error = 3
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($("#type_" + q).val() == 1) {
|
||||||
|
data_error = 1
|
||||||
|
}
|
||||||
|
if ($("#d_number_" + q).val() == 0 || $("#d_number_" + q).val() == '') {
|
||||||
|
data_error = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data_error == 0) {
|
||||||
|
data[q] = {
|
||||||
|
"how_many": qun,
|
||||||
|
"type": $("#type_" + q).val(),
|
||||||
|
"discount": $("#d_number_" + q).val(),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
if (data_error == 1 || data_error == 2) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى التحقق من المدخلات', 'error');
|
||||||
|
} else if(data_error == 3) {
|
||||||
|
swalfun('حدث خطأ', 'لا يمكن اهداء العميل اكثر من 12 مجاني للخدمة', 'error');
|
||||||
|
} else {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة', 'error');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let user_resone = $("#reason").val();
|
||||||
|
if (user_resone == '') {
|
||||||
|
swalfun('حدث خطأ', 'يرجى كتابة السبب', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
console.log(data)
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_custom_discount_ajax.php", {
|
||||||
|
data,
|
||||||
|
user_resone,
|
||||||
|
tretment_id,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
146
custom_reports.php
Normal file
146
custom_reports.php
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$variable = $_GET['s'];
|
||||||
|
switch ($variable) {
|
||||||
|
case '1':
|
||||||
|
require_once('work/files/reports/custom_reports/1.php');
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
require_once('work/files/reports/custom_reports/r_munif.php');
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
require_once('work/files/reports/custom_reports/r_walla.php');
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
require_once('work/files/reports/custom_reports/تقرير المشاهير.php');
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
require_once('work/files/reports/custom_reports/نسبة الاشغال.php');
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
require_once('work/files/reports/custom_reports/عدد الزيارات والتاريخ المحدد/عدد الزيارات والتاريخ المحدد.php');
|
||||||
|
break;
|
||||||
|
case '7':
|
||||||
|
require_once('work/files/reports/custom_reports/r_bader.php');
|
||||||
|
break;
|
||||||
|
case '8':
|
||||||
|
require_once('work/files/reports/custom_reports/r_nada.php');
|
||||||
|
break;
|
||||||
|
case '9':
|
||||||
|
require_once('work/files/reports/custom_reports/r_godi.php');
|
||||||
|
break;
|
||||||
|
case '10':
|
||||||
|
require_once('work/files/reports/custom_reports/2.php');
|
||||||
|
break;
|
||||||
|
case '11':
|
||||||
|
require_once('work/files/reports/custom_reports/3.php');
|
||||||
|
break;
|
||||||
|
case '12':
|
||||||
|
require_once('work/files/reports/custom_reports/4.php');
|
||||||
|
break;
|
||||||
|
case '13':
|
||||||
|
require_once('work/files/reports/custom_reports/5.php');
|
||||||
|
break;
|
||||||
|
case '14':
|
||||||
|
require_once('work/files/reports/custom_reports/6.php');
|
||||||
|
break;
|
||||||
|
case '15':
|
||||||
|
require_once('work/files/reports/custom_reports/7.php');
|
||||||
|
break;
|
||||||
|
case '16':
|
||||||
|
require_once('work/files/reports/custom_reports/8.php');
|
||||||
|
break;
|
||||||
|
case '20':
|
||||||
|
require_once('work/files/reports/custom_reports/عرض الشتاء.php');
|
||||||
|
break;
|
||||||
|
case '21':
|
||||||
|
require_once('work/files/reports/custom_reports/21.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '22':
|
||||||
|
require_once('work/files/reports/custom_reports/22.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '23':
|
||||||
|
require_once('work/files/reports/custom_reports/23.php'); // زيارات
|
||||||
|
break;
|
||||||
|
case '24':
|
||||||
|
require_once('work/files/reports/custom_reports/24.php'); // زيارات
|
||||||
|
break;
|
||||||
|
case '25':
|
||||||
|
require_once('work/files/reports/custom_reports/25.php');
|
||||||
|
break;
|
||||||
|
case '26':
|
||||||
|
require_once('work/files/reports/custom_reports/26.php');
|
||||||
|
break;
|
||||||
|
case '27':
|
||||||
|
require_once('work/files/reports/custom_reports/27.php');
|
||||||
|
break;
|
||||||
|
case '28':
|
||||||
|
require_once('work/files/reports/custom_reports/28.php');
|
||||||
|
break;
|
||||||
|
case '29':
|
||||||
|
require_once('work/files/reports/custom_reports/29.php');
|
||||||
|
break;
|
||||||
|
case '30':
|
||||||
|
require_once('work/files/reports/custom_reports/30.php');
|
||||||
|
break;
|
||||||
|
case '31':
|
||||||
|
require_once('work/files/reports/custom_reports/31.php');
|
||||||
|
break;
|
||||||
|
case '32':
|
||||||
|
require_once('work/files/reports/custom_reports/32.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '33':
|
||||||
|
require_once('work/files/reports/custom_reports/33.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '34':
|
||||||
|
require_once('work/files/reports/custom_reports/34.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '35':
|
||||||
|
require_once('work/files/reports/custom_reports/35.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '36':
|
||||||
|
require_once('work/files/reports/custom_reports/36.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '37':
|
||||||
|
require_once('work/files/reports/custom_reports/37.php'); // مالي
|
||||||
|
break;
|
||||||
|
case '38':
|
||||||
|
require_once('work/files/reports/custom_reports/38.php');
|
||||||
|
break;
|
||||||
|
case '39':
|
||||||
|
require_once('work/files/reports/custom_reports/39.php');
|
||||||
|
break;
|
||||||
|
case '40':
|
||||||
|
require_once('work/files/reports/custom_reports/40.php');
|
||||||
|
break;
|
||||||
|
case '41':
|
||||||
|
require_once('work/files/reports/custom_reports/41.php');
|
||||||
|
break;
|
||||||
|
case '42':
|
||||||
|
require_once('work/files/reports/custom_reports/42.php');
|
||||||
|
break;
|
||||||
|
case '43':
|
||||||
|
require_once('work/files/reports/custom_reports/43.php');
|
||||||
|
break;
|
||||||
|
case '44':
|
||||||
|
require_once('work/files/reports/custom_reports/43_2.php');
|
||||||
|
break;
|
||||||
|
case '46':
|
||||||
|
require_once('work/files/reports/custom_reports/46.php');
|
||||||
|
break;
|
||||||
|
case '47':
|
||||||
|
require_once('work/files/reports/custom_reports/47.php');
|
||||||
|
break;
|
||||||
|
case '48':
|
||||||
|
require_once('work/files/reports/custom_reports/48.php');
|
||||||
|
break;
|
||||||
|
}
|
||||||
586
daily_branchs_report.php
Normal file
586
daily_branchs_report.php
Normal file
@ -0,0 +1,586 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(42);
|
||||||
|
|
||||||
|
$MIX = true;
|
||||||
|
|
||||||
|
$today = date("Y-m-d");
|
||||||
|
$prev = 7;
|
||||||
|
$Day = date('D', strtotime($today));
|
||||||
|
|
||||||
|
$get_old_new = 0;
|
||||||
|
switch ($Day) {
|
||||||
|
case 'Sat':
|
||||||
|
$prev += 1;
|
||||||
|
$get_old_new = 0;
|
||||||
|
break;
|
||||||
|
case 'Sun':
|
||||||
|
$prev += 2;
|
||||||
|
$get_old_new = 1;
|
||||||
|
break;
|
||||||
|
case 'Mon':
|
||||||
|
$prev += 3;
|
||||||
|
$get_old_new = 2;
|
||||||
|
break;
|
||||||
|
case 'Tue':
|
||||||
|
$prev += 4;
|
||||||
|
$get_old_new = 3;
|
||||||
|
break;
|
||||||
|
case 'Wed':
|
||||||
|
$prev += 5;
|
||||||
|
$get_old_new = 4;
|
||||||
|
break;
|
||||||
|
case 'Thu':
|
||||||
|
$prev += 6;
|
||||||
|
$get_old_new = 5;
|
||||||
|
break;
|
||||||
|
case 'Fri':
|
||||||
|
$prev += 7;
|
||||||
|
$get_old_new = 6;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
$today = date('Y-m-d', strtotime('+1 day', strtotime($today)));
|
||||||
|
$Previous = date('Y-m-d', strtotime('-'.$prev.' day', strtotime($today)));
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$get_report_for_invoice_daily_sql = mysqli_query($db, "SELECT `date`, `id`, `total` FROM `report_for_invoice_daily` WHERE `id` <> 0 AND (`date` BETWEEN '$Previous' AND '$today') ORDER BY `date`, `report_for_invoice_daily`.`id` ASC");
|
||||||
|
if (mysqli_num_rows($get_report_for_invoice_daily_sql) > 0) {
|
||||||
|
while ($row_report_for_invoice_daily = mysqli_fetch_assoc($get_report_for_invoice_daily_sql)) {
|
||||||
|
if(!array_key_exists($row_report_for_invoice_daily['date'], $data)){
|
||||||
|
$data[$row_report_for_invoice_daily['date']] = array();
|
||||||
|
}
|
||||||
|
$data[$row_report_for_invoice_daily['date']][$row_report_for_invoice_daily['id']] = $row_report_for_invoice_daily['total'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$all = array(
|
||||||
|
'last' => array(),
|
||||||
|
'now' => array()
|
||||||
|
);
|
||||||
|
$exit_15 = array(
|
||||||
|
'last' => array(),
|
||||||
|
'now' => array()
|
||||||
|
);
|
||||||
|
$exit_7 = array(
|
||||||
|
'last' => array(),
|
||||||
|
'now' => array()
|
||||||
|
);
|
||||||
|
$exit_29 = array(
|
||||||
|
'last' => array(),
|
||||||
|
'now' => array()
|
||||||
|
);
|
||||||
|
$exit_6 = array(
|
||||||
|
'last' => array(),
|
||||||
|
'now' => array()
|
||||||
|
);
|
||||||
|
|
||||||
|
$count = 1;
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
if($count <= 7) {
|
||||||
|
array_push($all['last'], round($data[$key]['2']+$data[$key]['3']+$data[$key]['4']+$data[$key]['5'],2));
|
||||||
|
array_push($exit_15['last'], round($data[$key]['2'],2));
|
||||||
|
array_push($exit_7['last'], round($data[$key]['3'],2));
|
||||||
|
array_push($exit_29['last'], round($data[$key]['4'],2));
|
||||||
|
array_push($exit_6['last'], round($data[$key]['5'],2));
|
||||||
|
} else {
|
||||||
|
array_push($all['now'], round($data[$key]['2']+$data[$key]['3']+$data[$key]['4']+$data[$key]['5'],2));
|
||||||
|
array_push($exit_15['now'], round($data[$key]['2'],2));
|
||||||
|
array_push($exit_7['now'], round($data[$key]['3'],2));
|
||||||
|
array_push($exit_29['now'], round($data[$key]['4'],2));
|
||||||
|
array_push($exit_6['now'], round($data[$key]['5'],2));
|
||||||
|
}
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_deg(int $old, int $new)
|
||||||
|
{
|
||||||
|
global $get_old_new;
|
||||||
|
if ($old > $new) {
|
||||||
|
return round((($old - $new)/$old)*100,2);
|
||||||
|
} elseif ($old < $new) {
|
||||||
|
return round((($new - $old)/$old)*100,2);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_deg_arrow(int $old, int $new)
|
||||||
|
{
|
||||||
|
global $get_old_new;
|
||||||
|
if ($old > $new) {
|
||||||
|
return 'down';
|
||||||
|
} elseif ($old < $new) {
|
||||||
|
return 'up';
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.apexcharts-tooltip-series-group {
|
||||||
|
direction: rtl !important;
|
||||||
|
}
|
||||||
|
.apexcharts-tooltip-marker {
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@6.5.95/css/materialdesignicons.min.css">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
|
||||||
|
<div class="container-fluid chart-widget">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="card o-hidden">
|
||||||
|
<div class="chart-widget-top">
|
||||||
|
<div class="row card-body">
|
||||||
|
<div class="col-5">
|
||||||
|
<h6 class="f-w-600 font-primary">المبيعات جميع الفروع</h6><span class="num"><span><?php if(empty($all['now'][$get_old_new])) {echo get_deg($all['last'][$get_old_new - 1], $all['now'][$get_old_new - 1]);} else {echo get_deg($all['last'][$get_old_new], $all['now'][$get_old_new]);}?></span>%<i class="icon-angle-<?php if(empty($all['now'][$get_old_new])) {echo get_deg_arrow($all['last'][$get_old_new - 1], $all['now'][$get_old_new - 1]);} else {echo get_deg_arrow($all['last'][$get_old_new], $all['now'][$get_old_new]);}?> f-12"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-7 text-end">
|
||||||
|
<h4 class="num total-value"><span><?=$all['now'][count($all['now'])-1]?></span> ريال</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="chart-widget1"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3">
|
||||||
|
<div class="card o-hidden">
|
||||||
|
<div class="chart-widget-top">
|
||||||
|
<div class="row card-body">
|
||||||
|
<div class="col-5">
|
||||||
|
<h6 class="f-w-600 font-primary">المبيعات فرع 15</h6><span class="num"><span><?php if(empty($exit_15['now'][$get_old_new])) {echo get_deg($exit_15['last'][$get_old_new - 1], $exit_15['now'][$get_old_new - 1]);} else {echo get_deg($exit_15['last'][$get_old_new], $exit_15['now'][$get_old_new]);}?></span>%<i class="icon-angle-<?php if(empty($exit_15['now'][$get_old_new])) {echo get_deg_arrow($exit_15['last'][$get_old_new - 1], $exit_15['now'][$get_old_new - 1]);} else {echo get_deg_arrow($exit_15['last'][$get_old_new], $exit_15['now'][$get_old_new]);}?> f-12"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-7 text-end">
|
||||||
|
<h4 class="num total-value"><span><?=$exit_15['now'][count($exit_15['now'])-1]?></span> ريال</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="chart-widget2"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3">
|
||||||
|
<div class="card o-hidden">
|
||||||
|
<div class="chart-widget-top">
|
||||||
|
<div class="row card-body">
|
||||||
|
<div class="col-5">
|
||||||
|
<h6 class="f-w-600 font-primary">المبيعات فرع 7</h6><span class="num"><span><?php if(empty($exit_7['now'][$get_old_new])) {echo get_deg($exit_7['last'][$get_old_new - 1], $exit_7['now'][$get_old_new - 1]);} else {echo get_deg($exit_7['last'][$get_old_new], $exit_7['now'][$get_old_new]);}?></span>%<i class="icon-angle-<?php if(empty($exit_7['now'][$get_old_new])) {echo get_deg_arrow($exit_7['last'][$get_old_new - 1], $exit_7['now'][$get_old_new - 1]);} else {echo get_deg_arrow($exit_7['last'][$get_old_new], $exit_7['now'][$get_old_new]);}?> f-12"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-7 text-end">
|
||||||
|
<h4 class="num total-value"><span><?=$exit_7['now'][count($exit_7['now'])-1]?></span> ريال</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="chart-widget3"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3">
|
||||||
|
<div class="card o-hidden">
|
||||||
|
<div class="chart-widget-top">
|
||||||
|
<div class="row card-body">
|
||||||
|
<div class="col-5">
|
||||||
|
<h6 class="f-w-600 font-primary">المبيعات فرع 29</h6><span class="num"><span><?php if(empty($exit_29['now'][$get_old_new])) {echo get_deg($exit_29['last'][$get_old_new - 1], $exit_29['now'][$get_old_new - 1]);} else {echo get_deg($exit_29['last'][$get_old_new], $exit_29['now'][$get_old_new]);}?></span>%<i class="icon-angle-<?php if(empty($exit_29['now'][$get_old_new])) {echo get_deg_arrow($exit_29['last'][$get_old_new - 1], $exit_29['now'][$get_old_new - 1]);} else {echo get_deg_arrow($exit_29['last'][$get_old_new], $exit_29['now'][$get_old_new]);}?> f-12"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-7 text-end">
|
||||||
|
<h4 class="num total-value"><span><?=$exit_29['now'][count($exit_29['now'])-1]?></span> ريال</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="chart-widget4"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3">
|
||||||
|
<div class="card o-hidden">
|
||||||
|
<div class="chart-widget-top">
|
||||||
|
<div class="row card-body">
|
||||||
|
<div class="col-5">
|
||||||
|
<h6 class="f-w-600 font-primary">المبيعات فرع 6</h6><span class="num"><span><?php if(empty($exit_6['now'][$get_old_new])) {echo get_deg($exit_6['last'][$get_old_new - 1], $exit_6['now'][$get_old_new - 1]);} else {echo get_deg($exit_6['last'][$get_old_new], $exit_6['now'][$get_old_new]);}?></span>%<i class="icon-angle-<?php if(empty($exit_6['now'][$get_old_new])) {echo get_deg_arrow($exit_6['last'][$get_old_new - 1], $exit_6['now'][$get_old_new - 1]);} else {echo get_deg_arrow($exit_6['last'][$get_old_new], $exit_6['now'][$get_old_new]);}?> f-12"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-7 text-end">
|
||||||
|
<h4 class="num total-value"><span><?=$exit_6['now'][count($exit_6['now'])-1]?></span> ريال</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div id="chart-widget5"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var optionslinechart = {
|
||||||
|
chart: {
|
||||||
|
toolbar: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
height: 320,
|
||||||
|
type: 'area'
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
name: 'الاسبوع الحالي',
|
||||||
|
data: <?=json_encode($all['now'])?>,
|
||||||
|
}, {
|
||||||
|
name: 'الاسبوع الماضي',
|
||||||
|
data: <?=json_encode($all['last'])?>
|
||||||
|
}],
|
||||||
|
fill: {
|
||||||
|
colors: [vihoAdminConfig.primary, vihoAdminConfig.secondary],
|
||||||
|
type: 'gradient',
|
||||||
|
gradient: {
|
||||||
|
shade: 'light',
|
||||||
|
type: 'vertical',
|
||||||
|
shadeIntensity: 0.4,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.9,
|
||||||
|
opacityTo: 0.5,
|
||||||
|
stops: [0, 100]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
colors: [vihoAdminConfig.primary, vihoAdminConfig.secondary],
|
||||||
|
labels: ['السبت', 'الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
|
||||||
|
markers: {
|
||||||
|
size: 0
|
||||||
|
},
|
||||||
|
yaxis: [{
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
legend: {
|
||||||
|
horizontalAlign: 'right'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
shared: true,
|
||||||
|
intersect: false,
|
||||||
|
y: {
|
||||||
|
formatter: function(y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return (Math.round(y*100)/100) + " ريال ";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var chartlinechart = new ApexCharts(document.querySelector("#chart-widget1"), optionslinechart);
|
||||||
|
chartlinechart.render();
|
||||||
|
|
||||||
|
var optionslinechart = {
|
||||||
|
chart: {
|
||||||
|
toolbar: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
height: 170,
|
||||||
|
type: 'area'
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
show: false,
|
||||||
|
type: 'text',
|
||||||
|
categories: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: false,
|
||||||
|
padding: {
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: -40
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'gradient',
|
||||||
|
gradient: {
|
||||||
|
shade: 'light',
|
||||||
|
type: 'vertical',
|
||||||
|
shadeIntensity: 0.4,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.8,
|
||||||
|
opacityTo: 0.2,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: [vihoAdminConfig.primary, vihoAdminConfig.secondary],
|
||||||
|
series: [{
|
||||||
|
name: 'الاسبوع الحالي',
|
||||||
|
data: <?=json_encode($exit_15['now'])?>,
|
||||||
|
}, {
|
||||||
|
name: 'الاسبوع الماضي',
|
||||||
|
data: <?=json_encode($exit_15['last'])?>
|
||||||
|
}],
|
||||||
|
tooltip: {
|
||||||
|
x: {
|
||||||
|
format: 'dd/MM/yy'
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
formatter: function(y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return (Math.round(y*100)/100) + " ريال ";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var chartlinechart = new ApexCharts(document.querySelector("#chart-widget2"), optionslinechart);
|
||||||
|
chartlinechart.render();
|
||||||
|
|
||||||
|
var optionslinechart = {
|
||||||
|
chart: {
|
||||||
|
toolbar: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
height: 170,
|
||||||
|
type: 'area'
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
show: false,
|
||||||
|
type: 'text',
|
||||||
|
categories: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: false,
|
||||||
|
padding: {
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: -40
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'gradient',
|
||||||
|
gradient: {
|
||||||
|
shade: 'light',
|
||||||
|
type: 'vertical',
|
||||||
|
shadeIntensity: 0.4,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.8,
|
||||||
|
opacityTo: 0.2,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: [vihoAdminConfig.primary, vihoAdminConfig.secondary],
|
||||||
|
series: [{
|
||||||
|
name: 'الاسبوع الحالي',
|
||||||
|
data: <?=json_encode($exit_7['now'])?>,
|
||||||
|
}, {
|
||||||
|
name: 'الاسبوع الماضي',
|
||||||
|
data: <?=json_encode($exit_7['last'])?>
|
||||||
|
}],
|
||||||
|
tooltip: {
|
||||||
|
x: {
|
||||||
|
format: 'dd/MM/yy'
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
formatter: function(y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return (Math.round(y*100)/100) + " ريال ";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var chartlinechart = new ApexCharts(document.querySelector("#chart-widget3"), optionslinechart);
|
||||||
|
chartlinechart.render();
|
||||||
|
|
||||||
|
var optionslinechart = {
|
||||||
|
chart: {
|
||||||
|
toolbar: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
height: 170,
|
||||||
|
type: 'area'
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
show: false,
|
||||||
|
type: 'text',
|
||||||
|
categories: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: false,
|
||||||
|
padding: {
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: -40
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'gradient',
|
||||||
|
gradient: {
|
||||||
|
shade: 'light',
|
||||||
|
type: 'vertical',
|
||||||
|
shadeIntensity: 0.4,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.8,
|
||||||
|
opacityTo: 0.2,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: [vihoAdminConfig.primary, vihoAdminConfig.secondary],
|
||||||
|
series: [{
|
||||||
|
name: 'الاسبوع الحالي',
|
||||||
|
data: <?=json_encode($exit_29['now'])?>,
|
||||||
|
}, {
|
||||||
|
name: 'الاسبوع الماضي',
|
||||||
|
data: <?=json_encode($exit_29['last'])?>
|
||||||
|
}],
|
||||||
|
tooltip: {
|
||||||
|
x: {
|
||||||
|
format: 'dd/MM/yy'
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
formatter: function(y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return (Math.round(y*100)/100) + " ريال ";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var chartlinechart = new ApexCharts(document.querySelector("#chart-widget4"), optionslinechart);
|
||||||
|
chartlinechart.render();
|
||||||
|
|
||||||
|
var optionslinechart = {
|
||||||
|
chart: {
|
||||||
|
toolbar: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
height: 170,
|
||||||
|
type: 'area'
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth'
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
show: false,
|
||||||
|
type: 'text',
|
||||||
|
categories: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: false,
|
||||||
|
padding: {
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: -40
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'gradient',
|
||||||
|
gradient: {
|
||||||
|
shade: 'light',
|
||||||
|
type: 'vertical',
|
||||||
|
shadeIntensity: 0.4,
|
||||||
|
inverseColors: false,
|
||||||
|
opacityFrom: 0.8,
|
||||||
|
opacityTo: 0.2,
|
||||||
|
stops: [0, 100]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: [vihoAdminConfig.primary, vihoAdminConfig.secondary],
|
||||||
|
series: [{
|
||||||
|
name: 'الاسبوع الحالي',
|
||||||
|
data: <?=json_encode($exit_6['now'])?>,
|
||||||
|
}, {
|
||||||
|
name: 'الاسبوع الماضي',
|
||||||
|
data: <?=json_encode($exit_6['last'])?>
|
||||||
|
}],
|
||||||
|
tooltip: {
|
||||||
|
x: {
|
||||||
|
format: 'dd/MM/yy'
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
formatter: function(y) {
|
||||||
|
if (typeof y !== "undefined") {
|
||||||
|
return (Math.round(y*100)/100) + " ريال ";
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var chartlinechart = new ApexCharts(document.querySelector("#chart-widget5"), optionslinechart);
|
||||||
|
chartlinechart.render();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
28
daily_branchs_report_old.php
Normal file
28
daily_branchs_report_old.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(67);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$variable = 3;
|
||||||
|
switch ($variable) {
|
||||||
|
case '1':
|
||||||
|
require_once('work/files/reports/daily_branchs_report_old/1.php');
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
require_once('work/files/reports/daily_branchs_report_old/2.php');
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
require_once('work/files/reports/daily_branchs_report_old/3.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
# code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
545
daily_deficits.php
Normal file
545
daily_deficits.php
Normal file
@ -0,0 +1,545 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(30);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$c_r_id = $_GET['c'];
|
||||||
|
if (!empty($_GET['c'])) {
|
||||||
|
$c_r_id = $_GET['c'];
|
||||||
|
if (!is_numeric($c_r_id)) {
|
||||||
|
$c_r_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$c_r_id = 1;
|
||||||
|
}
|
||||||
|
$c_r_id_sql = '='.$c_r_id;
|
||||||
|
if ($c_r_id == 1) {
|
||||||
|
$c_r_id_sql = '<>'.$c_r_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
if (!empty($_GET['f'])) {
|
||||||
|
if (is_numeric($c_r_id) && $_GET['f'] == 1) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$branch_sql = '='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>'.$branch_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$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;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
|
||||||
|
$get_invoices_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`user`.`name`, `branch`.`branch_name`, `invoices_details`.`invoices_status_id`, `invoices_details_has_how_pay`.`user_id`, `invoices_details`.`branch_id`, `invoices_details_has_how_pay`.`how_pay_id`, SUM(`invoices_details_has_how_pay`.`pay`) AS `pay`, COUNT(`invoices`.`id`) AS `count`
|
||||||
|
FROM `invoices_details_has_how_pay`
|
||||||
|
INNER JOIN `invoices_details` ON `invoices_details_has_how_pay`.`invoices_details_id` = `invoices_details`.`id`
|
||||||
|
INNER JOIN `invoices` ON `invoices_details`.`invoices_id` = `invoices`.`id`
|
||||||
|
INNER JOIN `user` ON `invoices_details_has_how_pay`.`user_id` = `user`.`id`
|
||||||
|
INNER JOIN `branch` ON `invoices_details`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE ((`invoices_details_has_how_pay`.`date_time` LIKE '$today%' AND `invoices_details_has_how_pay`.`date_time` >= '$today 03:00:00') OR (`invoices_details_has_how_pay`.`date_time` LIKE '$Next%' AND `invoices_details_has_how_pay`.`date_time` < '$Next 03:00:00'))
|
||||||
|
AND `branch`.`id` $branch_sql
|
||||||
|
AND `branch`.`commercial_register_id` $c_r_id_sql
|
||||||
|
GROUP BY `invoices_details_has_how_pay`.`user_id`,
|
||||||
|
`invoices_details`.`branch_id`,
|
||||||
|
`invoices_details`.`invoices_status_id`,
|
||||||
|
`invoices_details_has_how_pay`.`how_pay_id`
|
||||||
|
ORDER BY `invoices_details`.`branch_id`
|
||||||
|
");
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
||||||
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
||||||
|
$data[$get_invoices['user_id']]['info']['name'] = $get_invoices['name'];
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['info']['name'] = $get_invoices['branch_name'];
|
||||||
|
switch ($get_invoices['invoices_status_id']) {
|
||||||
|
case '1': case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '6': case '7': case '8': case '9':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_invoices_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`user`.`name`, `branch`.`branch_name`, `bonds_details`.`bonds_status_id`, `bonds_details_has_how_pay`.`user_id`, `bonds_details`.`branch_id`, `bonds_details_has_how_pay`.`how_pay_id`, SUM(`bonds_details_has_how_pay`.`pay`) AS `pay`, COUNT(`bonds`.`id`) AS `count`
|
||||||
|
FROM `bonds_details_has_how_pay`
|
||||||
|
INNER JOIN `bonds_details` ON `bonds_details_has_how_pay`.`bonds_details_id` = `bonds_details`.`id`
|
||||||
|
INNER JOIN `bonds` ON `bonds_details`.`bonds_id` = `bonds`.`id`
|
||||||
|
INNER JOIN `user` ON `bonds_details_has_how_pay`.`user_id` = `user`.`id`
|
||||||
|
INNER JOIN `branch` ON `bonds_details`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE ((`bonds_details_has_how_pay`.`date_time` LIKE '$today%' AND `bonds_details_has_how_pay`.`date_time` >= '$today 03:00:00') OR (`bonds_details_has_how_pay`.`date_time` LIKE '$Next%' AND `bonds_details_has_how_pay`.`date_time` < '$Next 03:00:00'))
|
||||||
|
AND `branch`.`id` $branch_sql
|
||||||
|
AND `branch`.`commercial_register_id` $c_r_id_sql
|
||||||
|
GROUP BY `bonds_details_has_how_pay`.`user_id`,
|
||||||
|
`bonds_details`.`branch_id`,
|
||||||
|
`bonds_details`.`bonds_status_id`,
|
||||||
|
`bonds_details_has_how_pay`.`how_pay_id`
|
||||||
|
ORDER BY `bonds_details`.`branch_id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
||||||
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
||||||
|
$data[$get_invoices['user_id']]['info']['name'] = $get_invoices['name'];
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['info']['name'] = $get_invoices['branch_name'];
|
||||||
|
switch ($get_invoices['bonds_status_id']) {
|
||||||
|
case '1': case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '6': case '7': case '8': case '9': case '10':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
tr {
|
||||||
|
border-color: #bfbbbb !important;
|
||||||
|
}
|
||||||
|
.table-bordered td, .table-bordered th {
|
||||||
|
border-color: #bfbbbb !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@6.5.95/css/materialdesignicons.min.css">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<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 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 1){echo 'active';}?> ?>" data-toggle="pill" href="#cr_1" aria-selected="false" onclick="window.location='daily_deficits?date=<?=$today?>&b=<?=$branch_id?>&c=1&f=1'">الكل</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 2){echo 'active';}?> ?>" data-toggle="pill" href="#cr_2" aria-selected="false" onclick="window.location='daily_deficits?date=<?=$today?>&b=<?=$branch_id?>&c=2&f=1'">القسم الرجالي</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 3){echo 'active';}?> ?>" data-toggle="pill" href="#cr_3" aria-selected="false" onclick="window.location='daily_deficits?date=<?=$today?>&b=<?=$branch_id?>&c=3&f=1'">القسم النسائي</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 4){echo 'active';}?> ?>" data-toggle="pill" href="#cr_4" aria-selected="false" onclick="window.location='daily_deficits?date=<?=$today?>&b=<?=$branch_id?>&c=4&f=1'">القسم الزيارات</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 5){echo 'active';}?> ?>" data-toggle="pill" href="#cr_5" aria-selected="false" onclick="window.location='daily_deficits?date=<?=$today?>&b=<?=$branch_id?>&c=5&f=1'">القسم الطبيعي</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`
|
||||||
|
WHERE `commercial_register`.`id` $c_r_id_sql
|
||||||
|
OR `branch`.`id` = 1
|
||||||
|
");
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if($branch_id == $commercial_register['id']){echo 'active';}?> ?>" data-toggle="pill" href="#branch-<?=$commercial_register['id']?>" aria-selected="false" onclick="window.location='daily_deficits?date=<?=$today?>&b=<?=$commercial_register['id']?>&c=<?=$c_r_id?>'"><?=$commercial_register['branch_name']?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<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">
|
||||||
|
</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="daily_deficits?date=<?= $Previous ?>&b=<?= $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="daily_deficits?date=<?= $Next ?>&b=<?= $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>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
|
||||||
|
</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">
|
||||||
|
عدد الأخطاء
|
||||||
|
<?=$error?>
|
||||||
|
<table class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2" scope="col">#</th>
|
||||||
|
<th rowspan="2" scope="col">اسم الموظف</th>
|
||||||
|
<th rowspan="2" scope="col">الفرع</th>
|
||||||
|
<th colspan="4" scope="col">الاستقبال</th>
|
||||||
|
<th colspan="4" scope="col">العجوزات</th>
|
||||||
|
</tr>
|
||||||
|
<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>
|
||||||
|
<th scope="col">عجز التحويل</th>
|
||||||
|
<th scope="col">اجمالي العجز / الزيادة</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$count = 1;
|
||||||
|
$t1_1 = 0;
|
||||||
|
$t1_2 = 0;
|
||||||
|
$t1_3 = 0;
|
||||||
|
$t1_4 = 0;
|
||||||
|
$t1_5 = 0;
|
||||||
|
$t1_2_4 = 0;
|
||||||
|
|
||||||
|
$t2_1 = 0;
|
||||||
|
$t2_2 = 0;
|
||||||
|
$t2_3 = 0;
|
||||||
|
$t2_4 = 0;
|
||||||
|
$t2_5 = 0;
|
||||||
|
$t2_2_3 = 0;
|
||||||
|
|
||||||
|
$t3_1 = 0;
|
||||||
|
$t3_2 = 0;
|
||||||
|
$t3_3 = 0;
|
||||||
|
$t3_4 = 0;
|
||||||
|
$t3_5 = 0;
|
||||||
|
$t3_2_4 = 0;
|
||||||
|
|
||||||
|
$t4_1 = 0;
|
||||||
|
$t4_2 = 0;
|
||||||
|
$t4_3 = 0;
|
||||||
|
$t4_4 = 0;
|
||||||
|
$t4_5 = 0;
|
||||||
|
$t4_2_3 = 0;
|
||||||
|
|
||||||
|
$t5_1 = 0;
|
||||||
|
$t5_2 = 0;
|
||||||
|
$t5_3 = 0;
|
||||||
|
$t5_4 = 0;
|
||||||
|
$t5_5 = 0;
|
||||||
|
$t5_2_4 = 0;
|
||||||
|
|
||||||
|
$s1 = 0;
|
||||||
|
$s2 = 0;
|
||||||
|
$s3 = 0;
|
||||||
|
$s4 = 0;
|
||||||
|
|
||||||
|
$Zeroo = 0;
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
foreach ($data[$key]['branchs'] as $key2 => $value2) {
|
||||||
|
|
||||||
|
// every 5 is not add in total
|
||||||
|
|
||||||
|
$t1_1_temp = round($data[$key]['branchs'][$key2]['inv']['count']);
|
||||||
|
$t1_2_temp = round($data[$key]['branchs'][$key2]['inv']['cash'],2);
|
||||||
|
$t1_3_temp = round($data[$key]['branchs'][$key2]['inv']['card'],2);
|
||||||
|
$t1_4_temp = round($data[$key]['branchs'][$key2]['inv']['trans'],2);
|
||||||
|
$t1_5_temp = round($data[$key]['branchs'][$key2]['inv']['else'],2);
|
||||||
|
$t2_4_total = $t1_2_temp + $t1_3_temp + $t1_4_temp;
|
||||||
|
$inv_stuck = round($data[$key]['branchs'][$key2]['inv']['stuck'],2);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$t2_1_temp = round(($data[$key]['branchs'][$key2]['inv_back']['count']));
|
||||||
|
$t2_2_temp = round((($data[$key]['branchs'][$key2]['inv_back']['cash'])),2);
|
||||||
|
$t2_3_temp = round((($data[$key]['branchs'][$key2]['inv_back']['card'])),2);
|
||||||
|
$t2_4_temp = round((($data[$key]['branchs'][$key2]['inv_back']['trans'])),2);
|
||||||
|
$t2_5_temp = round((($data[$key]['branchs'][$key2]['inv_back']['else'])),2);
|
||||||
|
// مرتجع لرصيد
|
||||||
|
$inv_back_stuck = round((($data[$key]['branchs'][$key2]['inv_back']['stuck'])),2);
|
||||||
|
// التحويل لا يتم خصمة من المتحصلات
|
||||||
|
$t6_7_total = $t2_2_temp + $t2_3_temp;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$t3_1_temp = round($data[$key]['branchs'][$key2]['bonds']['count']);
|
||||||
|
$t3_2_temp = round($data[$key]['branchs'][$key2]['bonds']['cash'],2);
|
||||||
|
$t3_3_temp = round($data[$key]['branchs'][$key2]['bonds']['card'],2);
|
||||||
|
$t3_4_temp = round($data[$key]['branchs'][$key2]['bonds']['trans'],2);
|
||||||
|
$t3_5_temp = round($data[$key]['branchs'][$key2]['bonds']['else'],2);
|
||||||
|
$t10_12_total = $t3_2_temp + $t3_3_temp + $t3_4_temp;
|
||||||
|
$bonds_stuck = round($data[$key]['branchs'][$key2]['bonds']['stuck'],2);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$t4_1_temp = round($data[$key]['branchs'][$key2]['bonds_back']['count']);
|
||||||
|
$t4_2_temp = round($data[$key]['branchs'][$key2]['bonds_back']['cash'],2);
|
||||||
|
$t4_3_temp = round($data[$key]['branchs'][$key2]['bonds_back']['card'],2);
|
||||||
|
$t4_4_temp = round($data[$key]['branchs'][$key2]['bonds_back']['trans'],2);
|
||||||
|
$t4_5_temp = round($data[$key]['branchs'][$key2]['bonds_back']['else'],2);
|
||||||
|
// مرتجع لرصيد
|
||||||
|
$bonds_back_stuck = round($data[$key]['branchs'][$key2]['bonds_back']['stuck'],2);
|
||||||
|
// التحويل لا يتم خصمة من المتحصلات
|
||||||
|
$t14_15_total = $t4_2_temp + $t4_3_temp;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$t5_1_temp = $t1_1_temp + $t2_1_temp + $t3_1_temp + $t4_1_temp;
|
||||||
|
$t5_2_temp = ($t1_2_temp - $t2_2_temp) + ($t3_2_temp - $t4_2_temp);
|
||||||
|
$t5_3_temp = ($t1_3_temp - $t2_3_temp) + ($t3_3_temp - $t4_3_temp);
|
||||||
|
$t5_4_temp = $t1_4_temp + $t3_4_temp;
|
||||||
|
$t5_5_temp = ($t1_5_temp - $t2_5_temp) + ($t3_5_temp - $t4_5_temp);
|
||||||
|
$t18_20_total = $t5_2_temp + $t5_3_temp + $t5_4_temp;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$s1_temp = $t2_4_total;
|
||||||
|
$s2_temp = $inv_stuck;
|
||||||
|
$s3_temp = $t2_2_temp + $t2_3_temp + $t2_4_temp + $inv_back_stuck;
|
||||||
|
$s4_temp = ($s1_temp + $s2_temp) - $s3_temp;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$count?></th>
|
||||||
|
<td><a href="daily_user_d?u=<?=$key?>&d=<?=$today?>"><?=$data[$key]['info']['name']?></a></td>
|
||||||
|
<td rowspan="1"><?=$data[$key]['branchs'][$key2]['info']['name']?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?=$t5_2_temp?></td>
|
||||||
|
<td><?=$t5_3_temp?></td>
|
||||||
|
<td><?=$t5_4_temp?></td>
|
||||||
|
<td><b><?=$t18_20_total?></b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$t1_1 += $t1_1_temp;
|
||||||
|
$t1_2 += $t1_2_temp;
|
||||||
|
$t1_3 += $t1_3_temp;
|
||||||
|
$t1_4 += $t1_4_temp;
|
||||||
|
$t1_5 += $t1_5_temp;
|
||||||
|
$t1_2_4 += $t2_4_total;
|
||||||
|
|
||||||
|
$t2_1 += $t2_1_temp;
|
||||||
|
$t2_2 += $t2_2_temp;
|
||||||
|
$t2_3 += $t2_3_temp;
|
||||||
|
$t2_4 += $t2_4_temp;
|
||||||
|
$t2_5 += $t2_5_temp;
|
||||||
|
$t2_2_3 += $t6_7_total;
|
||||||
|
|
||||||
|
$t3_1 += $t3_1_temp;
|
||||||
|
$t3_2 += $t3_2_temp;
|
||||||
|
$t3_3 += $t3_3_temp;
|
||||||
|
$t3_4 += $t3_4_temp;
|
||||||
|
$t3_5 += $t3_5_temp;
|
||||||
|
$t3_2_4 += $t10_12_total;
|
||||||
|
|
||||||
|
$t4_1 += $t4_1_temp;
|
||||||
|
$t4_2 += $t4_2_temp;
|
||||||
|
$t4_3 += $t4_3_temp;
|
||||||
|
$t4_4 += $t4_4_temp;
|
||||||
|
$t4_5 += $t4_5_temp;
|
||||||
|
$t4_2_3 += $t14_15_total;
|
||||||
|
|
||||||
|
$t5_1 += $t5_1_temp;
|
||||||
|
$t5_2 += $t5_2_temp;
|
||||||
|
$t5_3 += $t5_3_temp;
|
||||||
|
$t5_4 += $t5_4_temp;
|
||||||
|
$t5_5 += $t5_5_temp;
|
||||||
|
$t5_2_4 += $t18_20_total;
|
||||||
|
|
||||||
|
$s1 += $s1_temp;
|
||||||
|
$s2 += $s2_temp;
|
||||||
|
$s3 += $s3_temp;
|
||||||
|
$s4 += $s4_temp;
|
||||||
|
}
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="6" colspan="3">المجموع الكلي</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?=$t5_2?></td>
|
||||||
|
<td><?=$t5_3?></td>
|
||||||
|
<td><?=$t5_4?></td>
|
||||||
|
<td><?=$t5_2_4?></td>
|
||||||
|
</tr>
|
||||||
|
</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 = 'daily_deficits?b=<?= $branch_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
35
daily_user.php
Normal file
35
daily_user.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(30);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET['m'] == 50) {
|
||||||
|
require_once('work/files/reports/daily_user/t_1.php');
|
||||||
|
} else {
|
||||||
|
if (strtotime($today) < strtotime('2023-01-01 00:00:00')) {
|
||||||
|
require_once('work/files/reports/daily_user/1.php');
|
||||||
|
}
|
||||||
|
// else if (strtotime($today) < strtotime('2023-01-12 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/daily_user/2.php');
|
||||||
|
// }
|
||||||
|
// else if (strtotime($today) < strtotime('2023-01-30 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/daily_user/4.php');
|
||||||
|
// }
|
||||||
|
// else if (strtotime($today) < strtotime('2023-07-01 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/daily_user/6.php');
|
||||||
|
// }
|
||||||
|
else {
|
||||||
|
// require_once('work/files/reports/daily_user/5.php');
|
||||||
|
require_once('work/files/reports/daily_user/7.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
22
daily_user_d.php
Normal file
22
daily_user_d.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(30);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strtotime($today) < strtotime('2023-01-01 00:00:00')) {
|
||||||
|
require_once('work/files/reports/daily_user_d/1.php');
|
||||||
|
}
|
||||||
|
// else if (strtotime($today) < strtotime('2023-07-01 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/daily_user_d/1.php');
|
||||||
|
// }
|
||||||
|
else {
|
||||||
|
require_once('work/files/reports/daily_user_d/2.php');
|
||||||
|
}
|
||||||
|
|
||||||
518
daily_user_new.php
Normal file
518
daily_user_new.php
Normal file
@ -0,0 +1,518 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(30);
|
||||||
|
|
||||||
|
$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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$c_r_id = $_GET['c'];
|
||||||
|
if (!empty($_GET['c'])) {
|
||||||
|
$c_r_id = $_GET['c'];
|
||||||
|
if (!is_numeric($c_r_id)) {
|
||||||
|
$c_r_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$c_r_id = 1;
|
||||||
|
}
|
||||||
|
$c_r_id_sql = '='.$c_r_id;
|
||||||
|
if ($c_r_id == 1) {
|
||||||
|
$c_r_id_sql = '<>'.$c_r_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
if (!empty($_GET['f'])) {
|
||||||
|
if (is_numeric($c_r_id) && $_GET['f'] == 1) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$branch_sql = '='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>'.$branch_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$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;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
|
||||||
|
$get_invoices_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`user`.`name`, `branch`.`branch_name`, `invoices_details`.`invoices_status_id`, `invoices_details_has_how_pay`.`user_id`, `invoices_details`.`branch_id`, `invoices_details_has_how_pay`.`how_pay_id`, SUM(`invoices_details_has_how_pay`.`pay`) AS `pay`, COUNT(`invoices`.`id`) AS `count`
|
||||||
|
FROM `invoices_details_has_how_pay`
|
||||||
|
INNER JOIN `invoices_details` ON `invoices_details_has_how_pay`.`invoices_details_id` = `invoices_details`.`id`
|
||||||
|
INNER JOIN `invoices` ON `invoices_details`.`invoices_id` = `invoices`.`id`
|
||||||
|
INNER JOIN `user` ON `invoices_details_has_how_pay`.`user_id` = `user`.`id`
|
||||||
|
INNER JOIN `branch` ON `invoices_details`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE ((`invoices_details_has_how_pay`.`date_time` LIKE '$today%' AND `invoices_details_has_how_pay`.`date_time` >= '$today 03:00:00') OR (`invoices_details_has_how_pay`.`date_time` LIKE '$Next%' AND `invoices_details_has_how_pay`.`date_time` < '$Next 03:00:00'))
|
||||||
|
AND `branch`.`id` $branch_sql
|
||||||
|
AND `branch`.`commercial_register_id` $c_r_id_sql
|
||||||
|
GROUP BY `invoices_details_has_how_pay`.`user_id`,
|
||||||
|
`invoices_details`.`branch_id`,
|
||||||
|
`invoices_details`.`invoices_status_id`,
|
||||||
|
`invoices_details_has_how_pay`.`how_pay_id`
|
||||||
|
ORDER BY `invoices_details`.`branch_id`
|
||||||
|
");
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
||||||
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
||||||
|
$data[$get_invoices['user_id']]['info']['name'] = $get_invoices['name'];
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['info']['name'] = $get_invoices['branch_name'];
|
||||||
|
switch ($get_invoices['invoices_status_id']) {
|
||||||
|
case '1': case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '6': case '7': case '8': case '9':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['inv_back']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_invoices_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`user`.`name`, `branch`.`branch_name`, `bonds_details`.`bonds_status_id`, `bonds_details_has_how_pay`.`user_id`, `bonds_details`.`branch_id`, `bonds_details_has_how_pay`.`how_pay_id`, SUM(`bonds_details_has_how_pay`.`pay`) AS `pay`, COUNT(`bonds`.`id`) AS `count`
|
||||||
|
FROM `bonds_details_has_how_pay`
|
||||||
|
INNER JOIN `bonds_details` ON `bonds_details_has_how_pay`.`bonds_details_id` = `bonds_details`.`id`
|
||||||
|
INNER JOIN `bonds` ON `bonds_details`.`bonds_id` = `bonds`.`id`
|
||||||
|
INNER JOIN `user` ON `bonds_details_has_how_pay`.`user_id` = `user`.`id`
|
||||||
|
INNER JOIN `branch` ON `bonds_details`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE ((`bonds_details_has_how_pay`.`date_time` LIKE '$today%' AND `bonds_details_has_how_pay`.`date_time` >= '$today 03:00:00') OR (`bonds_details_has_how_pay`.`date_time` LIKE '$Next%' AND `bonds_details_has_how_pay`.`date_time` < '$Next 03:00:00'))
|
||||||
|
AND `branch`.`id` $branch_sql
|
||||||
|
AND `branch`.`commercial_register_id` $c_r_id_sql
|
||||||
|
GROUP BY `bonds_details_has_how_pay`.`user_id`,
|
||||||
|
`bonds_details`.`branch_id`,
|
||||||
|
`bonds_details`.`bonds_status_id`,
|
||||||
|
`bonds_details_has_how_pay`.`how_pay_id`
|
||||||
|
ORDER BY `bonds_details`.`branch_id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
||||||
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
||||||
|
$data[$get_invoices['user_id']]['info']['name'] = $get_invoices['name'];
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['info']['name'] = $get_invoices['branch_name'];
|
||||||
|
switch ($get_invoices['bonds_status_id']) {
|
||||||
|
case '1': case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '6': case '7': case '8': case '9': case '10':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['count'] += $get_invoices['count'];
|
||||||
|
switch ($get_invoices['how_pay_id']) {
|
||||||
|
case '1':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['cash'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['card'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '3': case '4':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['stuck'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['trans'] += $get_invoices['pay'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$data[$get_invoices['user_id']]['branchs'][$get_invoices['branch_id']]['bonds_back']['else'] += $get_invoices['pay'];
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$error++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
tr {
|
||||||
|
border-color: #bfbbbb !important;
|
||||||
|
}
|
||||||
|
.table-bordered td, .table-bordered th {
|
||||||
|
border-color: #bfbbbb !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@mdi/font@6.5.95/css/materialdesignicons.min.css">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<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 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 1){echo 'active';}?> ?>" data-toggle="pill" href="#cr_1" aria-selected="false" onclick="window.location='daily_user_new?date=<?=$today?>&b=<?=$branch_id?>&c=1&f=1'">الكل</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 2){echo 'active';}?> ?>" data-toggle="pill" href="#cr_2" aria-selected="false" onclick="window.location='daily_user_new?date=<?=$today?>&b=<?=$branch_id?>&c=2&f=1'">القسم الرجالي</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 3){echo 'active';}?> ?>" data-toggle="pill" href="#cr_3" aria-selected="false" onclick="window.location='daily_user_new?date=<?=$today?>&b=<?=$branch_id?>&c=3&f=1'">القسم النسائي</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 4){echo 'active';}?> ?>" data-toggle="pill" href="#cr_4" aria-selected="false" onclick="window.location='daily_user_new?date=<?=$today?>&b=<?=$branch_id?>&c=4&f=1'">القسم الزيارات</a>
|
||||||
|
<a class="nav-link mb-0 <?php if($c_r_id == 5){echo 'active';}?> ?>" data-toggle="pill" href="#cr_5" aria-selected="false" onclick="window.location='daily_user_new?date=<?=$today?>&b=<?=$branch_id?>&c=5&f=1'">القسم الطبيعي</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`
|
||||||
|
WHERE `commercial_register`.`id` $c_r_id_sql
|
||||||
|
OR `branch`.`id` = 1
|
||||||
|
");
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if($branch_id == $commercial_register['id']){echo 'active';}?> ?>" data-toggle="pill" href="#branch-<?=$commercial_register['id']?>" aria-selected="false" onclick="window.location='daily_user_new?date=<?=$today?>&b=<?=$commercial_register['id']?>&c=<?=$c_r_id?>'"><?=$commercial_register['branch_name']?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<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">
|
||||||
|
</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="daily_user_new?date=<?= $Previous ?>&b=<?= $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="daily_user_new?date=<?= $Next ?>&b=<?= $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>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
|
||||||
|
</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">
|
||||||
|
عدد الأخطاء
|
||||||
|
<?=$error?>
|
||||||
|
<table class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2" scope="col">#</th>
|
||||||
|
<th rowspan="2" scope="col">اسم الموظف</th>
|
||||||
|
<th rowspan="2" scope="col">الفرع</th>
|
||||||
|
<th rowspan="2" scope="col">بيان</th>
|
||||||
|
<th rowspan="2" scope="col">عدد العمليات</th>
|
||||||
|
<th colspan="7" scope="col">المتحصلات اليومية</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">كاش</th>
|
||||||
|
<th scope="col">شبكة</th>
|
||||||
|
<th scope="col">تحويل</th>
|
||||||
|
<th scope="col">اخرى</th>
|
||||||
|
<th scope="col">اجمالي المتحصلات غير شامل الضريبة</th>
|
||||||
|
<th scope="col">الضريبة 15%</th>
|
||||||
|
<th scope="col">إجمالي المتحصلات بالضريبة</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$count = 1;
|
||||||
|
$t1_1 = 0;
|
||||||
|
$t1_2 = 0;
|
||||||
|
$t1_3 = 0;
|
||||||
|
$t1_4 = 0;
|
||||||
|
$t1_5 = 0;
|
||||||
|
$t1_2_4 = 0;
|
||||||
|
|
||||||
|
$t3_1 = 0;
|
||||||
|
$t3_2 = 0;
|
||||||
|
$t3_3 = 0;
|
||||||
|
$t3_4 = 0;
|
||||||
|
$t3_5 = 0;
|
||||||
|
$t3_2_4 = 0;
|
||||||
|
|
||||||
|
$t5_1 = 0;
|
||||||
|
$t5_2 = 0;
|
||||||
|
$t5_3 = 0;
|
||||||
|
$t5_4 = 0;
|
||||||
|
$t5_5 = 0;
|
||||||
|
$t5_2_4 = 0;
|
||||||
|
|
||||||
|
$Zeroo = 0;
|
||||||
|
foreach ($data as $key => $value) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th rowspan="<?=count($data[$key]['branchs'])*3?>" scope="row"><?=$count?></th>
|
||||||
|
<td rowspan="<?=count($data[$key]['branchs'])*3?>"><a href="daily_user_new_d?u=<?=$key?>&d=<?=$today?>"><?=$data[$key]['info']['name']?></a></td>
|
||||||
|
<?php
|
||||||
|
foreach ($data[$key]['branchs'] as $key2 => $value2) {
|
||||||
|
|
||||||
|
// every 5 is not add in total
|
||||||
|
|
||||||
|
$t1_1_temp = round($data[$key]['branchs'][$key2]['inv']['count']);
|
||||||
|
$t1_2_temp = round($data[$key]['branchs'][$key2]['inv']['cash'],2);
|
||||||
|
$t1_3_temp = round($data[$key]['branchs'][$key2]['inv']['card'],2);
|
||||||
|
$t1_4_temp = round($data[$key]['branchs'][$key2]['inv']['trans'],2);
|
||||||
|
$t1_5_temp = round($data[$key]['branchs'][$key2]['inv']['else'],2);
|
||||||
|
$t2_4_total = $t1_2_temp + $t1_3_temp + $t1_4_temp;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$t3_1_temp = round($data[$key]['branchs'][$key2]['bonds']['count']);
|
||||||
|
$t3_2_temp = round($data[$key]['branchs'][$key2]['bonds']['cash'],2);
|
||||||
|
$t3_3_temp = round($data[$key]['branchs'][$key2]['bonds']['card'],2);
|
||||||
|
$t3_4_temp = round($data[$key]['branchs'][$key2]['bonds']['trans'],2);
|
||||||
|
$t3_5_temp = round($data[$key]['branchs'][$key2]['bonds']['else'],2);
|
||||||
|
$t10_12_total = $t3_2_temp + $t3_3_temp + $t3_4_temp;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$t5_1_temp = $t1_1_temp + $t3_1_temp ;
|
||||||
|
$t5_2_temp = ($t1_2_temp) + ($t3_2_temp);
|
||||||
|
$t5_3_temp = ($t1_3_temp) + ($t3_3_temp);
|
||||||
|
$t5_4_temp = $t1_4_temp + $t3_4_temp;
|
||||||
|
$t5_5_temp = ($t1_5_temp) + ($t3_5_temp);
|
||||||
|
$t18_20_total = $t5_2_temp + $t5_3_temp + $t5_4_temp;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
?>
|
||||||
|
<td rowspan="3"><?=$data[$key]['branchs'][$key2]['info']['name']?></td>
|
||||||
|
<td>فواتير</td>
|
||||||
|
<td><?=$t1_1_temp?></td>
|
||||||
|
<td><?=$t1_2_temp?></td>
|
||||||
|
<td><?=$t1_3_temp?></td>
|
||||||
|
<td><?=$t1_4_temp?></td>
|
||||||
|
<td style="background:#f7d1d1;"><?=$t1_5_temp?></td>
|
||||||
|
<td><b><?=round($t2_4_total/1.15,2)?></b></td>
|
||||||
|
<td><b><?=round($t2_4_total - ($t2_4_total/1.15),2)?></b></td>
|
||||||
|
<td><b><?=round($t2_4_total,2)?></b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>أرصدة دائنة للعملاء</td>
|
||||||
|
<td><?=$t3_1_temp?></td>
|
||||||
|
<td><?=$t3_2_temp?></td>
|
||||||
|
<td><?=$t3_3_temp?></td>
|
||||||
|
<td><?=$t3_4_temp?></td>
|
||||||
|
<td style="background:#f7d1d1;"><?=$t3_5_temp?></td>
|
||||||
|
<td><b><?=round($t10_12_total/1.15,2)?></b></td>
|
||||||
|
<td><b><?=round($t10_12_total - ($t10_12_total/1.15),2)?></b></td>
|
||||||
|
<td><b><?=round($t10_12_total,2)?></b></td>
|
||||||
|
</tr>
|
||||||
|
<tr style="background:#e9f0ee; font-weight: bold;">
|
||||||
|
<td>مجموع</td>
|
||||||
|
<td><?=$t5_1_temp?></td>
|
||||||
|
<td><?=$t5_2_temp?></td>
|
||||||
|
<td><?=$t5_3_temp?></td>
|
||||||
|
<td><?=$t5_4_temp?></td>
|
||||||
|
<td style="background:#f7d1d1;"><?=$t5_5_temp?></td>
|
||||||
|
<td><b><?=round($t18_20_total/1.15,2)?></b></td>
|
||||||
|
<td><b><?=round($t18_20_total - ($t18_20_total/1.15),2)?></b></td>
|
||||||
|
<td><b><?=$t18_20_total?></b></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$t1_1 += $t1_1_temp;
|
||||||
|
$t1_2 += $t1_2_temp;
|
||||||
|
$t1_3 += $t1_3_temp;
|
||||||
|
$t1_4 += $t1_4_temp;
|
||||||
|
$t1_5 += $t1_5_temp;
|
||||||
|
$t1_2_4 += $t2_4_total;
|
||||||
|
|
||||||
|
$t3_1 += $t3_1_temp;
|
||||||
|
$t3_2 += $t3_2_temp;
|
||||||
|
$t3_3 += $t3_3_temp;
|
||||||
|
$t3_4 += $t3_4_temp;
|
||||||
|
$t3_5 += $t3_5_temp;
|
||||||
|
$t3_2_4 += $t10_12_total;
|
||||||
|
|
||||||
|
$t5_1 += $t5_1_temp;
|
||||||
|
$t5_2 += $t5_2_temp;
|
||||||
|
$t5_3 += $t5_3_temp;
|
||||||
|
$t5_4 += $t5_4_temp;
|
||||||
|
$t5_5 += $t5_5_temp;
|
||||||
|
$t5_2_4 += $t18_20_total;
|
||||||
|
}
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="6" colspan="3">المجموع الكلي</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>فواتير</td>
|
||||||
|
<td><?=$t1_1?></td>
|
||||||
|
<td><?=$t1_2?></td>
|
||||||
|
<td><?=$t1_3?></td>
|
||||||
|
<td><?=$t1_4?></td>
|
||||||
|
<td style="background:#f7d1d1;"><?=$t1_5?></td>
|
||||||
|
<td><b><?=round($t1_2_4/1.15,2)?></b></td>
|
||||||
|
<td><b><?=round($t1_2_4 - ($t1_2_4/1.15),2)?></b></td>
|
||||||
|
<td><?=$t1_2_4?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>أرصدة دائنة للعملاء</td>
|
||||||
|
<td><?=$t3_1?></td>
|
||||||
|
<td><?=$t3_2?></td>
|
||||||
|
<td><?=$t3_3?></td>
|
||||||
|
<td><?=$t3_4?></td>
|
||||||
|
<td style="background:#f7d1d1;"><?=$t3_5?></td>
|
||||||
|
<td><b><?=round($t3_2_4/1.15,2)?></b></td>
|
||||||
|
<td><b><?=round($t3_2_4 - ($t3_2_4/1.15),2)?></b></td>
|
||||||
|
<td><?=$t3_2_4?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background:#e9f0ee;">مجموع</td>
|
||||||
|
<td style="background:#e9f0ee;"><?=$t5_1?></td>
|
||||||
|
<td style="background:#e9f0ee;"><?=$t5_2?></td>
|
||||||
|
<td style="background:#e9f0ee;"><?=$t5_3?></td>
|
||||||
|
<td style="background:#e9f0ee;"><?=$t5_4?></td>
|
||||||
|
<td style="background:#f7d1d1;"><?=$t5_5?></td>
|
||||||
|
<td style="background:#e9f0ee;"><b><?=round($t5_2_4/1.15,2)?></b></td>
|
||||||
|
<td style="background:#e9f0ee;"><b><?=round($t5_2_4 - ($t5_2_4/1.15),2)?></b></td>
|
||||||
|
<td style="background:#e9f0ee;"><?=$t5_2_4?></td>
|
||||||
|
</tr>
|
||||||
|
</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 = 'daily_user_new?b=<?= $branch_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
198
drinks_status.php
Normal file
198
drinks_status.php
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(61);
|
||||||
|
|
||||||
|
$branch_id = $_SESSION['branch'];
|
||||||
|
|
||||||
|
if(isset($_GET['m'])) {
|
||||||
|
$drink_id = $_GET['drink_id'];
|
||||||
|
switch($_GET['m']) {
|
||||||
|
case "enable":
|
||||||
|
mysqli_query($db, "INSERT INTO o_branch_has_drinks(branch_id, drink_id) VALUES($branch_id, $drink_id)");
|
||||||
|
echo "<script>window.location = 'drinks_status'</script>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "disable":
|
||||||
|
mysqli_query($db, "DELETE FROM o_branch_has_drinks WHERE branch_id = $branch_id AND drink_id = $drink_id");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body_css {
|
||||||
|
background-color: #024347;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.order_r_container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
margin: auto;
|
||||||
|
top: 30px;
|
||||||
|
background-color: #747c7c;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.orders_table {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.orders_table td {
|
||||||
|
margin: auto;
|
||||||
|
color: black;
|
||||||
|
background-color: #D8D8D8;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bold;
|
||||||
|
border: solid 3px #024347;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.orders_table th {
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 18px;
|
||||||
|
border: solid 3px #024347;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.th_submit {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 20px;
|
||||||
|
background-color: #24695c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.o_enable {
|
||||||
|
background-color: #1fcd1f;
|
||||||
|
padding: 5px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.o_disable {
|
||||||
|
background-color: red;
|
||||||
|
padding: 5px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- sound -->
|
||||||
|
<audio controls id="multiaudio5" style="display: none">
|
||||||
|
<source src="../orders/order_sound.mp3" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
|
||||||
|
<p id="branch" style="display: none"><?php echo $_SESSION['branch']; ?></p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="order_r_container">
|
||||||
|
<table class="orders_table" dir="rtl">
|
||||||
|
<tr>
|
||||||
|
<td>اسم المشروب</td>
|
||||||
|
<td>حالة المشروب</td>
|
||||||
|
<td>تفعيل / الغاء</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr id="res_div">
|
||||||
|
<?php
|
||||||
|
$query = mysqli_query($db, "SELECT
|
||||||
|
`o_drinks`.`drink_id`,
|
||||||
|
`o_drinks`.`drink_name`,
|
||||||
|
`branch_id`
|
||||||
|
|
||||||
|
FROM `o_drinks`
|
||||||
|
LEFT JOIN `o_branch_has_drinks` ON `o_drinks`.`drink_id` = `o_branch_has_drinks`.`drink_id` AND `o_branch_has_drinks`.`branch_id` = $branch_id
|
||||||
|
|
||||||
|
WHERE
|
||||||
|
`branch_id` = $branch_id
|
||||||
|
OR
|
||||||
|
`o_drinks`.`drink_id` NOT IN (SELECT
|
||||||
|
drink_id
|
||||||
|
FROM o_branch_has_drinks
|
||||||
|
WHERE branch_id = $branch_id)
|
||||||
|
ORDER BY drink_id
|
||||||
|
");
|
||||||
|
|
||||||
|
while($row = mysqli_fetch_assoc($query)) {
|
||||||
|
$drink_id = $row['drink_id'];
|
||||||
|
echo "<tr>";
|
||||||
|
if($row['branch_id'] == NULL) {
|
||||||
|
echo "<form method='POST' action='?m=enable&drink_id=$drink_id'>";
|
||||||
|
echo "<th>المشروب: " . $row['drink_name'] . "</th><th>الحالة: غير مفعل</th>";
|
||||||
|
echo "<th><input type='submit' class='o_enable' value='تفعيل'></th>";
|
||||||
|
echo "</form>";
|
||||||
|
} else {
|
||||||
|
echo "<form method='POST' action='?m=disable&drink_id=$drink_id'>";
|
||||||
|
echo "<th>المشروب: " . $row['drink_name'] . "</th><th>الحالة: مفعل</th>";
|
||||||
|
echo "<th><input type='submit' class='o_disable' value='إالغاء التفعيل'></th>";
|
||||||
|
echo "</form>";
|
||||||
|
}
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<!-- GTranslate: https://gtranslate.io/ -->
|
||||||
|
<div id="google_translate_element" class="form-group" style="display: none;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
35
driver_points_month.php
Normal file
35
driver_points_month.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(false) {
|
||||||
|
require_once('under_maintenance.php');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ($_GET['m'] == 50) {
|
||||||
|
require_once('work/files/reports/driver_points_month/1.php');
|
||||||
|
} else {
|
||||||
|
if (strtotime($today) < strtotime('2023-01-01 00:00:00')) {
|
||||||
|
require_once('work/files/reports/driver_points_month/1.php');
|
||||||
|
}
|
||||||
|
// else if (strtotime($today) < strtotime('2023-01-30 00:00:00')) {
|
||||||
|
// require_once('work/files/reports/driver_points_month/1.php');
|
||||||
|
// }
|
||||||
|
else {
|
||||||
|
require_once('work/files/reports/driver_points_month/1.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
329
edit_booking.php
Normal file
329
edit_booking.php
Normal file
@ -0,0 +1,329 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(43);
|
||||||
|
|
||||||
|
$DatePicker = true;
|
||||||
|
|
||||||
|
$booking_id = mysqli_real_escape_string($db, $_GET['booking_id']);
|
||||||
|
if (!is_numeric($booking_id) || $booking_id <= 0) {
|
||||||
|
echo "
|
||||||
|
<script>
|
||||||
|
alert('حدث خطا');
|
||||||
|
window.location.href = 'index.php';
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_book_sql = mysqli_query($db, "SELECT
|
||||||
|
`bd`.`day_date`,
|
||||||
|
`bd`.`day_time`,
|
||||||
|
`tretment`.`name` AS `tr_name`,
|
||||||
|
`tretment`.`number`,
|
||||||
|
`services`.`id` AS `serv_id`,
|
||||||
|
`emplyee`.`id`,
|
||||||
|
`emplyee`.`name`,
|
||||||
|
`book`.`notes`,
|
||||||
|
`branch`.`branch_name`,
|
||||||
|
`bd`.`status_id`
|
||||||
|
|
||||||
|
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 `book`.`user_id` = `user`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
LEFT JOIN `branch` ON `bd`.`emplyee_id` = `branch`.`id`
|
||||||
|
|
||||||
|
WHERE `book`.`id`='$booking_id'
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id`='$booking_id' GROUP BY `book_details`.`book_id`)
|
||||||
|
LIMIT 1"
|
||||||
|
);
|
||||||
|
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT `branch`.`id` AS `br_id`, `branch`.`branch_name` AS `br_name`, `emplyee`.`id`,`emplyee`.`name` FROM `occupation`
|
||||||
|
LEFT JOIN `emplyee` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
WHERE `occupation`.`show_in_table_id` = 2
|
||||||
|
AND `branch`.`commercial_register_id` = $commercial_register_id
|
||||||
|
AND `emplyee`.`activation_id` = 2
|
||||||
|
ORDER BY `branch`.`id`, `emplyee`.`name`");
|
||||||
|
|
||||||
|
$get_book = mysqli_fetch_assoc($get_book_sql);
|
||||||
|
|
||||||
|
$go_out = array(1,2,3,12,13,14,15,16,17,18,19,20,21,22,23,24,25);
|
||||||
|
if (mysqli_num_rows($get_book_sql) != 1 || in_array($get_book['status_id'], $go_out)) {
|
||||||
|
echo "
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'index.php';
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((strtotime($today)) > strtotime($get_book['day_date'])) {
|
||||||
|
echo "
|
||||||
|
<script type='text/javascript'>
|
||||||
|
alert('error EQ-7489')
|
||||||
|
</script>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" name="tretment_number" class="form-control clickfun1" type="number" value="<?=$get_book['number']?>" required disabled>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if ($booking_row['state'] > 14) {
|
||||||
|
?>
|
||||||
|
<div class="col-4 col-sm-6 col-md-1 col-lg-1 col-xl-1">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div id="search_tretment-frame" style="display:none;" class="col-4 col-sm-6 col-md-1 col-lg-1 col-xl-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="change-frame" class="col-4 col-sm-6 col-md-1 col-lg-1 col-xl-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="change">تعديل</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<h6 class="mt-0 header-title">معلومات الحجز</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="" class="col-form-label text-right">اسم الفني</label>
|
||||||
|
<select id="emp_name" style="font-family: system-ui;" class="form-control">
|
||||||
|
<option value="0" selected>المرجو الاختيار</option>
|
||||||
|
<?php
|
||||||
|
while ($emplyee_row = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
?>
|
||||||
|
<option <?php if($get_book['id'] == $emplyee_row['id']) {$branch_name = $emplyee_row['br_name']; $br_id = $emplyee_row['br_id']; echo 'selected';}?> value="<?= $emplyee_row['id'] ?>"><?= $emplyee_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="" class="col-form-label text-right">الخدمة المطلوبة</label>
|
||||||
|
<select id="theService" style="font-family: system-ui;" class="form-control" name="booking_the_service">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="booking_day_date" class="col-form-label text-right">التاريخ</label>
|
||||||
|
<input id="booking_day_date" style="text-align: center;" type="text" class="datepicker-here form-control digits clickfun" data-language="ar" name="datestart" value="<?=$get_book['day_date']?>"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="booking_day_time" class="col-form-label text-right">الوقت</label>
|
||||||
|
<select id="booking_day_time" style="font-family: system-ui;" class="form-control">
|
||||||
|
<?php
|
||||||
|
$get_times_sql = mysqli_query($db, "SELECT `id`, `name`,`time` FROM `times` WHERE ((`time` BETWEEN '05:00:00' AND '23:00:00') OR `time` IN ('00:00:00', '01:00:00')) AND `time` LIKE '%00:00' ORDER BY `id` = 3 ASC, `id` = 1 ASC, `times`.`time` ASC");
|
||||||
|
while ($times_row = mysqli_fetch_assoc($get_times_sql)) {
|
||||||
|
?>
|
||||||
|
<option <?php if($get_book['day_time'] == $times_row['time']) {echo 'selected';}?> value="<?= $times_row['time'] ?>"><?= $times_row['name'] ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
||||||
|
<label for="" class="col-form-label text-right">الفرع</label>
|
||||||
|
<input id="branch_vv" class="form-control clickfun" type="text" value="<?=$branch_name?>" disabled>
|
||||||
|
<input id="branch_id" type="number" value="<?=$br_id?>" style="display:none">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea row="4" name="booking_notes" class="form-control" type="text"><?=$get_book['notes']?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="edit_booking">تعديل</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
// for limit clicks
|
||||||
|
searchClick = 0;
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// get services
|
||||||
|
$(function() {
|
||||||
|
var empName = <?= json_encode($get_book['id']) ?>;
|
||||||
|
var servid = <?= json_encode($get_book['serv_id'])?>;
|
||||||
|
$.post("work/order/ajax/get_services_ajax.php", {
|
||||||
|
servid,
|
||||||
|
empName
|
||||||
|
}, function(theService) {
|
||||||
|
$("#theService").html(theService);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// edit booking
|
||||||
|
$(function() {
|
||||||
|
$("#edit_booking").click(function() {
|
||||||
|
add_booking();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun2').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_booking();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function add_booking() {
|
||||||
|
let booking_day_date = $("#booking_day_date").val();
|
||||||
|
let booking_day_time = $("#booking_day_time").val();
|
||||||
|
let branch_id = $("#branch_id").val();
|
||||||
|
let booking_id = <?=json_encode($booking_id)?>;
|
||||||
|
let status_id = <?=json_encode($get_book['status_id'])?>;
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let emp = $("#emp_name").val();
|
||||||
|
if (emp == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار الفني ', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let theService = $("#theService").val();
|
||||||
|
if (theService == 0) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى اختيار نوع الخدمة', 'error');
|
||||||
|
return false;
|
||||||
|
} else if (theService != <?=json_encode($get_book['serv_id'])?> && 6 == <?=json_encode($get_book['status_id'])?>) {
|
||||||
|
swalfun('حدث خطأ', 'لا يمكن تعديل الخدمة من هنا (حاليا) الى اشعار آخر', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let booking_notes = $("[name='booking_notes']").val();
|
||||||
|
let emp_id = $("#emp_name").val();
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/edit_booking_ajax.php", {
|
||||||
|
booking_id,
|
||||||
|
tretment_id,
|
||||||
|
theService,
|
||||||
|
booking_notes,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
status_id
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get branch when change emplyee
|
||||||
|
$(function() {
|
||||||
|
$("#emp_name").change(function() {
|
||||||
|
var servid = <?= json_encode($get_book['serv_id'])?>;
|
||||||
|
var empName = $(this).val();
|
||||||
|
$.post("work/order/ajax/get_services_ajax.php", {
|
||||||
|
servid,
|
||||||
|
empName
|
||||||
|
}, function(theService) {
|
||||||
|
$("#theService").html(theService);
|
||||||
|
})
|
||||||
|
$.post("work/order/ajax/get_branch_ajax.php", {
|
||||||
|
empName,
|
||||||
|
}, function(data) {
|
||||||
|
$("#branch_vv").val(data['val']);
|
||||||
|
$("#branch_id").val(data['id']);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// change tretment
|
||||||
|
$(function() {
|
||||||
|
$("#change").click(function() {
|
||||||
|
$("#change-frame").hide();
|
||||||
|
$("#name-frame").hide();
|
||||||
|
$("#number").prop( "disabled", false );
|
||||||
|
$("#search_tretment-frame").show();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
search_tretment()
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
0
edit_booking_visits.php
Normal file
0
edit_booking_visits.php
Normal file
135
edit_branch.php
Normal file
135
edit_branch.php
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(44);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="edit-profile">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header pb-0">
|
||||||
|
<h4 class="card-title mb-0">اسم الفرع</h4>
|
||||||
|
<div class="card-options"><a class="card-options-collapse" href="#" data-bs-toggle="card-collapse"><i class="fe fe-chevron-up"></i></a><a class="card-options-remove" href="#" data-bs-toggle="card-remove"><i class="fe fe-x"></i></a></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<form>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">اسم الفرع</label>
|
||||||
|
<input class="form-control" type="text" placeholder="مثال : مخرج 15">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<h6 class="form-label">موقع الفرع</h6>
|
||||||
|
<textarea class="form-control" rows="5" placeholder="مثال : طريق الامام خالد مقابل ماك"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">العنوان الوطني</label>
|
||||||
|
<input class="form-control mt-2" type="text" placeholder="العنوان المختصر">
|
||||||
|
<input class="form-control mt-2" type="text" placeholder="المدينة">
|
||||||
|
<input class="form-control mt-2" type="text" placeholder="الشارع">
|
||||||
|
<input class="form-control mt-2" type="text" placeholder="الحي">
|
||||||
|
<input class="form-control mt-2" type="number" placeholder="الرمز البريدي">
|
||||||
|
<input class="form-control mt-2" type="number" placeholder="الرقم الفرعي">
|
||||||
|
<input class="form-control mt-2" type="number" placeholder="رقم المبنى">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">رابط موقع الفرع في الخرائط</label>
|
||||||
|
<input class="form-control" type="text" placeholder="https://goo.gl/maps/">
|
||||||
|
</div>
|
||||||
|
<div class="form-footer">
|
||||||
|
<button class="btn btn-primary btn-block">حفظ</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-8">
|
||||||
|
<form class="card">
|
||||||
|
<div class="card-header pb-0">
|
||||||
|
<h4 class="card-title mb-0">بيانات الفرع</h4>
|
||||||
|
<div class="card-options"><a class="card-options-collapse" href="#" data-bs-toggle="card-collapse"><i class="fe fe-chevron-up"></i></a><a class="card-options-remove" href="#" data-bs-toggle="card-remove"><i class="fe fe-x"></i></a></div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">عدد الغرف اجمالا</label>
|
||||||
|
<input class="form-control" type="number" placeholder="المساج - الحمام - العناية">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-md-6">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">عدد الكراسي اجمالا</label>
|
||||||
|
<input class="form-control" type="number" placeholder="المساج - الحمام - العناية">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer text-end">
|
||||||
|
<button class="btn btn-primary" type="submit">تحديث</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#search").click(function() {
|
||||||
|
booking_d();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
booking_d();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
click = 0;
|
||||||
|
function booking_d() {
|
||||||
|
let number = $("#number").val();
|
||||||
|
if (number.length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++
|
||||||
|
$.post("work/order/ajax/booking_detail_ajax.php", {
|
||||||
|
number
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
$(".custom_add").hide();
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "تم بالفعل الضعط علية", "warning");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
if (!empty($_GET['number'])) {
|
||||||
|
echo "booking_d()";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1314
edit_emplyee.php
Normal file
1314
edit_emplyee.php
Normal file
File diff suppressed because it is too large
Load Diff
184
edit_me.php
Normal file
184
edit_me.php
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
|
||||||
|
$DatePicker = true;
|
||||||
|
$DateRangePicker = true;
|
||||||
|
$Select2 = true;
|
||||||
|
|
||||||
|
$get_user_sql = mysqli_query($db, "SELECT
|
||||||
|
`user`.`name`,
|
||||||
|
`user_setting`.`table_size`,
|
||||||
|
`user_setting`.`https_link`,
|
||||||
|
`user_setting`.`active_code`,
|
||||||
|
`user_setting`.`font_size`
|
||||||
|
FROM `user`
|
||||||
|
LEFT JOIN `user_setting` ON `user_setting`.`user_id` = `user`.`id`
|
||||||
|
WHERE `user`.`id` = '$admin_id'
|
||||||
|
ORDER BY `user_setting`.`id` DESC
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$user_row = mysqli_fetch_assoc($get_user_sql);
|
||||||
|
?>
|
||||||
|
<!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">
|
||||||
|
<style>
|
||||||
|
a.active {
|
||||||
|
background-color: #e6edef;
|
||||||
|
}
|
||||||
|
.range_inputs {
|
||||||
|
direction: rtl;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.datepicker--nav-action svg {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
.select2-results__group {
|
||||||
|
background: var(--bs-teal);;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||||
|
background: springgreen;
|
||||||
|
}
|
||||||
|
.selection .select2-selection {
|
||||||
|
font-family: 'Cairo', sans-serif !important;
|
||||||
|
border-color: #e6edef !important;
|
||||||
|
}
|
||||||
|
.selection .select2-selection .select2-search__field {
|
||||||
|
padding: 0 15px 0 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="email-wrap bookmark-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-3 xl-30">
|
||||||
|
<div class="email-sidebar"><a class="btn btn-primary email-aside-toggle" href="javascript:void(0)">#</a>
|
||||||
|
<div class="email-left-aside">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="email-app-sidebar left-bookmark">
|
||||||
|
<div class="media">
|
||||||
|
<div class="media-size-email"><img class="me-3 rounded-circle" src="../assets/images/user/user.png" alt=""></div>
|
||||||
|
<div class="media-body"><a href="user-profile.html">
|
||||||
|
<h6 class="f-w-700"><?=$user_row['name']?></h6></a>
|
||||||
|
<p>البريد الالكتروني الرسمي</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="nav main-menu contact-options" role="tablist">
|
||||||
|
<li class="nav-item" style="height: 50px;"></li>
|
||||||
|
<li class="nav-item"><span class="main-title"> القوائم</span></li>
|
||||||
|
<li>
|
||||||
|
<a id="tap-personal-tab" data-bs-toggle="pill" href="#tap-personal" role="tab" aria-controls="tap-personal" aria-selected="true" class="active">
|
||||||
|
<span class="title">الاعدادات</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-9 col-md-12 box-col-8 xl-70">
|
||||||
|
<div class="email-right-aside bookmark-tabcontent contacts-tabs">
|
||||||
|
<div class="card email-body radius-left">
|
||||||
|
<div class="ps-0">
|
||||||
|
<div class="tab-content">
|
||||||
|
<div class="tab-pane fade active show" id="tap-personal" role="tabpanel" aria-labelledby="tap-personal-tab">
|
||||||
|
<div class="card mb-0">
|
||||||
|
<div class="card-header d-flex">
|
||||||
|
<h5>المعلومات الاساسية</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="">
|
||||||
|
<form class="form-horizontal form-material mb-0">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="httpslink" class="col-form-label text-right">رابط التوجيه للصفحة الرئيسية</label>
|
||||||
|
<input id="httpslink" type="url" placeholder="رابط التوجية" class="form-control clickfun" value="<?=$user_row['https_link']?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="tablesize" class="col-form-label text-right">حجم الجدول</label>
|
||||||
|
<input id="tablesize" type="number" placeholder="من 1 الى 9 حيث 1 يعني الاصغر" class="form-control clickfun" value="<?=$user_row['table_size']?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="size" class="col-form-label text-right">حجم الخط</label>
|
||||||
|
<input id="size" type="number" placeholder="الحجم" class="form-control clickfun" value="<?=$user_row['font_size']?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="active_code" class="col-form-label text-right">رمز تفعيل الجلسات</label>
|
||||||
|
<input id="active_code" type="password" min="1000" max="9999" placeholder="4 ارقام" class="form-control clickfun" value="<?=$user_row['active_code']?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div id="editUser" class="btn btn-primary btn-sm text-light mt-3 float-right mb-0 text-center">تعديل</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#editUser").click(function() {
|
||||||
|
edit_user();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
edit_user();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function edit_user() {
|
||||||
|
let tablesize = $("#tablesize").val();
|
||||||
|
let httpslink = $("#httpslink").val();
|
||||||
|
let active_code = $("#active_code").val();
|
||||||
|
let size = $("#size").val();
|
||||||
|
$.post("work/order/ajax/edit_me_ajax.php", {
|
||||||
|
httpslink,
|
||||||
|
tablesize,
|
||||||
|
active_code,
|
||||||
|
size
|
||||||
|
}, function(get_data) {
|
||||||
|
$("#get_data").html(get_data);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
339
emp_bath_points.php
Normal file
339
emp_bath_points.php
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(62);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$Next = date('Y-m', strtotime('+1 month', strtotime($today)));
|
||||||
|
$Previous = date('Y-m', strtotime('-1 month', strtotime($today)));
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
$branch_sql = '='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>'.$branch_id;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!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">
|
||||||
|
<style>
|
||||||
|
a.active {
|
||||||
|
background-color: #e6edef;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
background: #24695c;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: white;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="email-wrap bookmark-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`"
|
||||||
|
);
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if($branch_id == $commercial_register['id']){echo 'active';}?> ?>" data-toggle="pill" href="#branch-<?=$commercial_register['id']?>" aria-selected="false" onclick="window.location='emp_bath_points?b=<?=$commercial_register['id']?>&date=<?=$today?>'"><?=$commercial_register['branch_name']?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<div class="card">
|
||||||
|
<div class="tab-content" id="profile-tabContent">
|
||||||
|
<div class="tab-pane fade show active" id="all">
|
||||||
|
<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>
|
||||||
|
نسية الحمام المغربي لشهر
|
||||||
|
<br/>
|
||||||
|
<?=$today?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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="emp_bath_points?date=<?= $Previous ?>&b=<?= $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="emp_bath_points?date=<?= $Next ?>&b=<?= $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>
|
||||||
|
|
||||||
|
<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 id="employee_data" class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2" scope="col">#</th>
|
||||||
|
<th rowspan="2" scope="col">اسم الموظف</th>
|
||||||
|
<th rowspan="2" scope="col">الخدمات المقدمة</th>
|
||||||
|
<th rowspan="2" scope="col">الملكي</th>
|
||||||
|
<th rowspan="2" scope="col">طين | أعشاب | طين بحر ميت</th>
|
||||||
|
<th rowspan="2" scope="col">صابون | زيت | صنفرة</th>
|
||||||
|
<th rowspan="2" scope="col">اجمالي الخدمات بسعرها الاساسي</th>
|
||||||
|
<th rowspan="2" scope="col">العمولة</th>
|
||||||
|
<th rowspan="2" scope="col">النسبة</th>
|
||||||
|
<th rowspan="2" scope="col">الاجمالي</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$c1 = 0;
|
||||||
|
$c2 = 0;
|
||||||
|
$c3 = 0;
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`emplyee`.`id`,
|
||||||
|
`emplyee`.`name`,
|
||||||
|
COUNT(`book`.`id`) AS `count`,
|
||||||
|
SUM(`services`.`price`) AS `point`,
|
||||||
|
|
||||||
|
IFNULL((SELECT
|
||||||
|
COUNT(`book`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff1`
|
||||||
|
|
||||||
|
LEFT JOIN `book` ON `ff1`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `ff1`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `ff1`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `ff1`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff1`.`branch_id` $branch_sql
|
||||||
|
AND `emplyee`.`occupation_id` = 3
|
||||||
|
AND `ff1`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff1`.`services_id` IN (11)
|
||||||
|
AND `ff1`.`emplyee_id` = `bd`.`emplyee_id`
|
||||||
|
AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id`)
|
||||||
|
GROUP BY `emplyee`.`id`
|
||||||
|
),0) AS `c1`,
|
||||||
|
|
||||||
|
IFNULL((SELECT
|
||||||
|
COUNT(`book`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff2`
|
||||||
|
|
||||||
|
LEFT JOIN `book` ON `ff2`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `ff2`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `ff2`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `ff2`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff2`.`branch_id` $branch_sql
|
||||||
|
AND `emplyee`.`occupation_id` = 3
|
||||||
|
AND `ff2`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff2`.`services_id` IN (10,9,8)
|
||||||
|
AND `ff2`.`emplyee_id` = `bd`.`emplyee_id`
|
||||||
|
AND `ff2`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff2`.`book_id`)
|
||||||
|
GROUP BY `emplyee`.`id`
|
||||||
|
),0) AS `c2`,
|
||||||
|
|
||||||
|
IFNULL((SELECT
|
||||||
|
COUNT(`book`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff3`
|
||||||
|
|
||||||
|
LEFT JOIN `book` ON `ff3`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `ff3`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `ff3`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `ff3`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff3`.`branch_id` $branch_sql
|
||||||
|
AND `emplyee`.`occupation_id` = 3
|
||||||
|
AND `ff3`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff3`.`services_id` IN (7,6,5)
|
||||||
|
AND `ff3`.`emplyee_id` = `bd`.`emplyee_id`
|
||||||
|
AND `ff3`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff3`.`book_id`)
|
||||||
|
GROUP BY `emplyee`.`id`
|
||||||
|
),0) AS `c3`
|
||||||
|
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
|
||||||
|
LEFT JOIN `book` ON `bd`.`book_id` = `book`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `bd`.`day_date` LIKE '$today%'
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `emplyee`.`occupation_id` = 3
|
||||||
|
AND `bd`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `bd`.`book_id`)
|
||||||
|
GROUP BY `emplyee`.`id`
|
||||||
|
");
|
||||||
|
$count = 1;
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$count?></th>
|
||||||
|
<td><a href="emp_bath_points_d?id=<?=$get_book_details['id']?>&date=<?=$today?>"><?=$get_book_details['name']?></a></td>
|
||||||
|
<td><?=$get_book_details['count']?></td>
|
||||||
|
<td><?=$get_book_details['c1']?></td>
|
||||||
|
<td><?=$get_book_details['c2']?></td>
|
||||||
|
<td><?=$get_book_details['c3']?></td>
|
||||||
|
<td><?=round($get_book_details['point'],2)?></td>
|
||||||
|
<td><?php
|
||||||
|
$total_p = 0;
|
||||||
|
if($get_book_details['id'] == '63' || $get_book_details['id'] == '70') {
|
||||||
|
$total_p += 0;
|
||||||
|
echo $total_p;
|
||||||
|
} else {
|
||||||
|
if ($get_book_details['id'] == 62 || $get_book_details['id'] == 390 || $get_book_details['id'] == 379 || $get_book_details['id'] == 402 ||
|
||||||
|
($get_book_details['id'] == 64 && date('Y-m-d', strtotime("$today".'-01')) > date('Y-m-d', strtotime("2023-12-31"))) ||
|
||||||
|
($get_book_details['id'] == 321 && date('Y-m-d', strtotime("$today".'-01')) > date('Y-m-d', strtotime("2023-12-31")))){
|
||||||
|
|
||||||
|
$total_p += round(round($get_book_details['point'] ,2) * 0.10,2); // نسبة 10 بالمئة
|
||||||
|
echo $total_p;
|
||||||
|
} else {
|
||||||
|
$total_p += round(round($get_book_details['point'] ,2) * 0.05,2); // نسبة 5 بالمئة
|
||||||
|
echo $total_p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?></td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$total = 0;
|
||||||
|
if ($get_book_details['c1'] > 0) {
|
||||||
|
if ($get_book_details['c1'] > 0 && $get_book_details['c1'] <= 100) {
|
||||||
|
$total += $get_book_details['c1'] * 4;
|
||||||
|
} elseif ($get_book_details['c1'] > 100 && $get_book_details['c1'] <= 200) {
|
||||||
|
$total += $get_book_details['c1'] * 8;
|
||||||
|
} elseif ($get_book_details['c1'] > 200 && $get_book_details['c1'] <= 300) {
|
||||||
|
$total += $get_book_details['c1'] * 12;
|
||||||
|
} elseif ($get_book_details['c1'] > 300 && $get_book_details['c1'] <= 400) {
|
||||||
|
$total += $get_book_details['c1'] * 16;
|
||||||
|
} elseif ($get_book_details['c1'] > 400) {
|
||||||
|
$total += $get_book_details['c1'] * 20;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($get_book_details['c2'] > 0) {
|
||||||
|
if ($get_book_details['c2'] > 0 && $get_book_details['c2'] <= 100) {
|
||||||
|
$total += $get_book_details['c2'] * 2.5;
|
||||||
|
} elseif ($get_book_details['c2'] > 100 && $get_book_details['c2'] <= 200) {
|
||||||
|
$total += $get_book_details['c2'] * 5;
|
||||||
|
} elseif ($get_book_details['c2'] > 200 && $get_book_details['c2'] <= 300) {
|
||||||
|
$total += $get_book_details['c2'] * 7.5;
|
||||||
|
} elseif ($get_book_details['c2'] > 300 && $get_book_details['c2'] <= 400) {
|
||||||
|
$total += $get_book_details['c2'] * 10;
|
||||||
|
} elseif ($get_book_details['c2'] > 400) {
|
||||||
|
$total += $get_book_details['c2'] * 12.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($get_book_details['c3'] > 0) {
|
||||||
|
if ($get_book_details['c3'] > 0 && $get_book_details['c3'] <= 100) {
|
||||||
|
$total += $get_book_details['c3'] * 2;
|
||||||
|
} elseif ($get_book_details['c3'] > 100 && $get_book_details['c3'] <= 200) {
|
||||||
|
$total += $get_book_details['c3'] * 4;
|
||||||
|
} elseif ($get_book_details['c3'] > 200 && $get_book_details['c3'] <= 300) {
|
||||||
|
$total += $get_book_details['c3'] * 6;
|
||||||
|
} elseif ($get_book_details['c3'] > 300 && $get_book_details['c3'] <= 400) {
|
||||||
|
$total += $get_book_details['c3'] * 8;
|
||||||
|
} elseif ($get_book_details['c3'] > 400) {
|
||||||
|
$total += $get_book_details['c3'] * 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo round($total,2);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td><?=round($total + $total_p,2)?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button type="button" id="export_button" class="btn btn-success btn-sm">ملف excel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$("#Select-date").change(function() {
|
||||||
|
var SelectedDate = $(this).val();
|
||||||
|
window.location = 'emp_bath_points?b=<?= $branch_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
function html_table_to_excel(type)
|
||||||
|
{
|
||||||
|
var data = document.getElementById('employee_data');
|
||||||
|
var file = XLSX.utils.table_to_book(data, {sheet: "sheet1"});
|
||||||
|
XLSX.write(file, { bookType: type, bookSST: true, type: 'base64' });
|
||||||
|
XLSX.writeFile(file, 'ايراد الفرع.' + type);
|
||||||
|
}
|
||||||
|
const export_button = document.getElementById('export_button');
|
||||||
|
export_button.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
229
emp_bath_points_d.php
Normal file
229
emp_bath_points_d.php
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
<?php
|
||||||
|
require_once ('fixed/config/go_con.php');
|
||||||
|
access(62);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$emp_id = mysqli_real_escape_string($db, $_GET['id']);
|
||||||
|
if (!empty($emp_id)) {
|
||||||
|
if (!is_numeric($emp_id)) {
|
||||||
|
$emp_id = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$Next = date('Y-m', strtotime('+1 month', strtotime($today)));
|
||||||
|
$Previous = date('Y-m', strtotime('-1 month', strtotime($today)));
|
||||||
|
?>
|
||||||
|
<!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'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once ('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once ('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<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>
|
||||||
|
تفاصيل خدمات الحمام المغربي
|
||||||
|
<br />
|
||||||
|
<?= $today ?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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="emp_bath_points_d?id=<?= $emp_id ?>&date=<?= $Previous ?>"
|
||||||
|
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="emp_bath_points_d?id=<?= $emp_id ?>&date=<?= $Next ?>"
|
||||||
|
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>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2" scope="col">#</th>
|
||||||
|
<th rowspan="2" scope="col">اسم العميل</th>
|
||||||
|
<th rowspan="2" scope="col">رقم العميل</th>
|
||||||
|
<th rowspan="2" scope="col">تاريخ الحجز</th>
|
||||||
|
<th rowspan="2" scope="col">وقت الحجز</th>
|
||||||
|
<th rowspan="2" scope="col">الخدمة</th>
|
||||||
|
<th rowspan="2" scope="col">سعر الخدمة الاساسي</th>
|
||||||
|
<th rowspan="2" scope="col">المبلغ</th>
|
||||||
|
<th rowspan="2" scope="col">النقاط</th>
|
||||||
|
<th rowspan="2" scope="col">x 15</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$total = 0;
|
||||||
|
$serv_p = 0;
|
||||||
|
$inv_price = 0;
|
||||||
|
$get_book_details_sql = mysqli_query(
|
||||||
|
$db,
|
||||||
|
"SELECT
|
||||||
|
`invoices`.`price`,
|
||||||
|
`bd`.`day_date`,
|
||||||
|
`bd`.`day_time`,
|
||||||
|
`bd`.`book_id`,
|
||||||
|
`services`.`id` AS `serv_id`,
|
||||||
|
`services`.`name`,
|
||||||
|
`services`.`price` AS `serv_p`,
|
||||||
|
`services`.`point`,
|
||||||
|
`tretment`.`name` AS `tr_name`,
|
||||||
|
`tretment`.`number`,
|
||||||
|
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`.`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`.`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 `invoices` ON `invoices_has_book`.`invoices_id` = `invoices`.`id`
|
||||||
|
INNER JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
INNER JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
INNER JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `bd`.`day_date` LIKE '$today%'
|
||||||
|
AND `bd`.`emplyee_id`='$emp_id'
|
||||||
|
AND `emplyee`.`occupation_id` = 3
|
||||||
|
AND `bd`.`status_id` IN (6,8,12,13,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`
|
||||||
|
"
|
||||||
|
);
|
||||||
|
$count = 1;
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
if ($get_book_details['serv_id'] == 0) {
|
||||||
|
$book_id_for_bundle = $get_book_details['book_id'];
|
||||||
|
$bundle_s = mysqli_query($db, "SELECT
|
||||||
|
`services`.`name`,
|
||||||
|
(`services`.`price`*`bundle_services_has_services`.`how_many`) AS `price`
|
||||||
|
|
||||||
|
FROM `bundle_services_has_services`
|
||||||
|
INNER JOIN `services` ON `services`.`id` = `bundle_services_has_services`.`services_id`
|
||||||
|
WHERE `bundle_services_has_services`.`bundle_services_id` = (SELECT `bundle_services_id` FROM `book_details_has_bundle_services` WHERE `book_details_id` = (SELECT MIN(`id`) FROM `book_details` WHERE `book_id` = $book_id_for_bundle AND `status_id` = 4))
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($bundle_s) > 0) {
|
||||||
|
while ($bundle_s_row = mysqli_fetch_assoc($bundle_s)) {
|
||||||
|
$get_book_details['serv_p'] += $bundle_s_row['price'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?= $count ?></th>
|
||||||
|
<td><?= $get_book_details['tr_name'] ?></td>
|
||||||
|
<td><?= $get_book_details['number'] ?></td>
|
||||||
|
<td><?= $get_book_details['day_date'] ?></td>
|
||||||
|
<td><?= $get_book_details['day_time'] ?></td>
|
||||||
|
<td><?= $get_book_details['name'] ?></td>
|
||||||
|
<td><?= round($get_book_details['serv_p'], 2) ?></td>
|
||||||
|
<td><?= round((round($get_book_details['serv_p'], 2) - round($get_book_details['desc'], 2)) + ((round($get_book_details['serv_p'], 2) - round($get_book_details['desc'], 2)) * 15 / 100), 2) ?>
|
||||||
|
</td>
|
||||||
|
<td><?= $get_book_details['point'] ?></td>
|
||||||
|
<td><?= $get_book_details['point'] * 15 ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$inv_price += round((round($get_book_details['serv_p'], 2) - round($get_book_details['desc'], 2)) + ((round($get_book_details['serv_p'], 2) - round($get_book_details['desc'], 2)) * 15 / 100), 2);
|
||||||
|
$serv_p += round($get_book_details['serv_p'], 2);
|
||||||
|
$total += $get_book_details['point'];
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">المجموع</td>
|
||||||
|
<td><?= $serv_p ?></td>
|
||||||
|
<td><?= $inv_price ?></td>
|
||||||
|
<td><?= $total ?></td>
|
||||||
|
<td><?= $total * 15 ?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--end card-body-->
|
||||||
|
</div>
|
||||||
|
<!--end card-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</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 = 'emp_bath_points_d?id=<?= $emp_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
526
emp_come_back.php
Normal file
526
emp_come_back.php
Normal file
@ -0,0 +1,526 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
set_time_limit(3600);
|
||||||
|
access(35);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$Next = date('Y-m', strtotime('+1 month', strtotime($today)));
|
||||||
|
$Previous = date('Y-m', strtotime('-1 month', strtotime($today)));
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
$branch_sql = '=' . $branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>' . $branch_id;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!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">
|
||||||
|
<style>
|
||||||
|
a.active {
|
||||||
|
background-color: #e6edef;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
background: #24695c;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: white;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="email-wrap bookmark-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`"
|
||||||
|
);
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if ($branch_id == $commercial_register['id']) {
|
||||||
|
echo 'active';
|
||||||
|
} ?> ?>" data-toggle="pill" href="#branch-<?= $commercial_register['id'] ?>"
|
||||||
|
aria-selected="false"
|
||||||
|
onclick="window.location='emp_come_back?b=<?= $commercial_register['id'] ?>&date=<?= $today ?>'"><?= $commercial_register['branch_name'] ?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<div class="card">
|
||||||
|
<div class="tab-content" id="profile-tabContent">
|
||||||
|
<div class="tab-pane fade show active" id="all">
|
||||||
|
<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>
|
||||||
|
تقرير نسبة الرجوع لشهر
|
||||||
|
<br />
|
||||||
|
<?= $today ?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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="emp_come_back?date=<?= $Previous ?>&b=<?= $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="emp_come_back?date=<?= $Next ?>&b=<?= $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>
|
||||||
|
|
||||||
|
<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 id="employee_data" class="table table-bordered text-center"
|
||||||
|
style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<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>
|
||||||
|
<th scope="col">المبلغ المستحق جديد</th>
|
||||||
|
<th scope="col">الاجمالي</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$count = 1;
|
||||||
|
$total_1 = 0;
|
||||||
|
$total_2 = 0;
|
||||||
|
$total_3 = 0;
|
||||||
|
$total_4 = 0;
|
||||||
|
$total_5 = 0;
|
||||||
|
$emp_total = 0;
|
||||||
|
$get_conferm_sql = mysqli_query($db, "SELECT * FROM `r_customer_return_rate_report` WHERE DATE_FORMAT(`date`, '%Y-%m') = '$today' AND `branch_id` $branch_sql ORDER BY `deg` DESC");
|
||||||
|
if (mysqli_num_rows($get_conferm_sql) > 0) {
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_conferm_sql)) {
|
||||||
|
?>
|
||||||
|
<tr style="background: <?php if ($get_book_details['groub_1'] == "true") {
|
||||||
|
echo "#9BBB59;";
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
echo "#D8E4BC;";
|
||||||
|
} elseif ($get_book_details['groub_4'] == "true") {
|
||||||
|
echo "#C0504D;";
|
||||||
|
} elseif (round($get_book_details['deg'], 2) < round(($get_book_details['frist_deg'] / 2), 2)) {
|
||||||
|
echo "#E6B8B7;";
|
||||||
|
} ?>">
|
||||||
|
<th scope="row"><?= $count ?></th>
|
||||||
|
<td><?= $get_book_details['name'] ?></td>
|
||||||
|
<td><?= $get_book_details['total_book'] ?></td>
|
||||||
|
<td><?= $get_book_details['count'] ?></td>
|
||||||
|
<td><?= round($get_book_details['deg'], 2) ?>%</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
if ($get_book_details['frist_3'] == "true" && $count == 1) {
|
||||||
|
$emp_total_1_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 2) {
|
||||||
|
$emp_total_1_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 3) {
|
||||||
|
$emp_total_1_temp = ($get_book_details['count'] / 2) * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
if ($get_book_details['groub_1'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
$emp_total_2_temp = ($get_book_details['total_book'] / 2) * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_3'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $emp_total_1_temp + $emp_total_2_temp ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$total_1 += $get_book_details['total_book'];
|
||||||
|
$total_2 += $get_book_details['count'];
|
||||||
|
$total_3 += $emp_total_1_temp;
|
||||||
|
$total_4 += $emp_total_2_temp;
|
||||||
|
$total_5 += $emp_total_1_temp + $emp_total_2_temp;
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
|
||||||
|
(SELECT (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) AS `ddgres` FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY `ddgres` DESC LIMIT 1) AS `frist_deg`,
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 2, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `frist_3`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 2, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `groub_1`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 3, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 4, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 5, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `groub_2`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 2, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 3, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 4, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 5, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 2, 1) THEN 'false'
|
||||||
|
ELSE 'true'
|
||||||
|
END AS `groub_3`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` LIKE '$today%' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` LIKE '$today%' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` LIKE '$today%' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 2, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `groub_4`,
|
||||||
|
|
||||||
|
`rmp1`.`id`,
|
||||||
|
`rmp1`.`name`,
|
||||||
|
|
||||||
|
(SELECT
|
||||||
|
COUNT(`bo2`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff`
|
||||||
|
LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id`
|
||||||
|
|
||||||
|
WHERE `ff`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
) AS `total_book`,
|
||||||
|
|
||||||
|
(SELECT
|
||||||
|
SUM((SELECT
|
||||||
|
IF(COUNT(`book`.`id`) > 1, 1, 0)
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff5`
|
||||||
|
LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id`
|
||||||
|
|
||||||
|
WHERE `ff5`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `book`.`tretment_id` = `ss`.`tretment_id`
|
||||||
|
AND `ff5`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
)) AS `repet`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff1`
|
||||||
|
LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id`
|
||||||
|
|
||||||
|
WHERE `ff1`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff1`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff1`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
) AS `count`,
|
||||||
|
|
||||||
|
(((SELECT
|
||||||
|
SUM((SELECT
|
||||||
|
IF(COUNT(`book`.`id`) > 1, 1, 0)
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff5`
|
||||||
|
LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id`
|
||||||
|
|
||||||
|
WHERE `ff5`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `book`.`tretment_id` = `ss`.`tretment_id`
|
||||||
|
AND `ff5`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
)) AS `repet`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff1`
|
||||||
|
LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id`
|
||||||
|
|
||||||
|
WHERE `ff1`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff1`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff1`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
)/(SELECT
|
||||||
|
COUNT(`bo2`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff`
|
||||||
|
LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id`
|
||||||
|
|
||||||
|
WHERE `ff`.`day_date` LIKE '$today%'
|
||||||
|
AND `ff`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
))*100) AS `deg`
|
||||||
|
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`
|
||||||
|
|
||||||
|
WHERE `bd`.`day_date` LIKE '$today%'
|
||||||
|
AND `rmp1`.`occupation_id` = 2
|
||||||
|
AND `branch`.`commercial_register_id` = 2
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`)
|
||||||
|
GROUP BY `rmp1`.`id`
|
||||||
|
ORDER BY `deg` DESC
|
||||||
|
");
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
?>
|
||||||
|
<tr style="background: <?php if ($get_book_details['groub_1'] == "true") {
|
||||||
|
echo "#9BBB59;";
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
echo "#D8E4BC;";
|
||||||
|
} elseif ($get_book_details['groub_4'] == "true") {
|
||||||
|
echo "#C0504D;";
|
||||||
|
} elseif (round($get_book_details['deg'], 2) < round(($get_book_details['frist_deg'] / 2), 2)) {
|
||||||
|
echo "#E6B8B7;";
|
||||||
|
} ?>">
|
||||||
|
<th scope="row"><?= $count ?></th>
|
||||||
|
<td><?= $get_book_details['name'] ?></td>
|
||||||
|
<td><?= $get_book_details['total_book'] ?></td>
|
||||||
|
<td><?= $get_book_details['count'] ?></td>
|
||||||
|
<td><?= round($get_book_details['deg'], 2) ?>%</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
if ($get_book_details['frist_3'] == "true" && $count == 1) {
|
||||||
|
$emp_total_1_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 2) {
|
||||||
|
$emp_total_1_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 3) {
|
||||||
|
$emp_total_1_temp = ($get_book_details['count'] / 2) * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
if ($get_book_details['groub_1'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
$emp_total_2_temp = ($get_book_details['total_book'] / 2) * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_3'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $emp_total_1_temp + $emp_total_2_temp ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$total_1 += $get_book_details['total_book'];
|
||||||
|
$total_2 += $get_book_details['count'];
|
||||||
|
$total_3 += $emp_total_1_temp;
|
||||||
|
$total_4 += $emp_total_2_temp;
|
||||||
|
$total_5 += $emp_total_1_temp + $emp_total_2_temp;
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr style="background: #4F81BD;">
|
||||||
|
<td colspan="2">
|
||||||
|
المجموع
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $total_1 ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $total_2 ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= round(($total_2 / $total_1) * 100, 2) . '%' ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $total_3 ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $total_4 ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $total_5 ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button type="button" id="export_button" class="btn btn-success btn-sm">ملف excel</button>
|
||||||
|
<button type="button" id="test" class="btn btn-success btn-sm">test</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js"></script>
|
||||||
|
<script src="../assets/js/xlsx-js-style/dist/xlsx.bundle.js"></script>
|
||||||
|
<script>
|
||||||
|
$("#Select-date").change(function () {
|
||||||
|
var SelectedDate = $(this).val();
|
||||||
|
window.location = 'emp_come_back?b=<?= $branch_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
function html_table_to_excel(type) {
|
||||||
|
var data = document.getElementById('employee_data');
|
||||||
|
console.log(data)
|
||||||
|
var file = XLSX.utils.table_to_book(data, { sheet: "sheet1" });
|
||||||
|
|
||||||
|
XLSX.write(file, { bookType: type, bookSST: true, type: 'base64' });
|
||||||
|
XLSX.writeFile(file, 'ايراد الفرع.' + type);
|
||||||
|
}
|
||||||
|
const export_button = document.getElementById('export_button');
|
||||||
|
export_button.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
|
||||||
|
function html_table_to_excel(type) {
|
||||||
|
// STEP 1: Create a new workbook
|
||||||
|
const wb = XLSX.utils.book_new();
|
||||||
|
|
||||||
|
// STEP 2: Create data rows and styles
|
||||||
|
let row = [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
v: "Courier: 24",
|
||||||
|
t: "s",
|
||||||
|
s: { font: { name: "Courier", sz: 24 } }
|
||||||
|
},
|
||||||
|
{ v: "bold & color", t: "s", s: { font: { bold: true, color: { rgb: "FF0000" } } } },
|
||||||
|
{ v: "fill: color", t: "s", s: { fill: { fgColor: { rgb: "E9E9E9" } } } },
|
||||||
|
{ v: "line\nbreak", t: "s", s: { alignment: { wrapText: true } } }
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
v: "Courier: 24",
|
||||||
|
t: "s",
|
||||||
|
s: { font: { name: "Courier", sz: 24 } }
|
||||||
|
},
|
||||||
|
{ v: "bold & color", t: "s", s: { font: { bold: true, color: { rgb: "FF0000" } } } },
|
||||||
|
{ v: "fill: color", t: "s", s: { fill: { fgColor: { rgb: "E9E9E9" } } } },
|
||||||
|
{ v: "line\nbreak", t: "s", s: { alignment: { wrapText: true } } }
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
// STEP 3: Create worksheet with rows; Add worksheet to workbook
|
||||||
|
const ws = XLSX.utils.aoa_to_sheet(row);
|
||||||
|
XLSX.utils.book_append_sheet(wb, ws, "readme demo");
|
||||||
|
|
||||||
|
// STEP 4: Write Excel file to browser
|
||||||
|
XLSX.writeFile(wb, "sdemo.xlsx");
|
||||||
|
}
|
||||||
|
const tt = document.getElementById('test');
|
||||||
|
tt.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
496
emp_come_back_1_year.php
Normal file
496
emp_come_back_1_year.php
Normal file
@ -0,0 +1,496 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(35);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$Next = date('Y-m', strtotime('+1 month', strtotime($today)));
|
||||||
|
$Previous = date('Y-m', strtotime('-1 month', strtotime($today)));
|
||||||
|
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!empty($_GET['b'])) {
|
||||||
|
$branch_id = $_GET['b'];
|
||||||
|
if (!is_numeric($branch_id)) {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$branch_id = 1;
|
||||||
|
}
|
||||||
|
$branch_sql = '='.$branch_id;
|
||||||
|
if ($branch_id == 1) {
|
||||||
|
$branch_sql = '<>'.$branch_id;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!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">
|
||||||
|
<style>
|
||||||
|
a.active {
|
||||||
|
background-color: #e6edef;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
background: #24695c;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: white;
|
||||||
|
margin-left: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="email-wrap bookmark-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-2 col-xl-2">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body new-user order-list profile-nav">
|
||||||
|
<div class="nav flex-column nav-pills" id="profile-tab" aria-orientation="vertical">
|
||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT `branch`.`branch_name`, `branch`.`id`
|
||||||
|
FROM `commercial_register`
|
||||||
|
LEFT JOIN `branch` ON `commercial_register`.`id` = `branch`.`commercial_register_id`"
|
||||||
|
);
|
||||||
|
while ($commercial_register = mysqli_fetch_assoc($commercial_register_sql)) {
|
||||||
|
?>
|
||||||
|
<a class="nav-link mb-0 <?php if($branch_id == $commercial_register['id']){echo 'active';}?> ?>" data-toggle="pill" href="#branch-<?=$commercial_register['id']?>" aria-selected="false" onclick="window.location='emp_come_back_1_year?b=<?=$commercial_register['id']?>&date=<?=$today?>'"><?=$commercial_register['branch_name']?></a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-10 col-xl-10">
|
||||||
|
<div class="card">
|
||||||
|
<div class="tab-content" id="profile-tabContent">
|
||||||
|
<div class="tab-pane fade show active" id="all">
|
||||||
|
<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>
|
||||||
|
تقرير نسبة الرجوع من بداية سنة 23 الى اليوم
|
||||||
|
<br/>
|
||||||
|
<?=$today?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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 id="employee_data" class="table table-bordered text-center" style="vertical-align: middle;">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<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>
|
||||||
|
<th scope="col">المبلغ المستحق جديد</th>
|
||||||
|
<th scope="col">الاجمالي</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$count = 1;
|
||||||
|
$total_1 = 0;
|
||||||
|
$total_2 = 0;
|
||||||
|
$total_3 = 0;
|
||||||
|
$total_4 = 0;
|
||||||
|
$total_5 = 0;
|
||||||
|
$emp_total = 0;
|
||||||
|
$get_conferm_sql = mysqli_query($db, "SELECT * FROM `r_customer_return_rate_report` WHERE DATE_FORMAT(`date`, '%Y-%m') = '$today' AND `branch_id` $branch_sql ORDER BY `deg` DESC");
|
||||||
|
if (mysqli_num_rows($get_conferm_sql) > 0) {
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_conferm_sql)) {
|
||||||
|
?>
|
||||||
|
<tr style="background: <?php if ($get_book_details['groub_1'] == "true") {
|
||||||
|
echo "#9BBB59;";
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
echo "#D8E4BC;";
|
||||||
|
} elseif ($get_book_details['groub_4'] == "true") {
|
||||||
|
echo "#C0504D;";
|
||||||
|
} elseif (round($get_book_details['deg'],2) < round(($get_book_details['frist_deg']/2),2)) {
|
||||||
|
echo "#E6B8B7;";
|
||||||
|
}?>">
|
||||||
|
<th scope="row"><?=$count?></th>
|
||||||
|
<td><?=$get_book_details['name']?></td>
|
||||||
|
<td><?=$get_book_details['total_book']?></td>
|
||||||
|
<td><?=$get_book_details['count']?></td>
|
||||||
|
<td><?=round($get_book_details['deg'],2)?>%</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
if ($get_book_details['frist_3'] == "true" && $count == 1) {
|
||||||
|
$emp_total_1_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 2) {
|
||||||
|
$emp_total_1_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 3) {
|
||||||
|
$emp_total_1_temp = ($get_book_details['count'] / 2) * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
if ($get_book_details['groub_1'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
$emp_total_2_temp = ($get_book_details['total_book']/2) * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_3'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $emp_total_1_temp+$emp_total_2_temp?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$total_1 += $get_book_details['total_book'];
|
||||||
|
$total_2 += $get_book_details['count'];
|
||||||
|
$total_3 += $emp_total_1_temp;
|
||||||
|
$total_4 += $emp_total_2_temp;
|
||||||
|
$total_5 += $emp_total_1_temp + $emp_total_2_temp;
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
|
||||||
|
(SELECT (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) AS `ddgres` FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY `ddgres` DESC LIMIT 1) AS `frist_deg`,
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 2, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `frist_3`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 2, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `groub_1`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 3, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 4, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 5, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `groub_2`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 1, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 2, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 3, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 4, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) DESC LIMIT 5, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1, 1) THEN 'false'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 2, 1) THEN 'false'
|
||||||
|
ELSE 'true'
|
||||||
|
END AS `groub_3`,
|
||||||
|
|
||||||
|
CASE
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 1, 1) THEN 'true'
|
||||||
|
WHEN `rmp1`.`id` = (SELECT `rmp1`.`id`FROM `book_details` AS `bd` LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`WHERE `bd`.`day_date` > '2022-12-31' AND `rmp1`.`occupation_id` = 2 AND `branch`.`commercial_register_id` = 2 AND `bd`.`branch_id` <> 1 AND `bd`.`status_id` IN (6,8,12,13,14,15) AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`) GROUP BY `rmp1`.`id` ORDER BY (((SELECT SUM((SELECT IF(COUNT(`book`.`id`) > 1, 1, 0) FROM `book_details` AS `ff5` LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id` WHERE `ff5`.`emplyee_id` = `rmp1`.`id` AND `book`.`tretment_id` = `ss`.`tretment_id` AND `ff5`.`status_id` IN (6,8,12,13,14,15) AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`))) AS `repet` FROM `book_details` AS `ff1` LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id` WHERE `ff1`.`day_date` > '2022-12-31' AND `ff1`.`emplyee_id` = `rmp1`.`id` AND `ff1`.`status_id` IN (6,8,12,13,14,15) AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`))/(SELECT COUNT(`bo2`.`id`) AS `count` FROM `book_details` AS `ff` LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id` WHERE `ff`.`day_date` > '2022-12-31' AND `ff`.`emplyee_id` = `rmp1`.`id` AND `ff`.`status_id` IN (6,8,12,13,14,15) AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)))*100) ASC LIMIT 2, 1) THEN 'true'
|
||||||
|
ELSE 'false'
|
||||||
|
END AS `groub_4`,
|
||||||
|
|
||||||
|
`rmp1`.`id`,
|
||||||
|
`rmp1`.`name`,
|
||||||
|
|
||||||
|
(SELECT
|
||||||
|
COUNT(`bo2`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff`
|
||||||
|
LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id`
|
||||||
|
|
||||||
|
WHERE `ff`.`day_date` > '2022-12-31'
|
||||||
|
AND `ff`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
) AS `total_book`,
|
||||||
|
|
||||||
|
(SELECT
|
||||||
|
SUM((SELECT
|
||||||
|
IF(COUNT(`book`.`id`) > 1, 1, 0)
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff5`
|
||||||
|
LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id`
|
||||||
|
|
||||||
|
WHERE `ff5`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `book`.`tretment_id` = `ss`.`tretment_id`
|
||||||
|
AND `ff5`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
)) AS `repet`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff1`
|
||||||
|
LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id`
|
||||||
|
|
||||||
|
WHERE `ff1`.`day_date` > '2022-12-31'
|
||||||
|
AND `ff1`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff1`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND
|
||||||
|
AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
) AS `count`,
|
||||||
|
|
||||||
|
(((SELECT
|
||||||
|
SUM((SELECT
|
||||||
|
IF(COUNT(`book`.`id`) > 1, 1, 0)
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff5`
|
||||||
|
LEFT JOIN `book` ON `ff5`.`book_id` = `book`.`id`
|
||||||
|
|
||||||
|
WHERE `ff5`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `book`.`tretment_id` = `ss`.`tretment_id`
|
||||||
|
AND `ff5`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff5`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff5`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
)) AS `repet`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff1`
|
||||||
|
LEFT JOIN `book` AS `ss` ON `ff1`.`book_id` = `ss`.`id`
|
||||||
|
|
||||||
|
WHERE `ff1`.`day_date` > '2022-12-31'
|
||||||
|
AND `ff1`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff1`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff1`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff1`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
)/(SELECT
|
||||||
|
COUNT(`bo2`.`id`) AS `count`
|
||||||
|
|
||||||
|
FROM `book_details` AS `ff`
|
||||||
|
LEFT JOIN `book` AS `bo2` ON `ff`.`book_id` = `bo2`.`id`
|
||||||
|
|
||||||
|
WHERE `ff`.`day_date` > '2022-12-31'
|
||||||
|
AND `ff`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
AND `ff`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `ff`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` WHERE `book_details`.`book_id` = `ff`.`book_id` GROUP BY `book_details`.`book_id`)
|
||||||
|
))*100) AS `deg`
|
||||||
|
|
||||||
|
FROM `book_details` AS `bd`
|
||||||
|
LEFT JOIN `book` AS `bo1` ON `bd`.`book_id` = `bo1`.`id`
|
||||||
|
LEFT JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
LEFT JOIN `emplyee` AS `rmp1` ON `bd`.`emplyee_id` = `rmp1`.`id`
|
||||||
|
LEFT JOIN `branch` ON `rmp1`.`branch_id` = `branch`.`id`
|
||||||
|
|
||||||
|
WHERE `bd`.`day_date` > '2022-12-31'
|
||||||
|
AND `rmp1`.`occupation_id` = 2
|
||||||
|
AND `branch`.`commercial_register_id` = 2
|
||||||
|
AND `bd`.`branch_id` $branch_sql
|
||||||
|
AND `bd`.`status_id` IN (6,8,12,13,14,15)
|
||||||
|
AND `bd`.`id` IN (SELECT MAX(`book_details`.`id`) FROM `book_details` GROUP BY `book_details`.`book_id`)
|
||||||
|
GROUP BY `rmp1`.`id`
|
||||||
|
ORDER BY `deg` DESC
|
||||||
|
");
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
?>
|
||||||
|
<tr style="background: <?php if ($get_book_details['groub_1'] == "true") {
|
||||||
|
echo "#9BBB59;";
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
echo "#D8E4BC;";
|
||||||
|
} elseif ($get_book_details['groub_4'] == "true") {
|
||||||
|
echo "#C0504D;";
|
||||||
|
} elseif (round($get_book_details['deg'],2) < round(($get_book_details['frist_deg']/2),2)) {
|
||||||
|
echo "#E6B8B7;";
|
||||||
|
}?>">
|
||||||
|
<th scope="row"><?=$count?></th>
|
||||||
|
<td><?=$get_book_details['name']?></td>
|
||||||
|
<td><?=$get_book_details['total_book']?></td>
|
||||||
|
<td><?=$get_book_details['count']?></td>
|
||||||
|
<td><?=round($get_book_details['deg'],2)?>%</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
if ($get_book_details['frist_3'] == "true" && $count == 1) {
|
||||||
|
$emp_total_1_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 2) {
|
||||||
|
$emp_total_1_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} elseif ($get_book_details['frist_3'] == "true" && $count == 3) {
|
||||||
|
$emp_total_1_temp = ($get_book_details['count'] / 2) * 5;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_1_temp = 0;
|
||||||
|
echo $emp_total_1_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
if ($get_book_details['groub_1'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['total_book'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_2'] == "true") {
|
||||||
|
$emp_total_2_temp = ($get_book_details['total_book']/2) * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} elseif ($get_book_details['groub_3'] == "true") {
|
||||||
|
$emp_total_2_temp = $get_book_details['count'] * 5;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
} else {
|
||||||
|
$emp_total_2_temp = 0;
|
||||||
|
echo $emp_total_2_temp;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?= $emp_total_1_temp+$emp_total_2_temp?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$total_1 += $get_book_details['total_book'];
|
||||||
|
$total_2 += $get_book_details['count'];
|
||||||
|
$total_3 += $emp_total_1_temp;
|
||||||
|
$total_4 += $emp_total_2_temp;
|
||||||
|
$total_5 += $emp_total_1_temp + $emp_total_2_temp;
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr style="background: #4F81BD;">
|
||||||
|
<td colspan="2">
|
||||||
|
المجموع
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=$total_1?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=$total_2?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=round(($total_2/$total_1)*100,2).'%'?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=$total_3?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=$total_4?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?=$total_5?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<button type="button" id="export_button" class="btn btn-success btn-sm">ملف excel</button>
|
||||||
|
<button type="button" id="test" class="btn btn-success btn-sm">test</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js"></script>
|
||||||
|
<script src="../assets/js/xlsx-js-style/dist/xlsx.bundle.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function html_table_to_excel(type)
|
||||||
|
{
|
||||||
|
var data = document.getElementById('employee_data');
|
||||||
|
console.log(data)
|
||||||
|
var file = XLSX.utils.table_to_book(data, {sheet: "sheet1"});
|
||||||
|
|
||||||
|
XLSX.write(file, { bookType: type, bookSST: true, type: 'base64' });
|
||||||
|
XLSX.writeFile(file, 'ايراد الفرع.' + type);
|
||||||
|
}
|
||||||
|
const export_button = document.getElementById('export_button');
|
||||||
|
export_button.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
|
||||||
|
function html_table_to_excel(type)
|
||||||
|
{
|
||||||
|
// STEP 1: Create a new workbook
|
||||||
|
const wb = XLSX.utils.book_new();
|
||||||
|
|
||||||
|
// STEP 2: Create data rows and styles
|
||||||
|
let row = [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
v: "Courier: 24",
|
||||||
|
t: "s",
|
||||||
|
s: { font: { name: "Courier", sz: 24 } }
|
||||||
|
},
|
||||||
|
{ v: "bold & color", t: "s", s: { font: { bold: true, color: { rgb: "FF0000" } } } },
|
||||||
|
{ v: "fill: color", t: "s", s: { fill: { fgColor: { rgb: "E9E9E9" } } } },
|
||||||
|
{ v: "line\nbreak", t: "s", s: { alignment: { wrapText: true } } }
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
v: "Courier: 24",
|
||||||
|
t: "s",
|
||||||
|
s: { font: { name: "Courier", sz: 24 } }
|
||||||
|
},
|
||||||
|
{ v: "bold & color", t: "s", s: { font: { bold: true, color: { rgb: "FF0000" } } } },
|
||||||
|
{ v: "fill: color", t: "s", s: { fill: { fgColor: { rgb: "E9E9E9" } } } },
|
||||||
|
{ v: "line\nbreak", t: "s", s: { alignment: { wrapText: true } } }
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
// STEP 3: Create worksheet with rows; Add worksheet to workbook
|
||||||
|
const ws = XLSX.utils.aoa_to_sheet(row);
|
||||||
|
XLSX.utils.book_append_sheet(wb, ws, "readme demo");
|
||||||
|
|
||||||
|
// STEP 4: Write Excel file to browser
|
||||||
|
XLSX.writeFile(wb, "sdemo.xlsx");
|
||||||
|
}
|
||||||
|
const tt = document.getElementById('test');
|
||||||
|
tt.addEventListener('click', () => {
|
||||||
|
html_table_to_excel('xlsx');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php require_once('fixed/waiting_ajax/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
20
emp_pedicure_points.php
Normal file
20
emp_pedicure_points.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
|
||||||
|
if ($_GET['m'] == 1) {
|
||||||
|
require_once('work/files/reports/emp_pedicure_points/2.php');
|
||||||
|
} else {
|
||||||
|
$variable = 2;
|
||||||
|
switch ($variable) {
|
||||||
|
case '1':
|
||||||
|
require_once('work/files/reports/emp_pedicure_points/1.php');
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
require_once('work/files/reports/emp_pedicure_points/2.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
require_once('work/files/reports/emp_pedicure_points/1.php');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
17
emp_pedicure_points_d.php
Normal file
17
emp_pedicure_points_d.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
|
||||||
|
if ($_GET['m'] == 1) {
|
||||||
|
require_once('work/files/reports/emp_pedicure_points_d/2.php');
|
||||||
|
} else {
|
||||||
|
$variable = 1;
|
||||||
|
switch ($variable) {
|
||||||
|
case '1':
|
||||||
|
require_once('work/files/reports/emp_pedicure_points_d/1.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
require_once('work/files/reports/emp_pedicure_points_d/1.php');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
26
emp_points.php
Normal file
26
emp_points.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(37);
|
||||||
|
|
||||||
|
if ($_GET['m'] == 50) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$variable = 2;
|
||||||
|
switch ($variable) {
|
||||||
|
case '1':
|
||||||
|
require_once('work/files/reports/emp_points/1.php');
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
require_once('work/files/reports/emp_points/2.php');
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
196
emp_points_d.php
Normal file
196
emp_points_d.php
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(45);
|
||||||
|
|
||||||
|
$today = date("Y-m");
|
||||||
|
if (!empty($_GET['date'])) {
|
||||||
|
$today = $_GET['date'];
|
||||||
|
if (DateTime::createFromFormat('Y-m', $today) == false) {
|
||||||
|
$today = date("Y-m");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$emp_id = mysqli_real_escape_string($db, $_GET['id']);
|
||||||
|
if (!empty($emp_id)) {
|
||||||
|
if (!is_numeric($emp_id)) {
|
||||||
|
$emp_id = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$Next = date('Y-m', strtotime('+1 month', strtotime($today)));
|
||||||
|
$Previous = date('Y-m', strtotime('-1 month', strtotime($today)));
|
||||||
|
?>
|
||||||
|
<!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'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<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>
|
||||||
|
تفاصيل نقاط المدلك
|
||||||
|
<br />
|
||||||
|
<?= $today ?>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
||||||
|
</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="emp_points_d.php?id=<?=$emp_id ?>&date=<?= $Previous ?>" 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="emp_points_d.php?id=<?=$emp_id ?>&date=<?= $Next ?>" 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>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<thead class="table-primary" style="vertical-align: middle;">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2" scope="col">#</th>
|
||||||
|
<th rowspan="2" scope="col">اسم العميل</th>
|
||||||
|
<th rowspan="2" scope="col">رقم العميل</th>
|
||||||
|
<th rowspan="2" scope="col">تاريخ الحجز</th>
|
||||||
|
<th rowspan="2" scope="col">وقت الحجز</th>
|
||||||
|
<th rowspan="2" scope="col">الخدمة</th>
|
||||||
|
<th rowspan="2" scope="col">المبلغ</th>
|
||||||
|
<th rowspan="2" scope="col">النقاط</th>
|
||||||
|
<th rowspan="2" scope="col">x 15</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$total = 0;
|
||||||
|
$inv_price = 0;
|
||||||
|
$get_book_details_sql = mysqli_query($db,
|
||||||
|
"SELECT
|
||||||
|
`invoices`.`price`,
|
||||||
|
`bd`.`day_date`,
|
||||||
|
`bd`.`day_time`,
|
||||||
|
`services`.`name`,
|
||||||
|
`services`.`price` AS `serv_p`,
|
||||||
|
`services`.`point`,
|
||||||
|
`tretment`.`name` AS `tr_name`,
|
||||||
|
`tretment`.`number`,
|
||||||
|
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`.`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`.`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 `invoices` ON `invoices_has_book`.`invoices_id` = `invoices`.`id`
|
||||||
|
INNER JOIN `tretment` ON `book`.`tretment_id` = `tretment`.`id`
|
||||||
|
INNER JOIN `services` ON `bd`.`services_id` = `services`.`id`
|
||||||
|
INNER JOIN `emplyee` ON `bd`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `bd`.`day_date` LIKE '$today%'
|
||||||
|
AND `bd`.`emplyee_id`='$emp_id'
|
||||||
|
AND `emplyee`.`occupation_id` = 2
|
||||||
|
AND `bd`.`status_id` IN (6,8,12,13,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`
|
||||||
|
");
|
||||||
|
$count = 1;
|
||||||
|
while ($get_book_details = mysqli_fetch_assoc($get_book_details_sql)) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><?=$count?></th>
|
||||||
|
<td><?=$get_book_details['tr_name']?></td>
|
||||||
|
<td><?=$get_book_details['number']?></td>
|
||||||
|
<td><?=$get_book_details['day_date']?></td>
|
||||||
|
<td><?=$get_book_details['day_time']?></td>
|
||||||
|
<td><?=$get_book_details['name']?></td>
|
||||||
|
<td><?=round(($get_book_details['serv_p'] - $get_book_details['desc']) + (($get_book_details['serv_p'] - $get_book_details['desc'])*15/100),2)?></td>
|
||||||
|
<td><?=$get_book_details['point']?></td>
|
||||||
|
<td><?=$get_book_details['point'] * 15?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$inv_price += round(($get_book_details['serv_p'] - $get_book_details['desc']) + (($get_book_details['serv_p'] - $get_book_details['desc'])*15/100),2);
|
||||||
|
$total += $get_book_details['point'];
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td colspan = "6">المجموع</td>
|
||||||
|
<td><?= $inv_price ?></td>
|
||||||
|
<td><?= $total ?></td>
|
||||||
|
<td><?= $total * 15 ?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--end card-body-->
|
||||||
|
</div>
|
||||||
|
<!--end card-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</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 = 'emp_points_d.php?id=<?=$emp_id ?>&date=' + SelectedDate
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
205
emplyees.php
Normal file
205
emplyees.php
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(22);
|
||||||
|
|
||||||
|
$type = $_GET['t'];
|
||||||
|
$type_sql = '<> 0';
|
||||||
|
if (!empty($type)) {
|
||||||
|
if (is_numeric($type)) {
|
||||||
|
$type_sql = '= '.$type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?php require_once('fixed/loader/go.php'); ?>
|
||||||
|
<!-- page-wrapper Start-->
|
||||||
|
<div class="page-wrapper" id="pageWrapper">
|
||||||
|
<?php require_once('fixed/header/go.php'); ?>
|
||||||
|
<!-- Page Body Start-->
|
||||||
|
<div class="page-body-wrapper">
|
||||||
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
||||||
|
<div class="page-body">
|
||||||
|
<!-- Container-fluid starts-->
|
||||||
|
<div class="container-fluid user-card">
|
||||||
|
<div class="row">
|
||||||
|
<?php
|
||||||
|
$get_emplyee_sql = mysqli_query($db, "SELECT
|
||||||
|
`emplyee`.`id`,
|
||||||
|
`emplyee`.`name`,
|
||||||
|
`emplyee`.`his_img`,
|
||||||
|
`emplyee`.`activation_id` AS `emp_active`,
|
||||||
|
`user`.`username`,
|
||||||
|
`user`.`activation_id`,
|
||||||
|
`occupation`.`name` AS `occ_name`,
|
||||||
|
`occupation`.`show_in_table_id`
|
||||||
|
FROM `emplyee`
|
||||||
|
LEFT JOIN `occupation` ON `emplyee`.`occupation_id` = `occupation`.`id`
|
||||||
|
LEFT JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
||||||
|
LEFT JOIN `user` ON `user`.`emplyee_id` = `emplyee`.`id`
|
||||||
|
|
||||||
|
WHERE `emplyee`.`occupation_id` $type_sql
|
||||||
|
AND `branch`.`commercial_register_id` = $commercial_register_id
|
||||||
|
ORDER BY `emplyee`.`activation_id` DESC
|
||||||
|
");
|
||||||
|
$data = array();
|
||||||
|
$data[1] = array();
|
||||||
|
$data[2] = array();
|
||||||
|
while ($get_emplyee = mysqli_fetch_assoc($get_emplyee_sql)) {
|
||||||
|
if ($get_emplyee['emp_active'] == 1) {
|
||||||
|
array_push($data[2], $get_emplyee);
|
||||||
|
}
|
||||||
|
if ($get_emplyee['emp_active'] == 2) {
|
||||||
|
array_push($data[1], $get_emplyee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for ($i=0; $i < count($data[1]); $i++) {
|
||||||
|
?>
|
||||||
|
<div class="col-md-6 col-lg-6 col-xl-4 box-col-6">
|
||||||
|
<div class="card custom-card">
|
||||||
|
<div class="card-profile">
|
||||||
|
<img class="rounded-circle" src="uploads/emplyee/user/1.png" alt="" style="
|
||||||
|
background: linear-gradient(225deg,
|
||||||
|
<?php
|
||||||
|
switch ($data[1][$i]['activation_id']) {
|
||||||
|
case 1:
|
||||||
|
echo '#e10505, ';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
echo '#00ff28, ';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo '#e10505, ';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
switch ($data[1][$i]['show_in_table_id']) {
|
||||||
|
case 1:
|
||||||
|
echo '#00ff28';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
switch ($data[1][$i]['emp_active']) {
|
||||||
|
case 1:
|
||||||
|
echo '#e10505';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
echo '#00ff28';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo '#e10505';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
);">
|
||||||
|
</div>
|
||||||
|
<ul class="card-social">
|
||||||
|
<li><a href="edit_emplyee.php?id=<?=$data[1][$i]['id']?>"><i class="fa fa-cog"></i></a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="text-center profile-details"><a href="user-profile.html">
|
||||||
|
<h4><?=$data[1][$i]['name']?></h4></a>
|
||||||
|
<h6><?=$data[1][$i]['occ_name']?></h6>
|
||||||
|
<?php
|
||||||
|
if ($admin_id == 1) {
|
||||||
|
?>
|
||||||
|
<h6><?=$data[1][$i]['username']?></h6>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<?php
|
||||||
|
for ($i=0; $i < count($data[2]); $i++) {
|
||||||
|
?>
|
||||||
|
<div class="col-md-6 col-lg-6 col-xl-4 box-col-6">
|
||||||
|
<div class="card custom-card" style="background: #ffdfdf;">
|
||||||
|
<div class="card-profile">
|
||||||
|
<img class="rounded-circle" src="uploads/emplyee/user/1.png" alt="" style="
|
||||||
|
background: linear-gradient(225deg,
|
||||||
|
<?php
|
||||||
|
switch ($data[2][$i]['activation_id']) {
|
||||||
|
case 1:
|
||||||
|
echo '#e10505, ';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
echo '#00ff28, ';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo '#e10505, ';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
switch ($data[2][$i]['show_in_table_id']) {
|
||||||
|
case 1:
|
||||||
|
echo '#00ff28';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
switch ($data[2][$i]['emp_active']) {
|
||||||
|
case 1:
|
||||||
|
echo '#e10505';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
echo '#00ff28';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
echo '#e10505';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
);">
|
||||||
|
</div>
|
||||||
|
<ul class="card-social">
|
||||||
|
<li><a href="edit_emplyee.php?id=<?=$data[2][$i]['id']?>"><i class="fa fa-cog"></i></a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="text-center profile-details"><a href="user-profile.html">
|
||||||
|
<h4><?=$data[2][$i]['name']?></h4></a>
|
||||||
|
<h6><?=$data[2][$i]['occ_name']?></h6>
|
||||||
|
<?php
|
||||||
|
if ($admin_id == 1) {
|
||||||
|
?>
|
||||||
|
<h6><?=$data[1][$i]['username']?></h6>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Container-fluid Ends-->
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
586
faq.php
Normal file
586
faq.php
Normal file
@ -0,0 +1,586 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(50);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<?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="faq-wrap">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-4 xl-100 box-col-12">
|
||||||
|
<div class="card bg-primary">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media faq-widgets">
|
||||||
|
<div class="media-body">
|
||||||
|
<h5>مقالات</h5>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div><i data-feather="file-text"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-4 xl-50 col-md-6 box-col-6">
|
||||||
|
<div class="card bg-primary">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media faq-widgets">
|
||||||
|
<div class="media-body">
|
||||||
|
<h5>قاعدة المعرفة</h5>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div><i data-feather="book-open"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-4 xl-50 col-md-6 box-col-6">
|
||||||
|
<div class="card bg-primary">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media faq-widgets">
|
||||||
|
<div class="media-body">
|
||||||
|
<h5>الدعم</h5>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div><i data-feather="aperture"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="header-faq">
|
||||||
|
<h5 class="mb-0">يتم الرد على الأسئلة السريعة</h5>
|
||||||
|
</div>
|
||||||
|
<div class="row default-according style-1 faq-accordion" id="accordionoc">
|
||||||
|
<div class="col-xl-8 xl-60 col-lg-6 col-md-7 box-col-8">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon" aria-expanded="false" aria-controls="collapseicon"><i data-feather="help-circle"></i> Integrating WordPress with Your Website?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon" aria-labelledby="collapseicon" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon2" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i> WordPress Site Maintenance ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon2" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon3" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>Meta Tags in WordPress ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon3" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon4" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i> WordPress in Your Language ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon4" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="faq-title">
|
||||||
|
<h6>الملكية الفكرية</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon5" aria-expanded="false"><i data-feather="help-circle"></i> WordPress Site Maintenance ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon5" aria-labelledby="collapseicon5" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon7" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i> WordPress in Your Language ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon7" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon8" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>Integrating WordPress with Your Website ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon8" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="faq-title">
|
||||||
|
<h6>البيع والشراء</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon9" aria-expanded="false"><i data-feather="help-circle"></i> WordPress Site Maintenance ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon9" aria-labelledby="collapseicon9" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon10" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>Meta Tags in WordPress ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon10" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon11" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>Validating a Website ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon11" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon12" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>Know Your Sources ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon12" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="faq-title">
|
||||||
|
<h6>حسابات المستخدمين</h6>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon13" aria-expanded="false"><i data-feather="help-circle"></i>Integrating WordPress with Your Website ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon13" aria-labelledby="collapseicon13" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon14" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>WordPress Site Maintenance ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon14" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon16" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i> WordPress in Your Language ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon16" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon17" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i> Validating a Website ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon17" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h5 class="mb-0">
|
||||||
|
<button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapseicon18" aria-expanded="false" aria-controls="collapseicon2"><i data-feather="help-circle"></i>Meta Tags in WordPress ?</button>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
|
<div class="collapse" id="collapseicon18" data-parent="#accordionoc">
|
||||||
|
<div class="card-body">
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-4 xl-40 col-lg-6 col-md-5 box-col-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card card-mb-faq xs-mt-search">
|
||||||
|
<div class="card-header faq-header">
|
||||||
|
<h5 class="ps-0">مقالات البحث</h5><i data-feather="help-circle"></i>
|
||||||
|
</div>
|
||||||
|
<div class="card-body faq-body">
|
||||||
|
<div class="faq-form">
|
||||||
|
<input class="form-control" type="text" placeholder="Search.."><i class="search-icon" data-feather="search"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card card-mb-faq">
|
||||||
|
<div class="card-header faq-header">
|
||||||
|
<h5 class="ps-0">التنقل</h5><i data-feather="settings"></i>
|
||||||
|
</div>
|
||||||
|
<div class="card-body faq-body">
|
||||||
|
<div class="navigation-btn"><a class="btn btn-primary" href="javascript:void(0)"><i class="m-r-10" data-feather="message-square"></i>Ask Question</a></div>
|
||||||
|
<div class="navigation-option">
|
||||||
|
<ul>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="edit"></i>Tutorials</a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="globe"></i>Help center</a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="book-open"></i>Knowledgebase</a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="file-text"></i>Articles</a><span class="badge badge-primary badge-pill pull-right">42</span></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="youtube"></i>Video Tutorials</a><span class="badge badge-primary badge-pill pull-right">648</span></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="message-circle"></i>Ask our community</a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="mail"></i>Contact us </a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="message-circle"></i>Ask our community</a></li>
|
||||||
|
<li><a href="javascript:void(0)"><i data-feather="mail"></i>Contact us</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header faq-header">
|
||||||
|
<h5 class="d-inline-block ps-0">Latest Updates</h5><span class="pull-right d-inline-block">See All</span>
|
||||||
|
</div>
|
||||||
|
<div class="card-body faq-body">
|
||||||
|
<div class="media updates-faq-main">
|
||||||
|
<div class="updates-faq"><i class="font-primary" data-feather="rotate-cw"></i></div>
|
||||||
|
<div class="media-body updates-bottom-time">
|
||||||
|
<p><a href="javascript:void(0)">David Linner </a>requested money back for a double debit card charge</p>
|
||||||
|
<p>10 minutes ago</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="media updates-faq-main">
|
||||||
|
<div class="updates-faq"><i class="font-primary" data-feather="dollar-sign"></i></div>
|
||||||
|
<div class="media-body updates-bottom-time">
|
||||||
|
<p>All sellers have received monthly payouts</p>
|
||||||
|
<p>2 hours ago</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="media updates-faq-main">
|
||||||
|
<div class="updates-faq"><i class="font-primary" data-feather="link"></i></div>
|
||||||
|
<div class="media-body updates-bottom-time">
|
||||||
|
<p>User Christopher <a href="javascript:void(0)">Wallace</a> is on hold and awaiting for staff reply</p>
|
||||||
|
<p>45 minutes ago</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="media updates-faq-main">
|
||||||
|
<div class="updates-faq"><i class="font-primary" data-feather="check"></i></div>
|
||||||
|
<div class="media-body updates-bottom-time">
|
||||||
|
<p>Ticket #43683 has been closed by <a href="javascript:void(0)">Victoria Wilson</a></p>
|
||||||
|
<p>Dec 7, 11:48</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 featured-tutorial">
|
||||||
|
<div class="header-faq">
|
||||||
|
<h5 class="mb-0">Featured Tutorials</h5>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-3 xl-50 col-sm-6 box-col-6">
|
||||||
|
<div class="card features-faq product-box">
|
||||||
|
<div class="faq-image product-img"><img class="img-fluid" src="../assets/images/faq/1.jpg" alt="">
|
||||||
|
<div class="product-hover">
|
||||||
|
<ul>
|
||||||
|
<li><i class="icon-link"></i></li>
|
||||||
|
<li><i class="icon-import"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body"><a href="learning-detailed.html">
|
||||||
|
<h6>Web Design</h6></a>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer"><span>Dec 15, 2019</span>
|
||||||
|
<ul class="rating pull-right">
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3 xl-50 col-sm-6 box-col-6">
|
||||||
|
<div class="card features-faq product-box">
|
||||||
|
<div class="faq-image product-img"><img class="img-fluid" src="../assets/images/faq/2.jpg" alt="">
|
||||||
|
<div class="product-hover">
|
||||||
|
<ul>
|
||||||
|
<li><i class="icon-link"></i></li>
|
||||||
|
<li><i class="icon-import"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body"><a href="learning-detailed.html">
|
||||||
|
<h6>Web Development</h6></a>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer"><span>Dec 15, 2019</span>
|
||||||
|
<ul class="rating pull-right">
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3 xl-50 col-sm-6 box-col-6">
|
||||||
|
<div class="card features-faq product-box">
|
||||||
|
<div class="faq-image product-img"><img class="img-fluid" src="../assets/images/faq/3.jpg" alt="">
|
||||||
|
<div class="product-hover">
|
||||||
|
<ul>
|
||||||
|
<li><i class="icon-link"></i></li>
|
||||||
|
<li><i class="icon-import"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body"><a href="learning-detailed.html">
|
||||||
|
<h6>UI Design</h6></a>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer"><span>Dec 15, 2019</span>
|
||||||
|
<ul class="rating pull-right">
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-3 xl-50 col-sm-6 box-col-6">
|
||||||
|
<div class="card features-faq product-box">
|
||||||
|
<div class="faq-image product-img"><img class="img-fluid" src="../assets/images/faq/4.jpg" alt="">
|
||||||
|
<div class="product-hover">
|
||||||
|
<ul>
|
||||||
|
<li><i class="icon-link"></i></li>
|
||||||
|
<li><i class="icon-import"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body"><a href="learning-detailed.html">
|
||||||
|
<h6>UX Design</h6></a>
|
||||||
|
<p>من المهم أن يكون لديك خدمة عملاء جيدة ، ومزود خدمة عملاء. يحتاج ثروة أينين إلى الألم. كتلة الياسمين. جنبا إلى جنب مع رفاقهم ، ستلد الجبال ريشًا ودفعًا عظيمًا ، وسيولد فأر سخيف.</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer"><span>Dec 15, 2019</span>
|
||||||
|
<ul class="rating pull-right">
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
<li><i class="fa fa-star font-primary"></i></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 faq-articles">
|
||||||
|
<div class="header-faq">
|
||||||
|
<h5 class="mb-0">Latest articles and videos</h5>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-4 col-md-6">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="codepen"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600">Using Video</h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="codepen"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600">Vel illum qu</h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="codepen"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600"> Cum sociis natoqu</h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-4 col-md-6">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="file-text"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600"> Donec pede justo</h6>
|
||||||
|
<p> Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="file-text"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600"> Nam quam nunc</h6>
|
||||||
|
<p> Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="file-text"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600">Using Video </h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-12 col-md-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="youtube"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600"> Vel illum qu</h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-12 col-md-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="youtube"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600"> Cum sociis natoqu</h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="media"><i class="m-r-30" data-feather="youtube"></i>
|
||||||
|
<div class="media-body">
|
||||||
|
<h6 class="f-w-600">Donec pede justo</h6>
|
||||||
|
<p>Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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 src="../assets/js/height-equal.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
391
father_day.php
Normal file
391
father_day.php
Normal file
@ -0,0 +1,391 @@
|
|||||||
|
<?php
|
||||||
|
require_once('fixed/config/go_con.php');
|
||||||
|
access(28);
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="rtl">
|
||||||
|
<?php require_once('fixed/head/go.php'); ?>
|
||||||
|
<body class="rtl">
|
||||||
|
<style>
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?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">
|
||||||
|
<h6 class="mt-0 header-title">البحث</h6>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">رقم الجوال</label>
|
||||||
|
<input id="number" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
|
||||||
|
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
|
||||||
|
<label for="" class="col-form-label text-right">العمر</label>
|
||||||
|
<input id="age" class="form-control clickfun1" type="number" value="" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_tretment">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
?>
|
||||||
|
<div class="card-body">
|
||||||
|
<ul class="nav nav-pills nav-justified" role="tablist">
|
||||||
|
<?php
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 1) {
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
<li class="nav-item waves-effect waves-light">
|
||||||
|
<a class="nav-link" id="tap_id<?=$type_of_services['id']?>-tab" data-bs-toggle="pill" href="#tap_id<?=$type_of_services['id']?>" role="tab" aria-controls="tap_id<?=$type_of_services['id']?>" aria-selected="false"><?=$type_of_services['name']?></a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="theService" class="form-group row">
|
||||||
|
<div class="tab-content" id="pills-tabContent">
|
||||||
|
<?php
|
||||||
|
$type_of_services_sql = mysqli_query($db, "SELECT `type_of_services`.`id`, `type_of_services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
INNER JOIN `type_of_services` ON `type_of_services`.`id` = `services`.`type_of_services_id`
|
||||||
|
WHERE `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2
|
||||||
|
GROUP BY `type_of_services`.`id`
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($type_of_services_sql) > 0) {
|
||||||
|
while ($type_of_services = mysqli_fetch_assoc($type_of_services_sql)) {
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="tab-pane fade" id="tap_id<?=$type_of_services['id']?>" role="tabpanel" aria-labelledby="tap_id<?=$type_of_services['id']?>-tab">
|
||||||
|
<div class="form-group row">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$temp_id = $type_of_services['id'];
|
||||||
|
$get_services_sql = mysqli_query($db, "SELECT
|
||||||
|
`services`.`id`,
|
||||||
|
`services`.`price`,
|
||||||
|
`services`.`name`
|
||||||
|
FROM `services`
|
||||||
|
WHERE `services`.`type_of_services_id` = $temp_id AND `services`.`commercial_register_id` = $commercial_register_id AND `services`.`activation_id` = 2 AND `services`.`id`= 1
|
||||||
|
");
|
||||||
|
if (mysqli_num_rows($get_services_sql) > 0) {
|
||||||
|
while ($services_row = mysqli_fetch_assoc($get_services_sql)) {
|
||||||
|
?>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="serv_<?=$services_row['id']?>" class="col-form-label text-right">اسم الخدمة</label>
|
||||||
|
<input id="serv_<?=$services_row['id']?>" class="form-control" type="text" value="<?=$services_row['name']?>" disabled>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6">
|
||||||
|
<label for="many_<?=$services_row['id']?>" class="col-form-label text-right">العدد</label>
|
||||||
|
<input id="many_<?=$services_row['id']?>" name="how_many" data-price="<?=round(($services_row['price']) + (($services_row['price'] * 15)/100),2)?>" data-id="<?=$services_row['id']?>" class="form-control clickfun1" type="number" value="0">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="add_services">حساب المبلغ</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body new-user order-list">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h2 class="text-center">
|
||||||
|
المبلغ المستحق
|
||||||
|
<span id="true_price" style="color:red">0</span>
|
||||||
|
ريال
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="pay" class="form-group row">
|
||||||
|
<hr>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<div style="border-left: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
كاش
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="cash_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="9" name="cash_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="border-right: 1px solid rgba(0,0,0);" class="form-group col-12 col-sm-6 col-md-4 col-lg-4 col-xl-4">
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<h4 class="text-center">
|
||||||
|
شبكة
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">المبلغ المدفوع</label>
|
||||||
|
<input name="card_pay" class="form-control" type="number" step="any" value="0">
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">نوع الكرت</label>
|
||||||
|
<div style="transform: translateY(-6px);">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_mada" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="1">
|
||||||
|
<label class="mb-0" for="card_type_mada">مدى</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_visa" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="2">
|
||||||
|
<label class="mb-0" for="card_type_visa">فيزا</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<div class="radio radio-primary">
|
||||||
|
<input type="radio" id="card_type_master" name="card_type" data-parsley-multiple="groups" data-parsley-mincheck="2" value="3">
|
||||||
|
<label class="mb-0" for="card_type_master">ماستر كارد</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">رقم التفويض</label>
|
||||||
|
<input name="card_approval_number" class="form-control" type="number" value="">
|
||||||
|
</div>
|
||||||
|
<div style="transform: translateY(-3px);" class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
|
||||||
|
<label for="" class="col-form-label text-right">ملاحظات</label>
|
||||||
|
<textarea rows="3" name="card_note" class="form-control" type="text"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-2"></div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div id="add_serv" class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;">سداد</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php require_once('fixed/footer/go.php'); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="get_data"></div>
|
||||||
|
<?php require_once('fixed/js/go.php'); ?>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
// search for tretment
|
||||||
|
searchClick = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#search_tretment").click(function() {
|
||||||
|
search_tretment();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
search_tretment();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function search_tretment() {
|
||||||
|
if ($("#number").val().length !== 9) {
|
||||||
|
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var tretmentNumber = $("#number").val();
|
||||||
|
let branch_id = <?=json_encode($booking_branch_id);?>;
|
||||||
|
var emp_id = <?=json_encode($emp_id);?>;
|
||||||
|
var booking_day_date = <?=json_encode($booking_day_date);?>;
|
||||||
|
var booking_day_time = <?=json_encode($booking_day_time);?>;
|
||||||
|
if (searchClick == 0) {
|
||||||
|
searchClick++;
|
||||||
|
$.post("work/order/ajax/get_tretment_ajax.php", {
|
||||||
|
tretmentNumber,
|
||||||
|
branch_id,
|
||||||
|
emp_id,
|
||||||
|
booking_day_date,
|
||||||
|
booking_day_time,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_tretment").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار","", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// add booking
|
||||||
|
click = 0;
|
||||||
|
$(function() {
|
||||||
|
$("#add_services").click(function() {
|
||||||
|
add_services();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun1').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_services();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let total = 0;
|
||||||
|
let data = {};
|
||||||
|
function add_services() {
|
||||||
|
total = 0;
|
||||||
|
desc_d = 0;
|
||||||
|
$("input[name='how_many']").each(function(){
|
||||||
|
if (parseInt($(this).val()) == 1 || parseInt($(this).val()) == 3) {
|
||||||
|
data[$(this)[0].getAttribute("data-id")] = parseInt($(this).val());
|
||||||
|
switch (parseInt($(this).val())) {
|
||||||
|
case 1:
|
||||||
|
total += parseFloat($(this).attr('data-price')) * parseInt($(this).val());
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
total += 460;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
swalfun('حدث خطأ', 'الحد الاقصى 3 جلسات', 'error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (Object.keys(data).length == 0) {
|
||||||
|
swalfun('حدث خطأ', 'لا يوجد اي خدمة مضافة او الحد الاقصى 3 جلسات', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let age = parseInt($("#age").val());
|
||||||
|
if (age >= 60 && age <= 100) {
|
||||||
|
if(age != 100) {
|
||||||
|
desc = total * parseFloat("0."+age);
|
||||||
|
total = total - desc;
|
||||||
|
} else {
|
||||||
|
total = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (data['1']) {
|
||||||
|
case 1:
|
||||||
|
desc_d = 100-((total/230)*100)
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
desc_d = 100-((total/690)*100)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
total = Math.round((total) * 100) / 100;
|
||||||
|
desc_d = Math.round((desc_d) * 100) / 100;
|
||||||
|
data['total'] = total;
|
||||||
|
data['desc'] = desc_d;
|
||||||
|
$("#true_price").html(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
click = 0;
|
||||||
|
|
||||||
|
// add pack
|
||||||
|
$(function() {
|
||||||
|
$("#add_serv").click(function() {
|
||||||
|
add_serv();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$('.clickfun').keypress(function (e) {
|
||||||
|
var key = e.which;
|
||||||
|
if(key == 13) {
|
||||||
|
add_serv();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function add_serv() {
|
||||||
|
|
||||||
|
let tretment_id = $("[name='tretment_id']").val();
|
||||||
|
if (tretment_id == undefined) {
|
||||||
|
swalfun('حدث خطأ', 'يرجى تحديد العميل', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cash_pay = parseFloat($("[name='cash_pay']").val());
|
||||||
|
let cash_note = $("[name='cash_note']").val();
|
||||||
|
let card_pay = parseFloat($("[name='card_pay']").val());
|
||||||
|
let card_type = $("[name='card_type']").val();
|
||||||
|
let card_approval_number = $("[name='card_approval_number']").val();
|
||||||
|
let card_note = $("[name='card_note']").val();
|
||||||
|
|
||||||
|
if (total != (cash_pay+card_pay)) {
|
||||||
|
swalfun('حدث خطأ', 'المدخلات غير متطابقة', 'error');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let age = parseInt($("#age").val());
|
||||||
|
|
||||||
|
if (click == 0) {
|
||||||
|
click++;
|
||||||
|
$.post("work/order/ajax/add_father_day_ajaxxx.php", {
|
||||||
|
age,
|
||||||
|
tretment_id,
|
||||||
|
data,
|
||||||
|
cash_pay,
|
||||||
|
cash_note,
|
||||||
|
card_pay,
|
||||||
|
card_type,
|
||||||
|
card_approval_number,
|
||||||
|
card_note,
|
||||||
|
}, function(get_tretment) {
|
||||||
|
$("#get_data").html(get_tretment);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
swalfun("يرجى الانتظار", "", "warning");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
0
file_test.json
Normal file
0
file_test.json
Normal file
5
fixed/body/go.php
Normal file
5
fixed/body/go.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<head>
|
||||||
|
<?php require_once("meta.php") ?>
|
||||||
|
<?php require_once("title.php") ?>
|
||||||
|
<?php require_once("links.php") ?>
|
||||||
|
</head>
|
||||||
11
fixed/config/array.php
Normal file
11
fixed/config/array.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
$campany_info = array(
|
||||||
|
"company_name"=>$commercial_register['name'],
|
||||||
|
"company_name_en"=>"AQDAMY CENTER",
|
||||||
|
"vat_number"=>$commercial_register['vat_number'], // الرقم الضريبي
|
||||||
|
"commercial_register_number_10"=>$commercial_register['commercial_register_number_10'], // السجل التجاري
|
||||||
|
"link"=>"www.aqdamy.com.sa",
|
||||||
|
"logo-dark"=>"assets/images/logo/logo-dark-foot.png",
|
||||||
|
"logo-sm"=>"assets/images/logo/logo-sm-foot.png"
|
||||||
|
);
|
||||||
|
?>
|
||||||
16
fixed/config/function.php
Normal file
16
fixed/config/function.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
function access($page_code) {
|
||||||
|
global $rolls;
|
||||||
|
if (!in_array($page_code, $rolls)) {
|
||||||
|
echo "
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.location.href = 'no_access.php';
|
||||||
|
</script>"
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hash_pass($pass) {
|
||||||
|
return md5($pass);
|
||||||
|
}
|
||||||
|
?>
|
||||||
19
fixed/config/go.php
Normal file
19
fixed/config/go.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
//ini_set("session.gc_maxlifetime",720000);
|
||||||
|
//ini_set('session.gc_probability',1);
|
||||||
|
//ini_set('session.gc_divisor',1);
|
||||||
|
|
||||||
|
header('Content-Type: text/html; charset=utf-8');
|
||||||
|
date_default_timezone_set('Asia/Riyadh');
|
||||||
|
if(empty($_SERVER['HTTPS'])) {
|
||||||
|
// header('Location: https://aqdamy.com.sa/cp');
|
||||||
|
}
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if (empty($dont_get_session)) {
|
||||||
|
require_once('session.php');
|
||||||
|
}
|
||||||
|
require_once('roles.php');
|
||||||
|
require_once('function.php');
|
||||||
|
require_once('array.php');
|
||||||
|
?>
|
||||||
35
fixed/config/go_con.php
Normal file
35
fixed/config/go_con.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
//ini_set("session.gc_maxlifetime",720000);
|
||||||
|
//ini_set('session.gc_probability',1);
|
||||||
|
//ini_set('session.gc_divisor',1);
|
||||||
|
|
||||||
|
header('Content-Type: text/html; charset=utf-8');
|
||||||
|
date_default_timezone_set('Asia/Riyadh');
|
||||||
|
if (empty($_SERVER['HTTPS'])) {
|
||||||
|
// header('Location: https://aqdamy.com.sa/cp');
|
||||||
|
}
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// session_unset();
|
||||||
|
// session_destroy();
|
||||||
|
// header("location: login.php");
|
||||||
|
|
||||||
|
|
||||||
|
if (!$dont_get_session) {
|
||||||
|
require_once('session.php');
|
||||||
|
}
|
||||||
|
require_once('private.php');
|
||||||
|
require_once('roles.php');
|
||||||
|
require_once('static_link.php');
|
||||||
|
require_once('function.php');
|
||||||
|
require_once('array.php');
|
||||||
|
|
||||||
|
// if(!in_array(0, $rolls)) {
|
||||||
|
// echo "
|
||||||
|
// <script>
|
||||||
|
// window.location.replace('under_maintenance.php')
|
||||||
|
// </script>
|
||||||
|
// ";
|
||||||
|
// }
|
||||||
|
|
||||||
|
?>
|
||||||
1
fixed/config/index.php
Normal file
1
fixed/config/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../../index.php'); ?>
|
||||||
21
fixed/config/private.php
Normal file
21
fixed/config/private.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
$name_db = "aqdamypanel_aqdamy";
|
||||||
|
$host_db = "localhost";
|
||||||
|
$user_db = "aqdamypanel_mysql";
|
||||||
|
$pass_db = "AST4dxy6vEsi";
|
||||||
|
|
||||||
|
$db = new mysqli($host_db, $user_db, $pass_db, $name_db);
|
||||||
|
if ($db->connect_error) {
|
||||||
|
die("Connection failed: " . $db->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Change db to "test" db //// mysqli_select_db($db, "test");
|
||||||
|
$Arabic= 'SET CHARACTER SET utf8';
|
||||||
|
mysqli_query($db,$Arabic) or die ('Can\'t charset in DataBase');
|
||||||
|
$db->set_charset("utf8");
|
||||||
|
|
||||||
|
//mysqli_query($db,"ALTER DATABASE ardv_steam CHARACTER SET utf8 COLLATE utf8_unicode_ci;");
|
||||||
|
//ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
|
||||||
|
|
||||||
|
?>
|
||||||
52
fixed/config/roles.php
Normal file
52
fixed/config/roles.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$date_time = date("Y-m-d H:i:s");
|
||||||
|
$today = date("Y-m-d");
|
||||||
|
$time = date("H:i:s");
|
||||||
|
|
||||||
|
$admin_id = $_SESSION['id'];
|
||||||
|
$admin_branch_id = $_SESSION['branch'];
|
||||||
|
$admin_emp_id = $_SESSION['emp_id'];
|
||||||
|
$table_size = $_SESSION['table_size'];
|
||||||
|
$font_size = $_SESSION['font_size'];
|
||||||
|
$basic_color = $_SESSION['basic_color'];
|
||||||
|
|
||||||
|
$commercial_register_id_static = $_SESSION['commercial_register_id_static'];
|
||||||
|
if (empty($commercial_register_id_static)) {
|
||||||
|
$commercial_register_id_static = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$commercial_register_id = $_SESSION['commercial_register_id'];
|
||||||
|
if (empty($commercial_register_id)) {
|
||||||
|
$commercial_register_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($commercial_register_id == 2) {
|
||||||
|
$basic_color = 'b8fbff';
|
||||||
|
} elseif ($commercial_register_id == 3) {
|
||||||
|
$basic_color = 'ffcddb';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($table_size)) {
|
||||||
|
$table_size = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($font_size)) {
|
||||||
|
$font_size = 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
$https_link = $_SESSION['https_link'];
|
||||||
|
if (empty($https_link)) {
|
||||||
|
$https_link = 'https://aqdamy.com.sa/cp/coming_soon.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$rolls = $_SESSION['rolls'];
|
||||||
|
if (empty($rolls)) {
|
||||||
|
$rolls = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$vat = 15;
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
44
fixed/config/roles15092022.php
Normal file
44
fixed/config/roles15092022.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$date_time = date("Y-m-d H:i:s");
|
||||||
|
$today = date("Y-m-d");
|
||||||
|
$time = date("H:i:s");
|
||||||
|
|
||||||
|
$admin_id = $_SESSION['id'];
|
||||||
|
$admin_branch_id = $_SESSION['branch'];
|
||||||
|
$table_size = $_SESSION['table_size'];
|
||||||
|
$font_size = $_SESSION['font_size'];
|
||||||
|
|
||||||
|
$commercial_register_id_static = $_SESSION['commercial_register_id_static'];
|
||||||
|
if (empty($commercial_register_id_static)) {
|
||||||
|
$commercial_register_id_static = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$commercial_register_id = $_SESSION['commercial_register_id'];
|
||||||
|
if (empty($commercial_register_id)) {
|
||||||
|
$commercial_register_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($table_size)) {
|
||||||
|
$table_size = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($font_size)) {
|
||||||
|
$font_size = 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
$https_link = $_SESSION['https_link'];
|
||||||
|
if (empty($https_link)) {
|
||||||
|
$https_link = 'https://aqdamy.com.sa/cp/coming_soon.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$rolls = $_SESSION['rolls'];
|
||||||
|
if (empty($rolls)) {
|
||||||
|
$rolls = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$vat = 15;
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
12
fixed/config/session.php
Normal file
12
fixed/config/session.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
|
$now = time();
|
||||||
|
$_SESSION['start'] = time();
|
||||||
|
$_SESSION['expire'] = $_SESSION['start'] + (15 * 60);
|
||||||
|
|
||||||
|
if (!$_SESSION['access']) {
|
||||||
|
session_unset();
|
||||||
|
session_destroy();
|
||||||
|
header("Location: login.php?r=$actual_link");
|
||||||
|
}
|
||||||
|
?>
|
||||||
78
fixed/config/sql docs/db_doc.php
Normal file
78
fixed/config/sql docs/db_doc.php
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
<script>
|
||||||
|
[
|
||||||
|
user {
|
||||||
|
active: [
|
||||||
|
'انتظار',
|
||||||
|
'مفعل',
|
||||||
|
'غير مفعل (رفض)',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
booking_detail {
|
||||||
|
state: [
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'حجز',
|
||||||
|
'',
|
||||||
|
'تعديل',
|
||||||
|
'',
|
||||||
|
'الغاء',
|
||||||
|
'',
|
||||||
|
'تفعيل',
|
||||||
|
'',
|
||||||
|
'استفاد منها',
|
||||||
|
'',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
invoices {
|
||||||
|
card_type: [
|
||||||
|
'لم يتم الاختيار',
|
||||||
|
'مدى',
|
||||||
|
'فيزا',
|
||||||
|
'ماستر كارد',
|
||||||
|
'',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
booking {
|
||||||
|
state: [
|
||||||
|
'مغلق',
|
||||||
|
'متاح',
|
||||||
|
'تم الحجز', // must change in to 6
|
||||||
|
'',
|
||||||
|
'تم الحجز',
|
||||||
|
'',
|
||||||
|
'تم السداد',
|
||||||
|
'',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
track {
|
||||||
|
what: [
|
||||||
|
'فتح الجحز',
|
||||||
|
'انتقل لصفحة الحجز',
|
||||||
|
'حجز',
|
||||||
|
'تعديل',
|
||||||
|
'الغاء',
|
||||||
|
'اغلاق الحجز',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
emplyee {
|
||||||
|
role: [
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
],
|
||||||
|
occ: [
|
||||||
|
'لاشيء',
|
||||||
|
'فني تدليك',
|
||||||
|
'فني حمام مغربي',
|
||||||
|
'فني بدكير',
|
||||||
|
'فني عناية بشرة',
|
||||||
|
'فني عناية شعر',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</script>
|
||||||
1
fixed/config/sql docs/index.php
Normal file
1
fixed/config/sql docs/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../../../index.php'); ?>
|
||||||
15
fixed/config/static_link.php
Normal file
15
fixed/config/static_link.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
$commercial_register_sql = mysqli_query($db, "SELECT
|
||||||
|
`commercial_register`.`name`,
|
||||||
|
`commercial_register`.`vat_number`,
|
||||||
|
`branch`.`commercial_register_number_10`,
|
||||||
|
`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 `commercial_register`.`id` = $commercial_register_id"
|
||||||
|
);
|
||||||
|
$commercial_register = mysqli_fetch_assoc($commercial_register_sql);
|
||||||
|
|
||||||
|
?>
|
||||||
14
fixed/footer/go.php
Normal file
14
fixed/footer/go.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!-- footer start -->
|
||||||
|
<footer class="footer">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 footer-copyright">
|
||||||
|
<p class="mb-0">جميع الحقوق محفوظة 2022 © الى اقدامي</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<p class="pull-right mb-0"><i class="fa fa-heart font-secondary"></i> Hand mohanad & made with </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<!-- footer end -->
|
||||||
1
fixed/footer/index.php
Normal file
1
fixed/footer/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../../index.php'); ?>
|
||||||
97
fixed/functions/book_actions.php
Normal file
97
fixed/functions/book_actions.php
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<?php
|
||||||
|
function book_actions($status, $book_id, $acsses) {
|
||||||
|
|
||||||
|
switch ($status) {
|
||||||
|
case '4': // انتظار
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تفعيل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تعديل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">الغاء</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">ارسال رسالة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '6': // مسدد
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تعديل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="work/order/php/cancel_active?booking_id='.$book_id.'&lo=book">الغاء</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">ارسال رسالة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '8': // مجاني
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تعديل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">الغاء</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">ارسال رسالة</a>
|
||||||
|
';
|
||||||
|
case '10': // زيارة منزلية انتظار
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تفعيل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تعديل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">الغاء</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">ارسال رسالة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '12': // زيارة منزلية مسدد
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تعديل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">الغاء</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">ارسال رسالة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '13': // زيارة منزلية مجاني
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">تعديل</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">الغاء</a>
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">ارسال رسالة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '14': // العميل في الحلسة
|
||||||
|
if ($acsses == 1) {
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-danger btn-sm mb-1" href="work/order/php/open_book?id='.$book_id.'">فتح</a>
|
||||||
|
';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '15': // منتهي من الخدمة
|
||||||
|
if ($acsses == 1) {
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-danger btn-sm mb-1" href="work/order/php/open_book?id='.$book_id.'">فتح</a>
|
||||||
|
';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '19': // محجوز وغير مدفوع زيارة منزلية (ملغي)
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">استعادة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '20': // محجوز وغير مدفوع (ملغي)
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">استعادة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '21': // محجوز ومدفوع (ملغي)
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">استعادة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '22': // زيارة منزلية (ملغي)
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">استعادة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '25': // ملغي (مخفي)
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">استعادة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
case '26': // زيارة منزلية ملغي (مخفي)
|
||||||
|
echo '
|
||||||
|
<a class="btn btn-success btn-sm mb-1" href="#">استعادة</a>
|
||||||
|
';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
}
|
||||||
27
fixed/functions/book_colors.php
Normal file
27
fixed/functions/book_colors.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
function book_colors($status) {
|
||||||
|
$return = 'background-image: ';
|
||||||
|
|
||||||
|
switch ($status) {
|
||||||
|
case '4': // انتظار
|
||||||
|
$return .= "linear-gradient(120deg, #f6d365 0, #ff7850 100%);";
|
||||||
|
break;
|
||||||
|
case '6': // مسدد
|
||||||
|
$return .= "linear-gradient(120deg, #f93b7a 0, #e0004a 100%);";
|
||||||
|
break;
|
||||||
|
case '8': // مجاني
|
||||||
|
$return .= "linear-gradient(120deg, #f93b7a 0, #0095e2 100%);";
|
||||||
|
break;
|
||||||
|
case '20': // محجوز وغير مدفوع (ملغي)
|
||||||
|
$return .= "linear-gradient(120deg, #a9a2a2 0, #b5a6ab 100%);";
|
||||||
|
break;
|
||||||
|
case '21': // محجوز ومدفوع (ملغي)
|
||||||
|
$return .= "linear-gradient(120deg, #a9a2a2 0, #b5a6ab 100%);";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$return .= "none;";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
131
fixed/head/custom.php
Normal file
131
fixed/head/custom.php
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-size:<?=$font_size.'px'?> !important;
|
||||||
|
}
|
||||||
|
/* Chrome, Safari, Edge, Opera */
|
||||||
|
input::-webkit-outer-spin-button,
|
||||||
|
input::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Firefox */
|
||||||
|
input[type=number] {
|
||||||
|
-moz-appearance: textfield;
|
||||||
|
}
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;600;700;900&display=swap');
|
||||||
|
body, button {font-family: 'Cairo', sans-serif !important;}
|
||||||
|
|
||||||
|
.bg-gradient1, .bg-gradient2, .bg-gradient3, .bg-gradient4, .bg-gradient5 {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.bg-gradient1 {
|
||||||
|
background-image: linear-gradient(120deg, #00e795 0, #0095e2 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient2 {
|
||||||
|
background-image: linear-gradient(120deg, #7b78c9 0, #60c6f3 100%);
|
||||||
|
}
|
||||||
|
.bg-gradient3 {
|
||||||
|
background-image: linear-gradient(120deg, #f6d365 0, #ff7850 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient4 {
|
||||||
|
background-image: linear-gradient(120deg, #f93b7a 0, #e0004a 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient5 {
|
||||||
|
background-image: linear-gradient(120deg, #4e2f49 0, #2f394e 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient6 {
|
||||||
|
background-image: linear-gradient(120deg, #1b71bb 0, #161a22 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient7 {
|
||||||
|
background-image: linear-gradient(120deg, #56ff00 0, #00e09e 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient10 {
|
||||||
|
background-image: linear-gradient(120deg, #d800ff 0, #b507ab 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient12 {
|
||||||
|
background-image: linear-gradient(120deg, #6400ff 0, #ff0000 100%) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient15 {
|
||||||
|
background: repeating-linear-gradient( 45deg, #00e09e, #00e09e 10px, #56ff00 10px, #56ff00 20px) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient19 {
|
||||||
|
background: repeating-linear-gradient( 45deg, #d800ff, #d800ff 10px, #b507ab 10px, #b507ab 20px) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient20 {
|
||||||
|
background: repeating-linear-gradient( 45deg, #f6d365, #f6d365 10px, #ff7850 10px, #ff7850 20px) !important;
|
||||||
|
}
|
||||||
|
.bg-gradient21 {
|
||||||
|
background: repeating-linear-gradient( 45deg, #f93b7a, #f93b7a 10px, #e0004a 10px, #e0004a 20px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-gradient1:hover,
|
||||||
|
.bg-gradient2:hover,
|
||||||
|
.bg-gradient3:hover,
|
||||||
|
.bg-gradient4:hover,
|
||||||
|
.bg-gradient5:hover,
|
||||||
|
.bg-gradient6:hover,
|
||||||
|
.bg-gradient7:hover,
|
||||||
|
.bg-gradient10:hover,
|
||||||
|
.bg-gradient12:hover,
|
||||||
|
.bg-gradient15:hover,
|
||||||
|
.bg-gradient20:hover,
|
||||||
|
.bg-gradient21:hover {
|
||||||
|
background-size: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table [class*='bg-'] {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.before { height: 100%;}
|
||||||
|
.after { display: none; background: rgba(31, 35, 60, 0.5); }
|
||||||
|
|
||||||
|
hr.hrline {
|
||||||
|
width: 50%;
|
||||||
|
border-top: 6px solid #afec08;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align:center!important;
|
||||||
|
}
|
||||||
|
.text-right {
|
||||||
|
text-align:right!important;
|
||||||
|
}
|
||||||
|
.text-left {
|
||||||
|
text-align:left!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-title {
|
||||||
|
color: #086367 !important;
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.range_inputs {
|
||||||
|
direction: rtl;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.datepicker--nav-action svg {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
.select2-results__group {
|
||||||
|
background: var(--bs-teal);;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||||
|
background: springgreen;
|
||||||
|
}
|
||||||
|
.selection .select2-selection {
|
||||||
|
font-family: 'Cairo', sans-serif !important;
|
||||||
|
border-color: #e6edef !important;
|
||||||
|
}
|
||||||
|
.selection .select2-selection .select2-search__field {
|
||||||
|
padding: 0 15px 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-main-header .main-header-right .nav-right .notification-dropdown:before, .page-main-header .main-header-right .nav-right .notification-dropdown:after {
|
||||||
|
left: 28px !important;
|
||||||
|
right: unset !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
6
fixed/head/go.php
Normal file
6
fixed/head/go.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<head>
|
||||||
|
<?php require_once("meta.php") ?>
|
||||||
|
<?php require_once("title.php") ?>
|
||||||
|
<?php require_once("links.php") ?>
|
||||||
|
<?php require_once("custom.php") ?>
|
||||||
|
</head>
|
||||||
1
fixed/head/index.php
Normal file
1
fixed/head/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../../index.php'); ?>
|
||||||
23
fixed/head/links.php
Normal file
23
fixed/head/links.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<!-- Google font-->
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
|
||||||
|
<!-- Font Awesome-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/fontawesome.css">
|
||||||
|
<!-- ico-font-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/icofont.css">
|
||||||
|
<!-- Themify icon-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/themify.css">
|
||||||
|
<!-- Flag icon-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/flag-icon.css">
|
||||||
|
<!-- Feather icon-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/feather-icon.css">
|
||||||
|
<?php require_once("plugins.php") ?>
|
||||||
|
<!-- Bootstrap css-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/bootstrap.css">
|
||||||
|
<!-- App css-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/style.css">
|
||||||
|
<link id="color" rel="stylesheet" href="../assets/css/color-1.css" media="screen">
|
||||||
|
<!-- Responsive css-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/responsive.css">
|
||||||
5
fixed/head/meta.php
Normal file
5
fixed/head/meta.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="مركز اقدامي الرياضي">
|
||||||
|
<meta name="keywords" content="">
|
||||||
35
fixed/head/plugins.php
Normal file
35
fixed/head/plugins.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<!-- Plugins css start-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/js/sweet-alert2/sweetalert2.min.css">
|
||||||
|
<?php
|
||||||
|
if ($DateRangePicker) {
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/daterange-picker.css">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($DatePicker) {
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/date-picker.css">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($Select2) {
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/select2.css">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($MIX) {
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/animate.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/chartist.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/date-picker.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/prism.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../assets/css/vector-map.css">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!-- Plugins css Ends-->
|
||||||
3
fixed/head/title.php
Normal file
3
fixed/head/title.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<link rel="icon" href="../assets/images/favicon.png" type="image/x-icon">
|
||||||
|
<link rel="shortcut icon" href="../assets/images/favicon.png" type="image/x-icon">
|
||||||
|
<title>AQDAMY</title>
|
||||||
91
fixed/header/go.php
Normal file
91
fixed/header/go.php
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<!-- Page Header Start -->
|
||||||
|
<div class="page-main-header" style="background-color: #<?=$basic_color?> !important;">
|
||||||
|
<div class="main-header-right row m-0">
|
||||||
|
<div class="main-header-left">
|
||||||
|
<div class="logo-wrapper"><a href="index.php"><img class="img-fluid" src="../assets/images/logo/logo.png" alt=""></a></div>
|
||||||
|
<div class="dark-logo-wrapper"><a href="index.php"><img class="img-fluid" src="../assets/images/logo/dark-logo.png" alt=""></a></div>
|
||||||
|
<div class="toggle-sidebar"><i class="status_toggle middle" data-feather="align-center" id="sidebar-toggle"></i></div>
|
||||||
|
</div>
|
||||||
|
<div class="left-menu-header col">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<form class="form-inline search-form">
|
||||||
|
<div class="search-bg"><i class="fa fa-search"></i>
|
||||||
|
<input class="form-control-plaintext" placeholder="ابحث هنا">
|
||||||
|
</div>
|
||||||
|
</form><span class="d-sm-none mobile-search search-bg"><i class="fa fa-search"></i></span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="nav-right col pull-right right-menu p-0">
|
||||||
|
<ul class="nav-menus">
|
||||||
|
<li><a class="text-dark" href="#!" onclick="javascript:toggleFullScreen()"><i data-feather="maximize"></i></a></li>
|
||||||
|
<li class="onhover-dropdown">
|
||||||
|
<div class="notification-box"><i data-feather="bell"></i><span class="dot-animated"></span></div>
|
||||||
|
<ul class="notification-dropdown onhover-show-div">
|
||||||
|
<li>
|
||||||
|
<p class="f-w-700 mb-0">لديك 0 اشعارات<span class="pull-right badge badge-primary badge-pill">3</span></p>
|
||||||
|
</li>
|
||||||
|
<li class="noti-primary">
|
||||||
|
<div class="media"><span class="notification-bg bg-light-primary"><i data-feather="activity"> </i></span>
|
||||||
|
<div class="media-body">
|
||||||
|
<p>توصيل </p><span>قبل 10 دقائق</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
if ($commercial_register_id_static == 1) {
|
||||||
|
?>
|
||||||
|
<li class="onhover-dropdown">
|
||||||
|
<div class="notification-box"><i data-feather="home"></i><span class="dot-animated"></span></div>
|
||||||
|
<ul class="notification-dropdown onhover-show-div">
|
||||||
|
<li>
|
||||||
|
<p class="f-w-700 mb-0">تحديد المؤسسة</p>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
$get_commercial_register = mysqli_query($db,
|
||||||
|
"SELECT `id`, `name` FROM `commercial_register` WHERE `id` <> $commercial_register_id_static AND `id` NOT IN (4)"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_commercial_register) > 0) {
|
||||||
|
while ($row_commercial_register = mysqli_fetch_assoc($get_commercial_register)) {
|
||||||
|
?>
|
||||||
|
<li class="noti-primary">
|
||||||
|
<a href="work/order/php/commercial_register.php?num=<?=$row_commercial_register['id']?>">
|
||||||
|
<div class="media">
|
||||||
|
<div class="media-body">
|
||||||
|
<p><?=$row_commercial_register['name']?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($admin_id == 1) {
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<div class="mode"><i class="fa fa-moon-o"></i></div>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li class="onhover-dropdown p-0">
|
||||||
|
<button class="btn btn-primary-light" type="button"><a href="work/order/php/logout.php"><i data-feather="log-out"></i>نسجيل الخروج</a></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="d-lg-none mobile-toggle pull-right w-auto"><i data-feather="more-horizontal"></i></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Page Header Ends -->
|
||||||
|
|
||||||
87
fixed/header/go15092022.php
Normal file
87
fixed/header/go15092022.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<!-- Page Header Start -->
|
||||||
|
<div class="page-main-header">
|
||||||
|
<div class="main-header-right row m-0">
|
||||||
|
<div class="main-header-left">
|
||||||
|
<div class="logo-wrapper"><a href="index.php"><img class="img-fluid" src="../assets/images/logo/logo.png" alt=""></a></div>
|
||||||
|
<div class="dark-logo-wrapper"><a href="index.php"><img class="img-fluid" src="../assets/images/logo/dark-logo.png" alt=""></a></div>
|
||||||
|
<div class="toggle-sidebar"><i class="status_toggle middle" data-feather="align-center" id="sidebar-toggle"></i></div>
|
||||||
|
</div>
|
||||||
|
<div class="left-menu-header col">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<form class="form-inline search-form">
|
||||||
|
<div class="search-bg"><i class="fa fa-search"></i>
|
||||||
|
<input class="form-control-plaintext" placeholder="ابحث هنا">
|
||||||
|
</div>
|
||||||
|
</form><span class="d-sm-none mobile-search search-bg"><i class="fa fa-search"></i></span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="nav-right col pull-right right-menu p-0">
|
||||||
|
<ul class="nav-menus">
|
||||||
|
<li><a class="text-dark" href="#!" onclick="javascript:toggleFullScreen()"><i data-feather="maximize"></i></a></li>
|
||||||
|
<li class="onhover-dropdown">
|
||||||
|
<div class="notification-box"><i data-feather="bell"></i><span class="dot-animated"></span></div>
|
||||||
|
<ul class="notification-dropdown onhover-show-div">
|
||||||
|
<li>
|
||||||
|
<p class="f-w-700 mb-0">لديك 3 اشعارات<span class="pull-right badge badge-primary badge-pill">3</span></p>
|
||||||
|
</li>
|
||||||
|
<li class="noti-primary">
|
||||||
|
<div class="media"><span class="notification-bg bg-light-primary"><i data-feather="activity"> </i></span>
|
||||||
|
<div class="media-body">
|
||||||
|
<p>توصيل </p><span>قبل 10 دقائق</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
if ($commercial_register_id_static == 1) {
|
||||||
|
?>
|
||||||
|
<li class="onhover-dropdown">
|
||||||
|
<div class="notification-box"><i data-feather="home"></i><span class="dot-animated"></span></div>
|
||||||
|
<ul class="notification-dropdown onhover-show-div">
|
||||||
|
<li>
|
||||||
|
<p class="f-w-700 mb-0">تحديد المؤسسة</p>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
$get_commercial_register = mysqli_query($db,
|
||||||
|
"SELECT `id`, `name` FROM `commercial_register` WHERE `id` <> $commercial_register_id_static"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mysqli_num_rows($get_commercial_register) > 0) {
|
||||||
|
while ($row_commercial_register = mysqli_fetch_assoc($get_commercial_register)) {
|
||||||
|
?>
|
||||||
|
<li class="noti-primary">
|
||||||
|
<a href="work/order/php/commercial_register.php?num=<?=$row_commercial_register['id']?>">
|
||||||
|
<div class="media">
|
||||||
|
<div class="media-body">
|
||||||
|
<p><?=$row_commercial_register['name']?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!--
|
||||||
|
<li>
|
||||||
|
<div class="mode"><i class="fa fa-moon-o"></i></div>
|
||||||
|
</li>
|
||||||
|
-->
|
||||||
|
<li class="onhover-dropdown p-0">
|
||||||
|
<button class="btn btn-primary-light" type="button"><a href="work/order/php/logout.php"><i data-feather="log-out"></i>نسجيل الخروج</a></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="d-lg-none mobile-toggle pull-right w-auto"><i data-feather="more-horizontal"></i></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Page Header Ends -->
|
||||||
|
|
||||||
1
fixed/header/index.php
Normal file
1
fixed/header/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../../index.php'); ?>
|
||||||
1
fixed/index.php
Normal file
1
fixed/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../index.php'); ?>
|
||||||
234
fixed/js/custom.php
Normal file
234
fixed/js/custom.php
Normal file
@ -0,0 +1,234 @@
|
|||||||
|
<?php require_once('static.php'); ?>
|
||||||
|
<?php require_once('plugins.php'); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
if (localStorage.getItem("page-wrapper") === null) {
|
||||||
|
localStorage.setItem('page-wrapper', 'compact-wrapper');
|
||||||
|
}
|
||||||
|
if (localStorage.getItem("page-body-wrapper") === null) {
|
||||||
|
localStorage.setItem('page-body-wrapper', 'horizontal-menu');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php require_once('theme.php'); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if(empty($show_sidebar)) {
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
$(".toggle-nav").click(function () {
|
||||||
|
$('.nav-menu').css("left", "0px");
|
||||||
|
});
|
||||||
|
$(".mobile-back").click(function () {
|
||||||
|
$('.nav-menu').css("left", "-410px");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".page-wrapper").attr("class", "page-wrapper "+localStorage.getItem("page-wrapper"));
|
||||||
|
$(".page-body-wrapper").attr("class", "page-body-wrapper "+localStorage.getItem("page-body-wrapper"));
|
||||||
|
|
||||||
|
if (localStorage.getItem("page-wrapper") === null) {
|
||||||
|
$(".page-wrapper").addClass("compact-wrapper");
|
||||||
|
}
|
||||||
|
// left sidebar and horizotal menu
|
||||||
|
if($('#pageWrapper').hasClass('compact-wrapper')){
|
||||||
|
jQuery('.submenu-title').append('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.submenu-title').click(function () {
|
||||||
|
jQuery('.submenu-title').removeClass('active');
|
||||||
|
jQuery('.submenu-title').find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.submenu-content').slideUp('normal');
|
||||||
|
if (jQuery(this).next().is(':hidden') == true) {
|
||||||
|
jQuery(this).addClass('active');
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-down"></i></div>');
|
||||||
|
jQuery(this).next().slideDown('normal');
|
||||||
|
} else {
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
jQuery('.submenu-content').hide();
|
||||||
|
|
||||||
|
jQuery('.menu-title').append('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.menu-title').click(function () {
|
||||||
|
jQuery('.menu-title').removeClass('active');
|
||||||
|
jQuery('.menu-title').find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.menu-content').slideUp('normal');
|
||||||
|
if (jQuery(this).next().is(':hidden') == true) {
|
||||||
|
jQuery(this).addClass('active');
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-down"></i></div>');
|
||||||
|
jQuery(this).next().slideDown('normal');
|
||||||
|
} else {
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
jQuery('.menu-content').hide();
|
||||||
|
} else if ($('#pageWrapper').hasClass('horizontal-wrapper')) {
|
||||||
|
var contentwidth = jQuery(window).width();
|
||||||
|
if ((contentwidth) < '992') {
|
||||||
|
$('#pageWrapper').removeClass('horizontal-wrapper').addClass('compact-wrapper');
|
||||||
|
$('.page-body-wrapper').removeClass('horizontal-menu').addClass('sidebar-icon');
|
||||||
|
jQuery('.submenu-title').append('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.submenu-title').click(function () {
|
||||||
|
jQuery('.submenu-title').removeClass('active');
|
||||||
|
jQuery('.submenu-title').find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.submenu-content').slideUp('normal');
|
||||||
|
if (jQuery(this).next().is(':hidden') == true) {
|
||||||
|
jQuery(this).addClass('active');
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-down"></i></div>');
|
||||||
|
jQuery(this).next().slideDown('normal');
|
||||||
|
} else {
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
jQuery('.submenu-content').hide();
|
||||||
|
|
||||||
|
jQuery('.menu-title').append('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.menu-title').click(function () {
|
||||||
|
jQuery('.menu-title').removeClass('active');
|
||||||
|
jQuery('.menu-title').find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
jQuery('.menu-content').slideUp('normal');
|
||||||
|
if (jQuery(this).next().is(':hidden') == true) {
|
||||||
|
jQuery(this).addClass('active');
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-down"></i></div>');
|
||||||
|
jQuery(this).next().slideDown('normal');
|
||||||
|
} else {
|
||||||
|
jQuery(this).find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-left"></i></div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
jQuery('.menu-content').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// toggle sidebar
|
||||||
|
|
||||||
|
$('.toggle-sidebar').click(function() {
|
||||||
|
$('.main-nav').toggleClass('close_icon');
|
||||||
|
$('.page-main-header').toggleClass('close_icon');
|
||||||
|
});
|
||||||
|
|
||||||
|
//responsive sidebar
|
||||||
|
var $window = $(window);
|
||||||
|
var widthwindow = $window.width();
|
||||||
|
(function($) {
|
||||||
|
"use strict";
|
||||||
|
if(widthwindow+17 <= 993) {
|
||||||
|
$('.toggle-sidebar').attr('checked', false);
|
||||||
|
$('.main-nav').addClass("close_icon");
|
||||||
|
$('.page-main-header').addClass("close_icon");
|
||||||
|
}
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
|
$( window ).resize(function() {
|
||||||
|
var widthwindaw = $window.width();
|
||||||
|
|
||||||
|
if(widthwindaw+17 <= 991){
|
||||||
|
$('.toggle-sidebar').attr('checked', false);
|
||||||
|
$('.main-nav').addClass("close_icon");
|
||||||
|
$('.page-main-header').addClass("close_icon");
|
||||||
|
}else{
|
||||||
|
$('.toggle-sidebar').attr('checked', false);
|
||||||
|
$('.main-nav').removeClass("close_icon");
|
||||||
|
$('.page-main-header').removeClass("close_icon");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(widthwindow >= 768) {
|
||||||
|
$('.toggle-sidebar').click(function() {
|
||||||
|
$('.main-nav').toggleClass('close_icon');
|
||||||
|
$('.page-main-header').toggleClass('close_icon');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// horizontal arrowss
|
||||||
|
var view = $("#mainnav");
|
||||||
|
var move = "500px";
|
||||||
|
var leftsideLimit = -500
|
||||||
|
|
||||||
|
|
||||||
|
// get wrapper width
|
||||||
|
var getMenuWrapperSize = function () {
|
||||||
|
return $('.sidebar-wrapper').innerWidth();
|
||||||
|
}
|
||||||
|
var menuWrapperSize = getMenuWrapperSize();
|
||||||
|
|
||||||
|
if ((menuWrapperSize) >= '1660') {
|
||||||
|
var sliderLimit = -3000
|
||||||
|
|
||||||
|
} else if ((menuWrapperSize) >= '1440') {
|
||||||
|
var sliderLimit = -3600
|
||||||
|
} else {
|
||||||
|
var sliderLimit = -4200
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#left-arrow").addClass("disabled");
|
||||||
|
$("#right-arrow").click(function () {
|
||||||
|
var currentPosition = parseInt(view.css("marginLeft"));
|
||||||
|
if (currentPosition >= sliderLimit) {
|
||||||
|
$("#left-arrow").removeClass("disabled");
|
||||||
|
view.stop(false, true).animate({
|
||||||
|
marginLeft: "-=" + move
|
||||||
|
}, {
|
||||||
|
duration: 400
|
||||||
|
})
|
||||||
|
if (currentPosition == sliderLimit) {
|
||||||
|
$(this).addClass("disabled");
|
||||||
|
console.log("sliderLimit", sliderLimit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#left-arrow").click(function () {
|
||||||
|
var currentPosition = parseInt(view.css("marginLeft"));
|
||||||
|
if (currentPosition < 0) {
|
||||||
|
view.stop(false, true).animate({
|
||||||
|
marginLeft: "+=" + move
|
||||||
|
}, {
|
||||||
|
duration: 400
|
||||||
|
})
|
||||||
|
$("#right-arrow").removeClass("disabled");
|
||||||
|
$("#left-arrow").removeClass("disabled");
|
||||||
|
if (currentPosition >= leftsideLimit) {
|
||||||
|
$(this).addClass("disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// page active
|
||||||
|
$( ".main-navbar" ).find( "a" ).removeClass("active");
|
||||||
|
$( ".main-navbar" ).find( "li" ).removeClass("active");
|
||||||
|
|
||||||
|
var current = window.location.pathname
|
||||||
|
$(".main-navbar ul>li a").filter(function() {
|
||||||
|
|
||||||
|
var link = $(this).attr("href");
|
||||||
|
if(link){
|
||||||
|
if (current.indexOf(link) != -1) {
|
||||||
|
$(this).parents().children('a').addClass('active');
|
||||||
|
$(this).parents().parents().children('ul').css('display', 'block');
|
||||||
|
$(this).addClass('active');
|
||||||
|
$(this).parent().parent().parent().children('a').find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-down"></i></div>');
|
||||||
|
$(this).parent().parent().parent().parent().parent().children('a').find('div').replaceWith('<div class="according-menu"><i class="fa fa-angle-down"></i></div>');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//$('.custom-scrollbar').animate({
|
||||||
|
// scrollTop: $('a.nav-link.menu-title.active').offset().top - 500
|
||||||
|
//}, 1000);
|
||||||
|
|
||||||
|
$(".page-main-header").click(function() {
|
||||||
|
let pageMainHeader = $(".page-main-header").attr("class");
|
||||||
|
let mainNav = $(".main-nav").attr("class");
|
||||||
|
localStorage.setItem('close_icon_pageMainHeader', pageMainHeader);
|
||||||
|
localStorage.setItem('close_icon_mainNav', mainNav);
|
||||||
|
});
|
||||||
|
if(localStorage.getItem("close_icon_pageMainHeader") != null && localStorage.getItem("close_icon_mainNav") != null) {
|
||||||
|
$(".page-main-header").attr("class", localStorage.getItem("close_icon_pageMainHeader"));
|
||||||
|
$(".main-nav").attr("class", localStorage.getItem("close_icon_mainNav"));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
17
fixed/js/go.php
Normal file
17
fixed/js/go.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php require_once('custom.php'); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($google_translate) {
|
||||||
|
?>
|
||||||
|
<!-- GTranslate: https://gtranslate.io/ -->
|
||||||
|
<div id="google_translate_element" class="form-group" style="display: none;">
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function googleTranslateElementInit() {
|
||||||
|
new google.translate.TranslateElement({pageLanguage: 'ar'}, 'google_translate_element');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
1
fixed/js/index.php
Normal file
1
fixed/js/index.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?php header('location:../../index.php'); ?>
|
||||||
82
fixed/js/plugins.php
Normal file
82
fixed/js/plugins.php
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<!-- Plugins JS start-->
|
||||||
|
<script src="../assets/js/sweet-alert2/sweetalert2.min.js"></script>
|
||||||
|
<script src="../assets/js/sweet-alert2/app3.js"></script>
|
||||||
|
<?php
|
||||||
|
if ($js_1 == 1) {
|
||||||
|
?>
|
||||||
|
<script src="../assets/js/prism/prism.min.js"></script>
|
||||||
|
<script src="../assets/js/clipboard/clipboard.min.js"></script>
|
||||||
|
<script src="../assets/js/custom-card/custom-card.js"></script>
|
||||||
|
<script src="../assets/js/tooltip-init.js"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($DateRangePicker) {
|
||||||
|
?>
|
||||||
|
<script src="../assets/js/datepicker/daterange-picker/moment.min.js"></script>
|
||||||
|
<script src="../assets/js/datepicker/daterange-picker/daterangepicker.js"></script>
|
||||||
|
<script src="../assets/js/datepicker/daterange-picker/daterange-picker.custom.js"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($DatePicker) {
|
||||||
|
?>
|
||||||
|
<script src="../assets/js/datepicker/date-picker/datepicker.js"></script>
|
||||||
|
<script src="../assets/js/datepicker/date-picker/datepicker.en.js"></script>
|
||||||
|
<script src="../assets/js/datepicker/date-picker/datepicker.custom.js"></script>
|
||||||
|
<script>
|
||||||
|
"use strict";
|
||||||
|
;(function ($) { $.fn.datepicker.language['ar'] = {
|
||||||
|
days: ["الاحد", "الاثنين", "الثلاثاء", "الاربعاء", "الخميس", "الجمعة", "السبت"],
|
||||||
|
daysShort: ["اح", "اث", "ثل", "ار", "خم", "جم", "سب"],
|
||||||
|
daysMin: ["اح", "اث", "ثل", "ار", "خم", "جم", "سب"],
|
||||||
|
months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
|
||||||
|
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||||
|
today: 'اليوم',
|
||||||
|
clear: 'مسح',
|
||||||
|
dateFormat: 'yyyy/mm/dd',
|
||||||
|
timeFormat: 'hh:ii aa',
|
||||||
|
firstDay: 0
|
||||||
|
}; })(jQuery);
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($Select2) {
|
||||||
|
?>
|
||||||
|
<script src="../assets/js/select2/select2.full.min.js"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php
|
||||||
|
if ($MIX) {
|
||||||
|
?>
|
||||||
|
<script src="../assets/js/chart/chartist/chartist.js"></script>
|
||||||
|
<script src="../assets/js/chart/chartist/chartist-plugin-tooltip.js"></script>
|
||||||
|
<script src="../assets/js/chart/knob/knob.min.js"></script>
|
||||||
|
<script src="../assets/js/chart/knob/knob-chart.js"></script>
|
||||||
|
<script src="../assets/js/chart/apex-chart/apex-chart.js"></script>
|
||||||
|
<script src="../assets/js/prism/prism.min.js"></script>
|
||||||
|
<script src="../assets/js/clipboard/clipboard.min.js"></script>
|
||||||
|
<script src="../assets/js/counter/jquery.waypoints.min.js"></script>
|
||||||
|
<script src="../assets/js/counter/jquery.counterup.min.js"></script>
|
||||||
|
<script src="../assets/js/counter/counter-custom.js"></script>
|
||||||
|
<script src="../assets/js/custom-card/custom-card.js"></script>
|
||||||
|
<script src="../assets/js/notify/bootstrap-notify.min.js"></script>
|
||||||
|
<script src="../assets/js/dashboard/default.js"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($countdown) {
|
||||||
|
?>
|
||||||
|
<script src="../assets/js/countdown.js"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Plugins JS Ends-->
|
||||||
16
fixed/js/static.php
Normal file
16
fixed/js/static.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!-- latest jquery-->
|
||||||
|
<script src="../assets/js/jquery-3.5.1.min.js"></script>
|
||||||
|
<!-- feather icon js-->
|
||||||
|
<script src="../assets/js/icons/feather-icon/feather.min.js"></script>
|
||||||
|
<script src="../assets/js/icons/feather-icon/feather-icon.js"></script>
|
||||||
|
<?php
|
||||||
|
if(empty($show_sidebar)) {
|
||||||
|
?>
|
||||||
|
<!-- Sidebar jquery-->
|
||||||
|
<script src="../assets/js/config.js"></script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!-- Bootstrap js-->
|
||||||
|
<script src="../assets/js/bootstrap/popper.min.js"></script>
|
||||||
|
<script src="../assets/js/bootstrap/bootstrap.min.js"></script>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user