-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreportcustomer.php
304 lines (232 loc) · 13.9 KB
/
reportcustomer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?php require 'ini/confg.php';?>
<?php require 'topheader.php';?>
<?php require 'headernav.php';?>
<?php
if(isset($_SESSION['is_admin']) == 3 or isset($_SESSION['viweprim'])){
$get = new reportc();
//$data1 = $get->showallpro($_GET['getid']);
$count1 = $get->totalcount($_GET['getid']);
$data1 = $get->showreportc($_GET['getpremid']);
if($count1 !== NULL){
foreach ($count1 as $data){}
}
$mant1 = $get->totalmanthpay($_GET['getid']);
if($count1 !== NULL){
foreach ($mant1 as $data1){}
}
$totalpre = $data['totalprice'] - $data['totalamount'];
$sumtotal = $data['totalrem'] - $totalpre;
$totalprem = $data['totalrem']- $data1['sumamount'];
?>
<div class="container-fluid"style="direction: rtl;margin-top:90px">
<div class="row clearfix">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-pink hover-expand-effect" >
<div class="icon">
<i class="material-icons">add_shopping_cart</i>
</div>
<div class="content">
<div class="text" style="font-size: 17px">اجمالى عدد المنتجات</div>
<div class="number count-to text-right" data-from="0" data-to="125" data-speed="15" data-fresh-interval="20"><?=$data['count']?> </div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-cyan hover-expand-effect">
<div class="icon">
<i class="material-icons">add_shopping_cart</i>
</div>
<div class="content">
<div class="text" style="font-size: 17px">اجمالى سعر المنتجات</div>
<div class="number count-to text-right"style="font-size: 15px" data-from="0" data-to="257" data-speed="1000" data-fresh-interval="20"><?php echo number_format($data['totalprice'])?></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-light-green hover-expand-effect">
<div class="icon">
<i class="material-icons">monetization_on</i>
</div>
<div class="content" >
<div class="text"style="font-size: 16px">المبالغ المدفوعه مقدما</div>
<div class="number count-to text-right" style="font-size: 15px"data-from="0" data-to="243" data-speed="1000" data-fresh-interval="20"><?= number_format($data['totalamount'])?></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-orange hover-expand-effect">
<div class="icon">
<i class="material-icons">monetization_on</i>
</div>
<div class="content">
<div class="text"style="font-size: 16px">اجمالى المبالغ المطلوب دفعها</div>
<div class="number count-to text-right" data-from="0"style="font-size: 15px" data-to="1225" data-speed="1000" data-fresh-interval="20"><?php echo number_format($data['totalrem'])?></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-red hover-expand-effect">
<div class="icon">
<i class="material-icons">monetization_on</i>
</div>
<div class="content">
<div class="text"style="font-size: 16px">اجمالى عدد الاقساط المدفوعه</div>
<div class="number count-to text-right" data-from="0"style="font-size: 15px" data-to="1225" data-speed="1000" data-fresh-interval="20"><?php echo number_format($data1['totalcountprem'])?></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-black hover-expand-effect">
<div class="icon">
<i class="material-icons">monetization_on</i>
</div>
<div class="content">
<div class="text"style="font-size: 16px">اجمالى مجموع الاقساط المدفوعه</div>
<div class="number count-to text-right" data-from="0"style="font-size: 15px" data-to="1225" data-speed="1000" data-fresh-interval="20"><?php echo number_format($data1['sumamount'])?></div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-teal hover-expand-effect">
<div class="icon">
<i class="material-icons">monetization_on</i>
</div>
<div class="content">
<div class="text"style="font-size: 16px">اجمالى المبلغ المتبقى</div>
<div class="number count-to text-right" data-from="0"style="font-size: 15px" data-to="1225" data-speed="1000" data-fresh-interval="20"><?php echo number_format($totalprem)?></div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-blue hover-expand-effect">
<div class="icon">
<i class="material-icons">monetization_on</i>
</div>
<div class="content">
<div class="text"style="font-size: 16px">صافى الربح</div>
<div class="number count-to text-right" data-from="0"style="font-size: 15px" data-to="1225" data-speed="1000" data-fresh-interval="20"><?php echo number_format($sumtotal)?></div>
</div>
</div>
</div>
</div>
<!-- #END# Widgets -->
<div class="container-fluid">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card" style="height:auto;direction: rtl;margin-top: 59px">
<div class="header">
<h2>
عرض جميع تقاير منتجات العميل
</h2>
</div>
<div class="body">
<div class="session">
<?php
if(isset( $_SESSION['upprem'])){
echo msg::setmsg("تم تحديث بيانات المنتج بنجاح","success");
unset( $_SESSION['upprem']);
}
if(isset( $_SESSION['noching'])){
echo msg::setmsg("لم تقم بأى تغيرات","info");
unset( $_SESSION['noching']);
}
if(isset( $_SESSION['delprem'])){
echo msg::setmsg("تم حذف بيانات المنتج بنجاح","success");
unset( $_SESSION['delprem']);
}
?>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover dataTable js-exportable" style="background-color: #fff;">
<thead style="color:#000">
<tr>
<th style="color:#000">#</th>
<th>اسم العميل</th>
<th>اسم المنتج</th>
<th>سعر المنتج</th>
<th>المبلغ المدفوع</th>
<th>مده القسط</th>
<th>المبلغ المتبقى </th>
<th>القسط الشهرى</th>
<th>التفاصيل</th>
<th>التاريخ</th>
<th>الحاله</th>
<th>تقارير</th>
<th>تعديل</th>
<th>حذف</th>
</tr>
</thead>
<tfoot>
<tr>
<th style="color:#000">#</th>
<th>اسم العميل</th>
<th>اسم المنتج</th>
<th>سعر المنتج</th>
<th>المبلغ المدفوع</th>
<th>مده القسط</th>
<th>المبلغ المتبقى </th>
<th>القسط الشهرى</th>
<th>التفاصيل</th>
<th>التاريخ</th>
<th>الحاله</th>
<th>تقارير</th>
<th>تعديل</th>
<th>حذف</th>
</tr>
</tfoot>
<tbody class="">
<?php
$data1 = $get->showallpro($_GET['getid']);
if($data1 !== null){
$nuber = 1;
foreach ($data1 as $data){
$getinfo = new prem();
$fetch = $getinfo->getstutsprem($data['prem_id']);
?>
<tr <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='border: 1px solid green; '"; }?>>
<th scope="row"><?=$nuber ++ ;?></th>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?=$data['name'];?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?=$data['prodect_name'];?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo $data['prodect_price'] ?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo $data['amount_pay'] ?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo $data['prem_lemt'] ?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo $data['rem_amount'] ?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo $data['prem_manth'] ?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo substr($data['discrption'] , 0,200) ;?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php echo $data['date'] ;?></td>
<td <?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "style='color:green'"; }?>><?php if ($data['rem_amount'] == $fetch['totalamount']){ echo "مكتمله"; }else{echo "جارى التنفيذ";}?></td>
<td>
<?php
echo '<a href="reportcustomer1.php?getpremid='.$data['prem_id'].'" class="btn btn-info "><i class="material-icons">description</i></a>';
?>
</td>
<td>
<?php
echo '<a href="editprem.php?getpremid='.$data['prem_id'].'&getnew='.$_GET['getid'].'" class="btn btn-success "><i class="material-icons">create</i></a>';
?>
</td>
<td>
<?php
echo '<a href="deleteprem.php?getpremid='.$data['prem_id'].'&getnew='.$_GET['getid'].'" class="btn btn-danger del33 "><i class="material-icons">delete_forever</i></a>';
?>
</td>
</tr>
<?php }
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- #END# Exportable Table -->
</div>
<?php
} else {
header("Location:error404.php");
exit();
}
?>
<?php require "lassfooter.php";?>