-
Notifications
You must be signed in to change notification settings - Fork 0
/
cetak_slip_transaksi.php
128 lines (119 loc) · 3.14 KB
/
cetak_slip_transaksi.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
<?php
session_start();
if(isset($_SESSION['admin'])){
include 'koneksi.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Slip Pembayaran SPP</title>
<style>
body{
font-family: arial;
}
/* .print{
margin-top: 10px;
}
@media print {
.print{
display: none;
}
} */
table{
border-collapse:collapse;
}
</style>
</head>
<body onload="window.print();">
<h3>SMK NEGERI ....<b><br>LAPORAN PEMBAYARAN</b></h3>
<br/>
<hr/>
<?php
$nisn = $_GET['nisn'];
$siswa = mysqli_query($conn,"SELECT siswa.*,angkatan.*,jurusan.*,kelas.* FROM siswa,angkatan,jurusan,kelas WHERE siswa.id_angkatan = angkatan.id_angkatan AND siswa.id_jurusan = jurusan.id_jurusan AND siswa.id_kelas = kelas.id_kelas AND siswa.nisn = '$nisn'");
$sw=mysqli_fetch_assoc($siswa);
$idspp = $_GET['id'];
?>
<table>
<tr>
<td>Nama Siswa</td>
<td>:</td>
<td><?=$sw['nama']?></td>
</tr>
<tr>
<td>NISN</td>
<td>:</td>
<td><?=$sw['nisn']?></td>
</tr>
<tr>
<td>Kelas</td>
<td>:</td>
<td><?=$sw['nama_kelas']?></td>
</tr>
<tr>
<td>Angkatan</td>
<td>:</td>
<td><?=$sw['nama_angkatan']?></td>
</tr>
<tr>
<td>Jurusan</td>
<td>:</td>
<td><?=$sw['nama_jurusan']?></td>
</tr>
</table>
<table border="1" cellspacing="" cellpadding="4" width="100%">
<tr>
<th>NO</th>
<th>NO. Bayar</th>
<th>PEMBAYARAN BULAN</th>
<th>JUMLAH</th>
<th>KETERANGAN</th>
</tr>
<?php
$spp = mysqli_query($conn,"SELECT siswa.*,pembayaran.* FROM siswa,pembayaran WHERE pembayaran.id_siswa = siswa.id_siswa AND pembayaran.idspp = '$idspp' ORDER BY nobayar ASC");
$i=1;
$total = 0;
while($dta=mysqli_fetch_assoc($spp)) :
?>
<tr>
<td align="center"><?= $i ?></td>
<td align=""><?= $dta['nobayar'] ?></td>
<td align=""><?= $dta['bulan'] ?></td>
<td align="right"><?= $dta['jumlah'] ?></td>
<td align="center"><?= $dta['ket'] ?></td>
</tr>
<?php $i++; ?>
<?php
$total += $dta['jumlah'];
?>
<?php
endwhile;
?>
<tr>
<td colspan="7" align="right">TOTAL</td>
<td align="right"><b><?=$total?></b></td>
</tr>
</table>
<table width="100%">
<tr>
<td></td>
<td>
<br>
<p>NAMA KOTA <?=date('d/m/y')?></p></br>
Operator,
<br/><br/><br/>
<p>---------------------------------</p>
</td>
<td></td>
</tr>
</table>
</body>
</html>
<?php
}
else{
header('location: login.php');
}
?>