-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdetail_transaksi_langsung.php
168 lines (151 loc) · 6.49 KB
/
detail_transaksi_langsung.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
<?php
include 'config.php';
error_reporting(0);
$id_orders = $_GET['id_orders'];
$queryRowProduct = $connect->query("SELECT orders_detail.id_orders, orders_detail.product_id, orders_detail.jumlah, orders_detail.tgl_order, barang.id, barang.nmbrg, barang.harga
FROM orders_detail JOIN barang ON orders_detail.product_id = barang.id
WHERE id_orders = '$id_orders'
");
$queryRowProduct2 = $connect->query("SELECT orders_detail.id_orders, orders_detail.product_id, orders_detail.jumlah, orders_detail.tgl_order, barang.id, barang.nmbrg, barang.harga
FROM orders_detail JOIN barang ON orders_detail.product_id = barang.id
WHERE id_orders = '$id_orders'
");
$rowProduct = mysqli_fetch_array($queryRowProduct2);
?>
<div class="fixed-bottom">
<a href="#offcanvas-slide" class="uk-button uk-button-danger text-white uk-button-large" uk-toggle><strong>MENU</strong></a>
<div id="offcanvas-slide" uk-offcanvas>
<div class="uk-offcanvas-bar">
<ul class="uk-nav uk-nav-default">
<li class="uk-active">
<img class="img-fluid" src="assets/images/topos.png"/>
</li>
<li>
<img class="img-fluid" src="assets/images/tpos.png"/>
</li>
<li class="uk-nav-divider"></li>
<li class="uk-nav-header uk-active">
<a href="index.php">
<span uk-icon="home"></span>
Home</a></li>
<li class="uk-nav-divider"></li>
<li class="uk-nav-header uk-active">
<a href="?hal=dbs">
<span uk-icon="database"></span>
Databased</a>
</li>
<!-- <li><a href="#">Item</a></li>
<li><a href="#">Item</a></li>
<li class="uk-nav-divider"></li>
<li><a href="#">Item</a></li>-->
<li class="uk-nav-divider"></li>
<li class="uk-nav-header uk-active">
<a href="?hal=sale">
<span uk-icon="cart"></span>
POINT OF SALE</a>
</li>
<li class="uk-nav-divider"></li>
<li class="uk-nav-header uk-active">
<a href="?hal=lap">
<span uk-icon="desktop"></span>
REPORT DETAIL'S</a>
</li>
<li class="uk-nav-divider"></li>
<li class="uk-nav-header uk-active">
<a href="logout.php">
<span uk-icon="sign-out"></span>
SHUT DOWN</a>
</li>
<li class="uk-nav-divider"></li>
</ul>
<!--
<p>
<small>Modern point of sale web app<br/>
<a href="https://mesinkasironline.web.app">
https://mesinkasironline.web.app</a>
</small>
</p>
-->
</div>
</div>
</div>
<!--body wrapper start-->
<div class="wrapper">
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<section class="panel">
<header class="panel-heading text-center">
<h4>DETAIL TRANSACTION</h4>
</header>
<hr>
<div class="panel">
<div class="panel-body">
<p align="left"><?=$id_orders;?> </p>
</div>
</div>
<div class="panel">
<div class="panel-body">
<div class="blog-post">
<div class="media">
<div class="panel-body">
<div class="panel">
<p align="left"> <?=$rowProduct['tgl_order'];?> </p>
</div>
<h5 align="right"> </h5>
<table class="table">
<thead>
<tr>
<th>Item</th>
<th>Price</th>
<th>Qty</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php
$total = 0;
while ($data = mysqli_fetch_array($queryRowProduct)) {
$sub_total = $data['harga'] * $data['jumlah'];
$total += $sub_total;
?>
<tr>
<td>
<?=$data['nmbrg'] ?></td>
<td>
Rp. <?php echo number_format($data['harga'], 0, ',', '.'); ?></td>
<td><?php echo $data['jumlah']; ?></td>
<td>Rp. <?php echo number_format($sub_total, 0, ',', '.'); ?></td>
</tr>
<?php }
?>
<tr>
<td colspan="3">
Grand Total
</td>
<td>Rp.
<?php echo number_format($total, 0, ',', '.'); ?>
</td>
</tr>
<tr>
<td colspan="4" align="reight">
<a href="index.php?hal=transaksi_langsung"
class="btn btn-dark btn-block">
Back
</a>
<!-- </form> -->
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="col-md-4"></div>
</div>
</div>
<!--body wrapper end-->