-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathorderreceipt.php
More file actions
executable file
·136 lines (113 loc) · 5 KB
/
Copy pathorderreceipt.php
File metadata and controls
executable file
·136 lines (113 loc) · 5 KB
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
<?php
$pageUi="orderreceipt";
include_once 'config.php';
?>
<!doctype html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.rtl.min.css" integrity="sha384-trxYGD5BY4TyBTvU5H23FalSCYwpLA0vWEvXXGm5eytyztxb+97WzzY+IWDOSbav" crossorigin="anonymous">
<link rel="stylesheet" href="assets/css/admin.css">
<title>فلورا</title>
<!-- Fontawesome kit -->
<script src="https://kit.fontawesome.com/2370aca281.js" crossorigin="anonymous"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<!----------------------------- left panel --------------------------->
<main class="col-md-9 m-auto col-lg-10 px-md-4">
<div class="container">
<div class="row">
<div class="col-12 p-3 pb-1 border-bottom border-3 d-flex flex-row align-items-center">
<div>
<strong class="me-2">فاکتور شماره</strong>
<strong>#<?php echo $order->getCode(); ?></strong>
</div>
<div class="ms-auto">
<a href="userorders.php" class="text-decoration-none">
<strong>بازگشت به سفارشات</strong>
<i class="fas fa-long-arrow-alt-left ms-1"></i>
</a>
</div>
</div>
</div>
<div class="row my-3 border-bottom border-2">
<div class="col-6 my-2">
<strong>سفارش دهنده:</strong>
<span><?php echo $user->getFirstName()." ".$user->getLastName(); ?></span>
</div>
<div class="col-6 my-2">
<strong>تاریخ سفارش:</strong>
<span>
<?php
$timestampDate=convertTimeStamp($order->getCreatedAt())['date'];
echo timestampToJalaliDate($timestampDate);
?>
</span>
</div>
</div>
<div class="row my-3 border-bottom border-2">
<div class="col-12 my-2">
<strong>آدرس:</strong>
<span><?php echo $address->getAddress(); ?></span>
</div>
<div class="col-6 my-2">
<strong>کد پستی:</strong>
<span><?php echo $address->getPostalCode(); ?></span>
</div>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm text-nowrap align-middle">
<thead>
<tr>
<th>#</th>
<th>کالا</th>
<th>تعداد</th>
<th>قیمت واحد(تومان)</th>
<th>جمع مبلغ</th>
</tr>
</thead>
<tbody class="">
<?php $counter=0; foreach($ordersDetail as $orderDetail): $counter++;
$orderDetailObj=new OrderDetail($orderDetail['id']);
$product=new Product($orderDetail['product_id']);
?>
<tr>
<td><?php echo $counter; ?></td>
<td><?php echo $product->getTitle(); ?></td>
<td><?php echo $orderDetailObj->getQuantity(); ?></td>
<td><?php echo number_format($orderDetailObj->getOrderedPrice()); ?></td>
<td><?php echo number_format($orderDetailObj->getSumPrice()); ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="d-flex flex-row justify-content-between">
<div>
<div class="col-12 my-2">
<strong>هزینه ارسال</strong>
<span><?php if($order->getPostalPrice()>0){ echo number_format($order->getPostalPrice()).' تومان'; }else{ echo 'رایگان'; } ?></span>
</div>
<div class="col-12 my-2">
<strong>مبلغ پرداخت شده:</strong>
<span><?php echo number_format($order->getSumPrice()); ?> تومان</span>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
<!--JQuery cdn -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="../assets/js/extra.js"></script>
</body>
</html>
<!-- adding this line of code to test rebase -->