deploy awal
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
<style type="text/css">
|
||||
table {
|
||||
border: 15px solid #25BAE4;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
border: 1px solid #e2e0e0;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th {
|
||||
height: 50px;
|
||||
padding-bottom: 8px;
|
||||
background: #25BAE4;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.prev_sign a,
|
||||
.next_sign a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
tr.week_name {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: red;
|
||||
width: 10px;
|
||||
background-color: #efe8e8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background-color: #25BAE4;
|
||||
color: white;
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.calender .days td {
|
||||
width: 2000px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.calender .hightlight {
|
||||
font-weight: 600px;
|
||||
}
|
||||
|
||||
.calender .days td:hover {
|
||||
background-color: #DEF;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 0px;
|
||||
}
|
||||
</style>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class='box-header with-border'>
|
||||
<h3 class='box-title'>Laporan Penjualan Bulanan</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<?php foreach ($cards as $info_cards) : ?>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-<?= $info_cards->box ?>">
|
||||
<span class="info-box-icon"><i class="fa fa-<?= $info_cards->icon ?>"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text"><?= $info_cards->title; ?></span>
|
||||
<span class="info-box-number"><?= $info_cards->total; ?></span>
|
||||
<div class="progress">
|
||||
<div style="width: 100%" class="progress-bar"></div>
|
||||
</div>
|
||||
<span class="progress-description">
|
||||
<?= $info_cards->description; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="col-md-12">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
$next = intval($tahun) + 1;
|
||||
$prev = intval($tahun) - 1;
|
||||
?>
|
||||
<th>
|
||||
<a href="<?php echo base_url('index.php/lapbulanan/index/' . $prev) ?>"><<</a>
|
||||
</th>
|
||||
<th><?php if ($tahun) {
|
||||
echo $tahun;
|
||||
} ?></th>
|
||||
<th>
|
||||
<a href="<?php echo base_url('index.php/lapbulanan/index/' . $next) ?>">>></a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php foreach ($bulanan as $row) : ?>
|
||||
<th>
|
||||
<?php
|
||||
$bulan = $this->fungsi->bulan($row->tgl_trf);
|
||||
echo $bulan ?>
|
||||
</th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php foreach ($bulanan as $row) : ?>
|
||||
<td>
|
||||
<?php
|
||||
$bulan = $row->tgl_trf;
|
||||
$mnow = date('m');
|
||||
$bulanskrng = substr($bulan,6,1);
|
||||
if ($bulanskrng == $mnow){
|
||||
echo '<span class="highlight">Rp'.number_format($row->gtotal).'</span>';
|
||||
}
|
||||
else{
|
||||
echo 'Rp'.number_format($row->gtotal);
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,223 @@
|
||||
<style type="text/css">
|
||||
table,
|
||||
th,
|
||||
tr,
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.swal2-popup {
|
||||
font-family: inherit;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
display: initial;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class='box-header with-border'>
|
||||
<h1 class='box-title'>Data Laporan Detail</h1>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<?php echo form_open('laporandetail', array('role' => "form", 'id' => "myForm", 'data-toggle' => "validator")); ?>
|
||||
<div class="col-md-3">
|
||||
<div class="input-daterange">
|
||||
<div class="form-group">
|
||||
<label for="start_date" class="control-label">Tanggal Awal</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="start_date" id="start_date" data-error="Tanggal Awal harus diisi" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-daterange">
|
||||
<div class="form-group">
|
||||
<label for="end_date" class="control-label">Tanggal Akhir</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="end_date" id="end_date" data-error="Tanggal Akhir harus diisi" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="metode" class="control-label">Metode</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" name="metode" id="metode">
|
||||
<option value="">Pilih Semua</option>
|
||||
<?php
|
||||
foreach ($metode as $m) {
|
||||
echo "<option value=' $m->id_byr'>$m->metode</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-list"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-top:25px;">
|
||||
<button type="submit" name="search" id="search" value="Search" class="btn btn-info"> Search</button>
|
||||
<a href="#" id="print" class="btn btn-info">Print PDF</a>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="myTable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Tgl. Transaksi</th>
|
||||
<th>No. Transaksi</th>
|
||||
<th>NIS</th>
|
||||
<th>Nama Siswa</th>
|
||||
<th>Kelas</th>
|
||||
<th>Status</th>
|
||||
<th>Nama Barang</th>
|
||||
<th>Qty</th>
|
||||
<th>Harga beli</th>
|
||||
<th>Harga jual</th>
|
||||
<th>Diskon</th>
|
||||
<th>Total</th>
|
||||
<th>Petugas</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $no = 0;
|
||||
$total = 0; // Inisialisasi total
|
||||
$hitung = 0;
|
||||
foreach ($laporan as $row) {
|
||||
$diskon= ($row->diskon / 100) * $row->sub_total;
|
||||
$totalnya = $row->sub_total - $diskon;
|
||||
$total += $totalnya;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo ++$no; ?></td>
|
||||
<td><?php echo $row->tgl_trf; ?></td>
|
||||
<td><?php echo $row->no_trf; ?></td>
|
||||
<td><?php echo $row->nis_siswa; ?></td>
|
||||
<td><?php echo $row->nama_siswa; ?></td>
|
||||
<td><?php echo $row->kelas; ?></td>
|
||||
<td><?php echo $row->status; ?></td>
|
||||
<td><?php echo $row->nama_barang; ?></td>
|
||||
<td><?php echo $row->jumlah_stok; ?></td>
|
||||
<td><?php echo number_format($row->harga_beli); ?></td>
|
||||
<td><?php echo number_format($row->harga); ?></td>
|
||||
<td><?php echo $row->diskon; ?>%</td>
|
||||
<td><?php echo number_format($totalnya); ?></td>
|
||||
<td><?php echo $row->operator; ?></td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="12" style="text-align: right;"><b>Grand Total :</b></td>
|
||||
<td><b><?php echo number_format($total); ?></b></td>
|
||||
<td></td> <!-- Kolom operator tidak ada total -->
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="<?php echo base_url() ?>assets/app/js/alert.js"></script>
|
||||
<script>
|
||||
var total = <?php echo $total; ?>;
|
||||
var beli = <?php echo $beli; ?>;
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.input-daterange').datepicker({
|
||||
todayBtn: 'linked',
|
||||
format: "yyyy-mm-dd",
|
||||
autoclose: true
|
||||
});
|
||||
$('#myTable').DataTable({
|
||||
"dom": '<"top row"<"col-md-4" l ><"col-md-4" B ><"col-md-4" and f>>rt<"bottom row"<"col-md-6" i> <"col-md-6" p>>',
|
||||
|
||||
|
||||
buttons: [{
|
||||
extend: 'csvHtml5',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
messageTop: 'KOPERASI DHARMA AL MUHTADIN DEPOK',
|
||||
customize: function(xlsx) {
|
||||
// Menambahkan baris kosong di awal
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
var data = '<row><c></c></row>'; // Baris kosong
|
||||
$('sheetData', sheet).prepend(data); // Menambahkan baris kosong ke awal sheet
|
||||
},
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
extend: 'print',
|
||||
oriented: 'portrait',
|
||||
pageSize: 'A4',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
},
|
||||
},
|
||||
],
|
||||
columnDefs: [
|
||||
{ width: 'auto', targets: '_all' }
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#print').on('click', function(e) {
|
||||
e.preventDefault(); // Mencegah tindakan default dari anchor
|
||||
|
||||
var startDate = $('#start_date').val(); // Mendapatkan tanggal awal
|
||||
var endDate = $('#end_date').val(); // Mendapatkan tanggal akhir
|
||||
var metode = $('#metode').val(); // Mendapatkan metode
|
||||
var url = '<?php echo base_url('laporandetail/print_pdf'); ?>?start_date=' + startDate + '&end_date=' + endDate + '&metode=' + metode; // URL untuk cetak PDF
|
||||
window.open(url, '_blank'); // Membuka PDF dalam tab baru
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,100 @@
|
||||
<style type="text/css">
|
||||
table {
|
||||
border: 15px solid #25BAE4;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
td {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
text-align: center;
|
||||
border: 1px solid #e2e0e0;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
th {
|
||||
height: 50px;
|
||||
padding-bottom: 8px;
|
||||
background: #25BAE4;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.prev_sign a,
|
||||
.next_sign a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
tr.week_name {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: red;
|
||||
width: 10px;
|
||||
background-color: #efe8e8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background-color: #25BAE4;
|
||||
color: white;
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.calender .days td {
|
||||
width: 2000px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.calender .hightlight {
|
||||
font-weight: 600px;
|
||||
}
|
||||
|
||||
.calender .days td:hover {
|
||||
background-color: #DEF;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 0px;
|
||||
/* padding: 15px; */
|
||||
/* margin-right: auto; */
|
||||
/* margin-left: auto; */
|
||||
/* padding-left: 15px; */
|
||||
/* padding-right: 15px; */
|
||||
}
|
||||
</style>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class='box-header with-border'>
|
||||
<h3 class='box-title'>Laporan Penjualan Harian</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<?php foreach ($cards as $info_cards) : ?>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="info-box bg-<?= $info_cards->box ?>">
|
||||
<span class="info-box-icon"><i class="fa fa-<?= $info_cards->icon ?>"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text"><?= $info_cards->title; ?></span>
|
||||
<span class="info-box-number"><?= $info_cards->total; ?></span>
|
||||
<div class="progress">
|
||||
<div style="width: 100%" class="progress-bar"></div>
|
||||
</div>
|
||||
<span class="progress-description">
|
||||
<?= $info_cards->description; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="col-md-12">
|
||||
<?php echo $calender; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,182 @@
|
||||
<style type="text/css">
|
||||
table,
|
||||
th,
|
||||
tr,
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.swal2-popup {
|
||||
font-family: inherit;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
display: initial;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-info">
|
||||
<div class='box-header with-border'>
|
||||
<h3 class='box-title'>Data Laporan Pembayaran</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<?php echo form_open('laporan', array('role' => "form", 'id' => "myForm", 'data-toggle' => "validator")); ?>
|
||||
<div class="col-md-3">
|
||||
<div class="input-daterange">
|
||||
<div class="form-group">
|
||||
<label for="start_date" class="control-label">Tanggal Awal</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="start_date" id="start_date" data-error="Tanggal Awal harus diisi" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-daterange">
|
||||
<div class="form-group">
|
||||
<label for="end_date" class="control-label">Tanggal Akhir</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="end_date" id="end_date" data-error="Tanggal Akhir harus diisi" required />
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="metode" class="control-label">Metode</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" name="metode">
|
||||
<option value="">Pilih Semua</option>
|
||||
<?php
|
||||
foreach ($metode as $m) {
|
||||
echo "<option value=' $m->id_byr'>$m->metode</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-list"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-top:25px;">
|
||||
<button type="submit" name="search" id="search" value="Search" class="btn btn-info"> Search</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="myTable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>No. Transaksi</th>
|
||||
<th>Nama Siswa</th>
|
||||
<th>Kelas</th>
|
||||
<th>Tgl. Transaksi</th>
|
||||
<th>Jam Transaksi</th>
|
||||
<th>Pembayaran</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $no = 0;
|
||||
foreach ($laporan as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo ++$no; ?></td>
|
||||
<td><?php echo $row->no_trf; ?></td>
|
||||
<td><?php echo $row->nama_siswa; ?></td>
|
||||
<td><?php echo $row->kelas; ?></td>
|
||||
<td><?php echo $row->tgl_trf; ?></td>
|
||||
<td><?php echo $row->jam_trf; ?></td>
|
||||
<td><?php echo $row->metode; ?></td>
|
||||
<td><?php
|
||||
echo anchor(site_url('penjualan/struk/' . $row->id), '<i class="fa fa-eye"></i> Detail', array('title' => 'edit', 'class' => 'btn btn-sm btn-info'));
|
||||
echo ' ';
|
||||
echo anchor(site_url('laporan/hapus/' . $row->id), '<i class="fa fa-trash fa-lg"></i> Hapus', 'title="delete" class="btn btn-sm btn-danger "');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="<?php echo base_url() ?>assets/app/js/alert.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.input-daterange').datepicker({
|
||||
todayBtn: 'linked',
|
||||
format: "yyyy-mm-dd",
|
||||
autoclose: true
|
||||
});
|
||||
$('#myTable').DataTable({
|
||||
"dom": '<"top row"<"col-md-4" l ><"col-md-4" B ><"col-md-4" and f>>rt<"bottom row"<"col-md-6" i> <"col-md-6" p>>',
|
||||
|
||||
buttons: [{
|
||||
extend: 'csvHtml5',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6 ],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'copyHtml5',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6],
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
oriented: 'portrait',
|
||||
pageSize: 'legal',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
download: 'open',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6],
|
||||
},
|
||||
customize: function(doc) {
|
||||
doc.content[1].table.widths = Array(doc.content[1].table.body[0].length + 1).join('*').split('');
|
||||
doc.styles.tableBodyEven.alignment = 'center';
|
||||
doc.styles.tableBodyOdd.alignment = 'center';
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
oriented: 'portrait',
|
||||
pageSize: 'A4',
|
||||
title: 'LAPORAN PENJUALAN',
|
||||
exportOptions: {
|
||||
columns: [0, 1, 2, 3, 4, 5, 6],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Laporan Detail</title>
|
||||
<style>
|
||||
@page {
|
||||
size: landscape;
|
||||
}
|
||||
|
||||
body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
table th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
tbody tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
tfoot:last-child {
|
||||
display: table-footer-group;
|
||||
}
|
||||
|
||||
.additional-info {
|
||||
text-align: right;
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="window.print()">
|
||||
<h1>LAPORAN DETAIL</h1>
|
||||
<h2>KOPERASI DHARMA AL MUHTADIN DEPOK</h2>
|
||||
<p><b>Dari tanggal : <?php echo date("d-n-Y", strtotime($start)); ?> s/d tanggal : <?php echo date("d-n-Y", strtotime($end)); ?></b></p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Tgl. Transaksi</th>
|
||||
<th>No. Transaksi</th>
|
||||
<th>NIS</th>
|
||||
<th>Nama Siswa</th>
|
||||
<th>Kelas</th>
|
||||
<th>Status</th>
|
||||
<th>Nama Barang</th>
|
||||
<th>Qty</th>
|
||||
<th>Harga Beli</th>
|
||||
<th>Harga Jual</th>
|
||||
<th>Diskon</th>
|
||||
<th>Total</th>
|
||||
<th>Petugas</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$no = 0;
|
||||
$total = 0; // Inisialisasi total
|
||||
foreach ($laporan as $row) {
|
||||
$diskon= ($row->diskon / 100) * $row->sub_total;
|
||||
$totalnya = $row->sub_total - $diskon;
|
||||
$total += $totalnya;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo ++$no; ?>.</td>
|
||||
<td><?php echo $row->tgl_trf; ?></td>
|
||||
<td><?php echo $row->no_trf; ?></td>
|
||||
<td><?php echo $row->nis_siswa; ?></td>
|
||||
<td><?php echo $row->nama_siswa; ?></td>
|
||||
<td><?php echo $row->kelas; ?></td>
|
||||
<td><?php echo $row->status; ?></td>
|
||||
<td><?php echo $row->nama_barang; ?></td>
|
||||
<td><?php echo $row->jumlah_stok; ?></td>
|
||||
<td>Rp. <?php echo number_format($row->harga_beli); ?></td>
|
||||
<td>Rp. <?php echo number_format($row->harga); ?></td>
|
||||
<td><?php echo $row->diskon; ?>%</td>
|
||||
<td align="right">Rp. <?php echo number_format($totalnya); ?></td>
|
||||
<td><?php echo $row->operator; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<tr>
|
||||
<td colspan="12" style="text-align: right;"><b>Grand Total :</b></td>
|
||||
<td colspan="2" style="text-align: left;"><b>Rp. <?php echo number_format($total); ?></b></td>
|
||||
<!-- <td></td> Kolom operator tidak ada total -->
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<table>
|
||||
<tfoot>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="additional-info">
|
||||
<p>Depok, <?php echo date("d-n-Y"); ?></p>
|
||||
<p>Petugas Print : <?= $this->session->userdata['nama'] ?></p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user