522 lines
33 KiB
PHP
Executable File
522 lines
33 KiB
PHP
Executable File
<?php
|
|
require_once('fixed/config/go_con.php');
|
|
access(30);
|
|
|
|
$today = date("Y-m-d");
|
|
if (!empty($_GET['d'])) {
|
|
$today = $_GET['d'];
|
|
if (DateTime::createFromFormat('Y-m-d', $today) == false) {
|
|
$today = date("Y-m-d");
|
|
}
|
|
}
|
|
|
|
$user_id = $_GET['u'];
|
|
if (!empty($user_id)) {
|
|
if (!is_numeric($user_id)) {
|
|
echo "<script>alert('حدث خطا')</script>";
|
|
}
|
|
} else {
|
|
echo "<script>alert('حدث خطا')</script>";
|
|
}
|
|
|
|
|
|
$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;
|
|
}
|
|
|
|
$error = 0;
|
|
$data = array();
|
|
|
|
$get_invoices_sql = mysqli_query($db,
|
|
"SELECT
|
|
`user`.`name`,
|
|
`branch`.`branch_name`
|
|
FROM `user`
|
|
INNER JOIN `emplyee` ON `user`.`emplyee_id` = `emplyee`.`id`
|
|
INNER JOIN `branch` ON `emplyee`.`branch_id` = `branch`.`id`
|
|
WHERE `user`.`id` = $user_id
|
|
");
|
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
|
$data['info']['name'] = $get_invoices['name'];
|
|
$data['info']['branch'] = $get_invoices['branch_name'];
|
|
}
|
|
|
|
$get_invoices_sql = mysqli_query($db,
|
|
"SELECT
|
|
`branch`.`id`,
|
|
`branch`.`branch_name`
|
|
FROM `branch` WHERE `branch`.`id` <> 1
|
|
");
|
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
|
$data['branchs'][$get_invoices['id']] = array(
|
|
'branch_name' => $get_invoices['branch_name'],
|
|
'inv_d' => array(),
|
|
'bond_d' => array(),
|
|
'back_d' => array(),
|
|
'bond_back_d' => array(),
|
|
);
|
|
}
|
|
|
|
foreach ($data['branchs'] as $key => $value) {
|
|
$get_invoices_sql = mysqli_query($db,
|
|
"SELECT
|
|
`invoices`.`number_style`, `invoices_details_has_how_pay`.`pay`, `invoices_details_has_how_pay`.`how_pay_id`
|
|
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`
|
|
WHERE (`invoices_details`.`invoices_status_id` = 1 OR `invoices_details`.`invoices_status_id` = 2)
|
|
AND `invoices_details_has_how_pay`.`user_id` = $user_id
|
|
AND ((`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 `invoices_details`.`branch_id` = $key
|
|
");
|
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
|
switch ($get_invoices['how_pay_id']) {
|
|
case '1':
|
|
$data['branchs'][$key]['inv_d'][$get_invoices['number_style']]['cash'] = $get_invoices['pay'];
|
|
$data['totals']['inv_total'] += $get_invoices['pay'];
|
|
break;
|
|
case '2':
|
|
$data['branchs'][$key]['inv_d'][$get_invoices['number_style']]['card'] = $get_invoices['pay'];
|
|
$data['totals']['inv_total'] += $get_invoices['pay'];
|
|
break;
|
|
case '3':
|
|
$data['branchs'][$key]['inv_d'][$get_invoices['number_style']]['stuck'] = $get_invoices['pay'];
|
|
break;
|
|
|
|
default:
|
|
$error++;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
$get_invoices_sql = mysqli_query($db,
|
|
"SELECT
|
|
`bonds`.`number_style`, `bonds_details_has_how_pay`.`pay`, `bonds_details_has_how_pay`.`how_pay_id`
|
|
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`
|
|
WHERE (`bonds_details`.`bonds_status_id` = 1 OR `bonds_details`.`bonds_status_id` = 2)
|
|
AND `bonds_details_has_how_pay`.`user_id` = $user_id
|
|
AND ((`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 `bonds_details`.`branch_id` = $key
|
|
");
|
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
|
switch ($get_invoices['how_pay_id']) {
|
|
case '1':
|
|
$data['branchs'][$key]['bond_d'][$get_invoices['number_style']]['cash'] = $get_invoices['pay'];
|
|
$data['totals']['bond_total'] += $get_invoices['pay'];
|
|
break;
|
|
case '2':
|
|
$data['branchs'][$key]['bond_d'][$get_invoices['number_style']]['card'] = $get_invoices['pay'];
|
|
$data['totals']['bond_total'] += $get_invoices['pay'];
|
|
break;
|
|
case '3':
|
|
$data['branchs'][$key]['bond_d'][$get_invoices['number_style']]['stuck'] = $get_invoices['pay'];
|
|
break;
|
|
|
|
default:
|
|
$error++;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
$get_invoices_sql = mysqli_query($db,
|
|
"SELECT
|
|
`invoices`.`number_style`, `invoices_details_has_how_pay`.`pay`, `invoices_details_has_how_pay`.`how_pay_id`
|
|
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`
|
|
WHERE (`invoices_details`.`invoices_status_id` = 3)
|
|
AND `invoices_details_has_how_pay`.`user_id` = $user_id
|
|
AND ((`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 `invoices_details`.`branch_id` = $key
|
|
");
|
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
|
switch ($get_invoices['how_pay_id']) {
|
|
case '1':
|
|
$data['branchs'][$key]['back_d'][$get_invoices['number_style']]['cash'] = $get_invoices['pay'];
|
|
$data['totals']['inv_total'] -= $get_invoices['pay'];
|
|
break;
|
|
case '2':
|
|
$data['branchs'][$key]['back_d'][$get_invoices['number_style']]['card'] = $get_invoices['pay'];
|
|
$data['totals']['inv_total'] -= $get_invoices['pay'];
|
|
break;
|
|
case '3':
|
|
$data['branchs'][$key]['back_d'][$get_invoices['number_style']]['stuck'] = $get_invoices['pay'];
|
|
break;
|
|
|
|
default:
|
|
$error++;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
$get_invoices_sql = mysqli_query($db,
|
|
"SELECT
|
|
`bonds`.`number_style`, `bonds_details_has_how_pay`.`pay`, `bonds_details_has_how_pay`.`how_pay_id`
|
|
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`
|
|
WHERE (`bonds_details`.`bonds_status_id` = 3)
|
|
AND `bonds_details_has_how_pay`.`user_id` = $user_id
|
|
AND ((`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 `bonds_details`.`branch_id` = $key
|
|
");
|
|
if (mysqli_num_rows($get_invoices_sql) > 0) {
|
|
while ($get_invoices = mysqli_fetch_assoc($get_invoices_sql)) {
|
|
switch ($get_invoices['how_pay_id']) {
|
|
case '1':
|
|
$data['branchs'][$key]['bond_back_d'][$get_invoices['number_style']]['cash'] = $get_invoices['pay'];
|
|
$data['totals']['bond_total'] -= $get_invoices['pay'];
|
|
break;
|
|
case '2':
|
|
$data['branchs'][$key]['bond_back_d'][$get_invoices['number_style']]['card'] = $get_invoices['pay'];
|
|
$data['totals']['bond_total'] -= $get_invoices['pay'];
|
|
break;
|
|
case '3':
|
|
$data['branchs'][$key]['bond_back_d'][$get_invoices['number_style']]['stuck'] = $get_invoices['pay'];
|
|
break;
|
|
|
|
default:
|
|
$error++;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en" dir="rtl">
|
|
<?php require_once('fixed/head/go.php'); ?>
|
|
<body class="rtl">
|
|
<style>
|
|
thead {
|
|
vertical-align: middle !important;
|
|
}
|
|
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'); ?>
|
|
<div class="page-wrapper" id="pageWrapper">
|
|
<?php require_once('fixed/header/go.php'); ?>
|
|
<div class="page-body-wrapper">
|
|
<?php require_once('fixed/sidebar/go.php'); ?>
|
|
<div class="page-body">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body new-user order-list text-center">
|
|
<div class="row">
|
|
<div class="col-12 col-sm-12 col-md-3 col-lg-4 col-xl-4">
|
|
</div>
|
|
<div class="page-title mb-3 col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
|
|
<i class="mdi mdi-monitor mr-2">
|
|
</i>
|
|
<h4>
|
|
إيرادات يوم
|
|
<?= 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_d?d=<?= $Previous ?>&u=<?= $user_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_d?d=<?= $Next ?>&u=<?= $user_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 class="table-responsive">
|
|
<table class="table table-bordered text-center" style="vertical-align: middle;">
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th colspan="6" 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>
|
|
</tr>
|
|
<tr style="background-color:#ffffff;">
|
|
<td></td>
|
|
<td><?=$data['info']['name']?></td>
|
|
<td><?=$data['info']['branch']?></td>
|
|
<td><?=!empty($data['totals']['inv_total'])? $data['totals']['inv_total']: 0?></td>
|
|
<td><?=!empty($data['totals']['bond_total'])? $data['totals']['bond_total']: 0?></td>
|
|
<td><?=!empty($data['totals']['inv_total'] + $data['totals']['bond_total'])? $data['totals']['inv_total'] + $data['totals']['bond_total']: 0?></td>
|
|
</tr>
|
|
<tr style="background-color:#000;">
|
|
<td colspan="6"></td>
|
|
</tr>
|
|
</thead>
|
|
<?php
|
|
foreach ($data['branchs'] as $key => $value) {
|
|
if(!empty($data['branchs'][$key]['inv_d']) || !empty($data['branchs'][$key]['bond_d']) || !empty($data['branchs'][$key]['back_d']) || !empty($data['branchs'][$key]['bond_back_d'])) {
|
|
?>
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th scope="col" colspan="6" style="background:rgb(105 36 36 / 19%) !important"><?=$data['branchs'][$key]['branch_name']?></th>
|
|
</tr>
|
|
<?php
|
|
if(!empty($data['branchs'][$key]['inv_d'])) {
|
|
?>
|
|
<tr>
|
|
<th scope="col" colspan="2">الفواتير</th>
|
|
<th style="background-color:#000;" scope="col" colspan="4"></th>
|
|
</tr>
|
|
<tr>
|
|
<th scope="col" rowspan="2">رقم الفاتورة</th>
|
|
<th scope="col" colspan="4">الصادر</th>
|
|
<th scope="col" rowspan="2">الاجمالي</th>
|
|
</tr>
|
|
<tr>
|
|
<th scope="col">كاش</th>
|
|
<th scope="col">شبكة</th>
|
|
<th scope="col">تحويل</th>
|
|
<th scope="col">رصيد</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$t1 = 0;
|
|
$t2 = 0;
|
|
$t3 = 0;
|
|
$t4 = 0;
|
|
foreach ($data['branchs'][$key]['inv_d'] as $key2 => $value2) {
|
|
?>
|
|
<tr>
|
|
<td><a href="invoice_search?number=<?=$key2?>"><?=$key2?></a></td>
|
|
<td><?=!empty($data['branchs'][$key]['inv_d'][$key2]['cash'])? $data['branchs'][$key]['inv_d'][$key2]['cash']: 0?></td>
|
|
<td><?=!empty($data['branchs'][$key]['inv_d'][$key2]['card'])? $data['branchs'][$key]['inv_d'][$key2]['card']: 0?></td>
|
|
<td><?=!empty($data['branchs'][$key]['inv_d'][$key2]['tran'])? $data['branchs'][$key]['inv_d'][$key2]['tran']: 0?></td>
|
|
<td><?=!empty($data['branchs'][$key]['inv_d'][$key2]['stuck'])? $data['branchs'][$key]['inv_d'][$key2]['stuck']: 0?></td>
|
|
<td><?=$data['branchs'][$key]['inv_d'][$key2]['cash'] + $data['branchs'][$key]['inv_d'][$key2]['card'] + $data['branchs'][$key]['inv_d'][$key2]['tran'] + $data['branchs'][$key]['inv_d'][$key2]['stuck']?></td>
|
|
</tr>
|
|
<?php
|
|
$t1 += $data['branchs'][$key]['inv_d'][$key2]['cash'];
|
|
$t2 += $data['branchs'][$key]['inv_d'][$key2]['card'];
|
|
$t3 += $data['branchs'][$key]['inv_d'][$key2]['tran'];
|
|
$t4 += $data['branchs'][$key]['inv_d'][$key2]['stuck'];
|
|
}
|
|
?>
|
|
<tr>
|
|
<td>المجموع</td>
|
|
<td><?=$t1?></td>
|
|
<td><?=$t2?></td>
|
|
<td><?=$t3?></td>
|
|
<td><?=$t4?></td>
|
|
<td><?=$t1+$t2+$t3+$t4?></td>
|
|
</tr>
|
|
</tbody>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if(!empty($data['branchs'][$key]['bond_d'])) {
|
|
?>
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th scope="col" colspan="2">الباقات</th>
|
|
<th style="background-color:#000;" scope="col" colspan="4"></th>
|
|
</tr>
|
|
<tr>
|
|
<th scope="col" rowspan="2">رقم السند</th>
|
|
<th scope="col" colspan="3">الصادر</th>
|
|
<th scope="col" colspan="2" rowspan="2">الاجمالي</th>
|
|
</tr>
|
|
<tr>
|
|
<th scope="col">كاش</th>
|
|
<th scope="col">شبكة</th>
|
|
<th scope="col">تحويل</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$t1 = 0;
|
|
$t2 = 0;
|
|
$t3 = 0;
|
|
$t4 = 0;
|
|
foreach ($data['branchs'][$key]['bond_d'] as $key2 => $value2) {
|
|
?>
|
|
<tr>
|
|
<td><?=$key2?></td>
|
|
<td><?=!empty($data['branchs'][$key]['bond_d'][$key2]['cash'])? $data['branchs'][$key]['bond_d'][$key2]['cash']: 0?></td>
|
|
<td><?=!empty($data['branchs'][$key]['bond_d'][$key2]['card'])? $data['branchs'][$key]['bond_d'][$key2]['card']: 0?></td>
|
|
<td><?=!empty($data['branchs'][$key]['bond_d'][$key2]['tran'])? $data['branchs'][$key]['bond_d'][$key2]['tran']: 0?></td>
|
|
<td colspan="2"><?=$data['branchs'][$key]['bond_d'][$key2]['cash'] + $data['branchs'][$key]['bond_d'][$key2]['card'] + $data['branchs'][$key]['bond_d'][$key2]['tran']?></td>
|
|
</tr>
|
|
<?php
|
|
$t1 += $data['branchs'][$key]['bond_d'][$key2]['cash'];
|
|
$t2 += $data['branchs'][$key]['bond_d'][$key2]['card'];
|
|
$t3 += $data['branchs'][$key]['bond_d'][$key2]['tran'];
|
|
}
|
|
?>
|
|
<tr>
|
|
<td>المجموع</td>
|
|
<td><?=$t1?></td>
|
|
<td><?=$t2?></td>
|
|
<td><?=$t3?></td>
|
|
<td colspan="2"><?=$t1+$t2+$t3?></td>
|
|
</tr>
|
|
</tbody>
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if(!empty($data['branchs'][$key]['back_d'])) {
|
|
?>
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th scope="col" colspan="2">مرتجعات</th>
|
|
<th style="background-color:#000;" scope="col" colspan="4"></th>
|
|
</tr>
|
|
<tr>
|
|
<th scope="col">رقم الفاتورة</th>
|
|
<th colspan="2" scope="col">المرتجع</th>
|
|
<th colspan="3" scope="col">الاجمالي</th>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$t1 = 0;
|
|
$t2 = 0;
|
|
$t3 = 0;
|
|
$t4 = 0;
|
|
foreach ($data['branchs'][$key]['back_d'] as $key2 => $value2) {
|
|
?>
|
|
<tr>
|
|
<td><?=$key2?></td>
|
|
<td colspan="2"><?=!empty($data['branchs'][$key]['back_d'][$key2]['cash'] || $data['branchs'][$key]['back_d'][$key2]['tran'])? $data['branchs'][$key]['back_d'][$key2]['cash'] + $data['branchs'][$key]['back_d'][$key2]['tran']: 0?></td>
|
|
<td colspan="3"><?=$data['branchs'][$key]['back_d'][$key2]['cash'] + $data['branchs'][$key]['back_d'][$key2]['tran']?></td>
|
|
</tr>
|
|
<?php
|
|
$t1 += $data['branchs'][$key]['back_d'][$key2]['cash'] + $data['branchs'][$key]['back_d'][$key2]['card'] + $data['branchs'][$key]['back_d'][$key2]['tran'];
|
|
$t2 += $data['branchs'][$key]['back_d'][$key2]['cash'] + $data['branchs'][$key]['back_d'][$key2]['card'] + $data['branchs'][$key]['back_d'][$key2]['tran'];
|
|
}
|
|
?>
|
|
<tr>
|
|
<td>المجموع</td>
|
|
<td colspan="2"><?=$t1?></td>
|
|
<td colspan="3"><?=$t2?></td>
|
|
</tr>
|
|
</tbody>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
<?php
|
|
if(!empty($data['branchs'][$key]['bond_back_d'])) {
|
|
?>
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th scope="col" colspan="2">مرتجعات سندات</th>
|
|
<th style="background-color:#000;" scope="col" colspan="4"></th>
|
|
</tr>
|
|
<tr>
|
|
<th scope="col">رقم السند</th>
|
|
<th colspan="2" scope="col">المرتجع</th>
|
|
<th colspan="3" scope="col">الاجمالي</th>
|
|
</tr>
|
|
<tr>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$t1 = 0;
|
|
$t2 = 0;
|
|
$t3 = 0;
|
|
$t4 = 0;
|
|
foreach ($data['branchs'][$key]['bond_back_d'] as $key2 => $value2) {
|
|
?>
|
|
<tr>
|
|
<td><?=$key2?></td>
|
|
<td colspan="2"><?=!empty($data['branchs'][$key]['bond_back_d'][$key2]['cash'] || $data['branchs'][$key]['bond_back_d'][$key2]['tran'])? $data['branchs'][$key]['bond_back_d'][$key2]['cash'] + $data['branchs'][$key]['bond_back_d'][$key2]['tran']: 0?></td>
|
|
<td colspan="3"><?=$data['branchs'][$key]['bond_back_d'][$key2]['cash'] + $data['branchs'][$key]['bond_back_d'][$key2]['tran']?></td>
|
|
</tr>
|
|
<?php
|
|
$t1 += $data['branchs'][$key]['bond_back_d'][$key2]['cash'] + $data['branchs'][$key]['bond_back_d'][$key2]['tran'];
|
|
$t2 += $data['branchs'][$key]['bond_back_d'][$key2]['cash'] + $data['branchs'][$key]['bond_back_d'][$key2]['tran'];
|
|
}
|
|
?>
|
|
<tr>
|
|
<td>المجموع</td>
|
|
<td colspan="2"><?=$t1?></td>
|
|
<td colspan="3"><?=$t2?></td>
|
|
</tr>
|
|
</tbody>
|
|
<?php
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
</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_d?u=<?= $user_id ?>&d=' + SelectedDate
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|