@@ -52,7 +52,7 @@ function getItemsReciept(){
5252 }
5353}
5454
55- $ sql = "SELECT t.id, t.total, l.kilo, p.price, c.fullname
55+ $ sql = "SELECT t.id, t.total, l.kilo, p.price, t.amount, c.fullname
5656FROM transactions AS t
5757JOIN laundry AS l ON t.id = l.transaction_id
5858JOIN prices AS p ON l.type = p.id
@@ -69,6 +69,7 @@ function getItemsReciept(){
6969foreach ($ result as $ row ){
7070 $ total += $ row ['price ' ] * $ row ['kilo ' ];
7171 $ customer = $ row ['fullname ' ];
72+ $ amount = $ row ['amount ' ];
7273}
7374
7475
@@ -90,7 +91,7 @@ function getItemsReciept(){
9091 <script src="assets/js/qrious.min.js"></script>
9192</head>
9293
93- <body class="mx-5" onload="" >
94+ <body class="mx-5">
9495 <div class="table-responsive">
9596 <table class="table">
9697 <thead>
@@ -197,12 +198,32 @@ function getItemsReciept(){
197198 <tr class="font-monospace">
198199 <th class="font-monospace text-end"><strong>TOTAL</strong> <strong>₱<?php echo number_format ($ total , 2 ); ?> </strong></th>
199200 </tr>
201+ <tr class="font-monospace">
202+ <th class="font-monospace text-end"><strong>AMOUNT</strong> <strong>₱<?php echo number_format ($ amount , 2 ); ?> </strong></th>
203+ </tr>
204+ <tr class="font-monospace">
205+ <th class="font-monospace text-end"><strong>CHANGES</strong> <strong>₱<?php echo number_format ($ amount - $ total , 2 ); ?> </strong></th>
206+ </tr>
200207 </thead>
201208 <tbody>
202209 <tr></tr>
203210 </tbody>
204211 </table>
205- </div>
212+ <table class="table table-borderless">
213+ <thead class="font-monospace">
214+ <tr class="font-monospace">
215+ <th class="font-monospace text-center"><strong class="text-danger">**** PLEASE BRING THE RECIEPT TO CLAIM YOUR LAUNDRY ****</strong></th>
216+ </tr>
217+ </thead>
218+ <tbody>
219+ <tr></tr>
220+ </tbody>
221+ </table>
222+ </div>
223+ <!-- BASKET QRCODE -->
224+
225+
226+ <!-- END BASKET QRCODE -->
206227 <script src="assets/js/jquery.min.js"></script>
207228 <script src="assets/bootstrap/js/bootstrap.min.js"></script>
208229 <script src="assets/js/jquery.dataTables.min.js"></script>
@@ -218,22 +239,22 @@ function getItemsReciept(){
218239 <script>
219240 $(document) .ready(function() {
220241 (function() {
221- var qr = new QRious({
242+ var qr = new QRious({
222243 element: document.getElementById('qr-code'),
223244 size: 150,
224245 value: '<?php echo $ get_tracking_url ; ?> '
225246 });
226247 })();
227-
248+
249+ // $('.qr-code').each(function() {
250+ // var qr = new QRious({
251+ // element: this,
252+ // size: 150,
253+ // value: '<?php echo $ get_tracking_url ; ?> '
254+ // });
255+ // });
228256 } );
229- function printPageAndRedirect() {
230- setTimeout(function() {
231- window.setTimeout(function() {
232- window.print();
233- window.location.href = '<?php if (isset ($ _GET ['type ' ])){ echo 'tracking.php?id= ' .$ _GET ['id ' ]; }?> ';
234- }, 500);
235- }, 500);
236- }
257+
237258
238259 </script>
239260</body>
0 commit comments