This repository has been archived by the owner on Jun 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
/
print.php
executable file
·64 lines (64 loc) · 1.79 KB
/
print.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
<?php
@ob_start();
session_start();
if(!empty($_SESSION['admin'])){ }else{
echo '<script>window.location="login.php";</script>';
exit;
}
require 'config.php';
include $view;
$lihat = new view($config);
$toko = $lihat -> toko();
$hsl = $lihat -> penjualan();
?>
<html>
<head>
<title>print</title>
<link rel="stylesheet" href="assets/css/bootstrap.css">
</head>
<body>
<script>window.print();</script>
<div class="container">
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-4">
<center>
<p><?php echo $toko['nama_toko'];?></p>
<p><?php echo $toko['alamat_toko'];?></p>
<p>Tanggal : <?php echo date("j F Y, G:i");?></p>
<p>Kasir : <?php echo htmlentities($_GET['nm_member']);?></p>
</center>
<table class="table table-bordered" style="width:100%;">
<tr>
<td>No.</td>
<td>Barang</td>
<td>Jumlah</td>
<td>Total</td>
</tr>
<?php $no=1; foreach($hsl as $isi){?>
<tr>
<td><?php echo $no;?></td>
<td><?php echo $isi['nama_barang'];?></td>
<td><?php echo $isi['jumlah'];?></td>
<td><?php echo $isi['total'];?></td>
</tr>
<?php $no++; }?>
</table>
<div class="pull-right">
<?php $hasil = $lihat -> jumlah(); ?>
Total : Rp.<?php echo number_format($hasil['bayar']);?>,-
<br/>
Bayar : Rp.<?php echo number_format(htmlentities($_GET['bayar']));?>,-
<br/>
Kembali : Rp.<?php echo number_format(htmlentities($_GET['kembali']));?>,-
</div>
<div class="clearfix"></div>
<center>
<p>Terima Kasih Telah berbelanja di toko kami !</p>
</center>
</div>
<div class="col-sm-4"></div>
</div>
</div>
</body>
</html>