314 lines
12 KiB
PHP
314 lines
12 KiB
PHP
<!doctype html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>MUTASI BARANG</title>
|
|
<link rel="icon" type="image/png" href="<?php echo base_url('')?>assets/images/logoPcmBaru3.png" />
|
|
|
|
<!-- Web Fonts -->
|
|
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet" type="text/css">
|
|
|
|
<!-- Vendor CSS -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap/css/bootstrap.css" />
|
|
|
|
<!-- Invoice Print Style -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/invoice-print.css" />
|
|
<script src="<?php echo base_url('') ?>assets/ajax/jquery.min.js"></script>
|
|
<style type="text/css">
|
|
.f5 {
|
|
font-size: 5px;
|
|
}
|
|
|
|
.f9 {
|
|
font-size: 9px;
|
|
}
|
|
|
|
.f10 {
|
|
font-size: 10px;
|
|
}
|
|
|
|
.f11 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.f12 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.f13 {
|
|
font-size: 13px;
|
|
}
|
|
|
|
.f14 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.f15 {
|
|
font-size: 15px;
|
|
}
|
|
|
|
.f16 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
td {
|
|
width: auto;
|
|
}
|
|
|
|
th {
|
|
width: auto;
|
|
}
|
|
|
|
th.pd-2 {
|
|
padding: 2px;
|
|
}
|
|
|
|
td.min {
|
|
width: 1%;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
td.fz10-td {
|
|
font-size: 10px;
|
|
}
|
|
|
|
td.fz11-td {
|
|
font-size: 11px;
|
|
}
|
|
|
|
td.fz12-td {
|
|
font-size: 12px;
|
|
}
|
|
|
|
th.nilai {
|
|
width: 6%;
|
|
}
|
|
|
|
address.fz12 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
span.fz12s {
|
|
font-size: 12px;
|
|
}
|
|
|
|
p.fz12-p {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.watermark {
|
|
position: relative;
|
|
}
|
|
|
|
.watermark:before {
|
|
content: 'TESSSSSSSSSSSS';
|
|
position: absolute;
|
|
size: 100;
|
|
background-image: url("../assets/images/imgCopy.png");
|
|
background-size: 400px;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
background-attachment: fixed;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0.3;
|
|
z-index: 2;
|
|
}
|
|
|
|
.single-line {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
@page {
|
|
size: A5 landscape;
|
|
margin: 0.2in 0.2in 0.2in 0.2in;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<script type="text/javascript">
|
|
var tambah = false;
|
|
var tinggi = 0;
|
|
var tIdentitas = 0;
|
|
// var serial = [];
|
|
function getIdentitas(id) {
|
|
tIdentitas = $("#identitas" + id).height();
|
|
if (tIdentitas > 69) {
|
|
tIdentitas = tIdentitas - 69;
|
|
} else {
|
|
tIdentitas = 0;
|
|
}
|
|
|
|
}
|
|
|
|
function tes(tot, posisi, sn, qty, namaBarang, idTabel, idTBody) {
|
|
var tblId = document.getElementById(idTBody);
|
|
var bodySJ = document.getElementById('ivc');
|
|
var barisT = document.getElementById('baristambahan' + idTabel);
|
|
var barisT2 = document.getElementById('baristambahan2' + idTabel);
|
|
var barisT3 = document.getElementById('baristambahan3' + idTabel);
|
|
|
|
if (tot <= posisi && tblId.offsetHeight < (365 - tIdentitas)) { //LEMBAR 1
|
|
// var pjgtambah = 365 - tIdentitas - tblId.offsetHeight;
|
|
var pjgtambah = 320 - tIdentitas - tblId.offsetHeight;
|
|
{
|
|
$("#" + idTabel).append(`<tr id="baristambahan` + idTabel + `" style="height: ` + pjgtambah + `px;">
|
|
<td class="center fz10-td" style="border-right:2px solid #ddd; border-left:2px solid #ddd; border-top: none; border-bottom:2px solid #ddd; padding: 0px; vertical-align: middle; "> </td>
|
|
<td class="center fz10-td" style="border-right:2px solid #ddd; border-top: none; border-bottom:2px solid #ddd; padding: 0px; vertical-align: middle;"></td>
|
|
<td class="fz10-td" style="border-right:2px solid #ddd; border-top: none; border-bottom:2px solid #ddd; padding: 0px; vertical-align: middle;"></td>
|
|
<td class="fz10-td" style="border-right:2px solid #ddd; border-top: none; border-bottom:2px solid #ddd; padding: 0px; vertical-align: middle;">
|
|
</td>
|
|
</tr>`);
|
|
|
|
}
|
|
tinggi = tblId.offsetHeight;
|
|
}
|
|
return tambah;
|
|
}
|
|
|
|
function getSN(serialNumber) {
|
|
var hasil = '';
|
|
for (let i = 0; i < serialNumber.length; i++) {
|
|
hasil += serialNumber[0]
|
|
if (i != (serialNumber.length - 1)) {
|
|
hasil += ', '
|
|
}
|
|
|
|
}
|
|
|
|
return hasil;
|
|
}
|
|
</script>
|
|
|
|
<body style="width: 22cm; height:12.8cm">
|
|
|
|
<?php if (is_array($cetak) || is_object($cetak)) { ?>
|
|
<div id="ivc" class="invoice " style="padding-bottom: 0px; ">
|
|
<header class="clearfix">
|
|
<div class="row" style="margin-top: -10px;">
|
|
<div class="col-sm-6 mt-md">
|
|
<h4 class="mt-none mb-sm text-dark " style="margin-bottom: 5px;"><b>MUTASI BARANG</b></h4>
|
|
<h5 class="m-none text-dark text-bold" style="margin-bottom: 0px; margin-top: 5px;">#<?= $cetak[0]['KODE_BUKTI'] ?></h5>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="bill-info">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="bill-data text-right " style="margin-top:-23px; padding-bottom: 5px;">
|
|
<p class="mb-none" style="margin-bottom: 0px;">
|
|
<span class="text-dark f15">Tanggal : </span>
|
|
<span class="value f15">
|
|
<?= $tgl ?>
|
|
</span>
|
|
</p>
|
|
<p class="mb-none" style="margin-bottom: 0px;">
|
|
<span class="text-dark f15">Transaksi : </span>
|
|
<span class="value f15">
|
|
<?= $transaksi ?>
|
|
</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="" id="dtb">
|
|
<table class="table " id="tbsj" style=" margin-bottom: 15px;">
|
|
<thead>
|
|
<tr class=" text-dark">
|
|
<th id="cell-no" style="width: 15px;border:2px solid #ddd; border-right:2px solid #ddd; border-left:2px solid #ddd; font-size: 12px; padding: 2px; " class="text-bold center">NO</th>
|
|
<th id="" class="text-bold center" style="border:2px solid #ddd; border-right:2px solid #ddd; font-size: 12px; width:40px; padding: 2px;">QTY</th>
|
|
<th id="" class="text-bold center" style="border:2px solid #ddd; border-right:2px solid #ddd; font-size: 12px; width: 160px; padding: 2px;">NAMA BARANG</th>
|
|
<th id="cell-item" class="text-bold center" style="border:2px solid #ddd; border-right:2px solid #ddd; font-size: 12px; width:250px; padding: 2px;">KETERANGAN</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="tbbd" class="water">
|
|
<?php
|
|
echo '<script type="text/javascript">
|
|
getIdentitas("satu")
|
|
</script>';
|
|
for ($no = 0; $no < sizeof($barang); $no++) {
|
|
echo '<script type="text/javascript">
|
|
var serial = [];
|
|
</script>';
|
|
for ($i = 0; $i < sizeof($barang[$no]['SN']); $i++) {
|
|
echo '<script type="text/javascript">
|
|
serial.push("' . $barang[$no]['SN'][$i]['NAMA_SNMB'] . '");
|
|
</script>';
|
|
}
|
|
?>
|
|
<tr>
|
|
<td class="center fz12-td" style="border-right:2px solid #ddd; border-left:2px solid #ddd; border-bottom: none; border-top: none; padding: 2px; vertical-align: middle;"><?= $no + 1; ?></td>
|
|
<td class="center fz12-td" style="border-right:2px solid #ddd; border-bottom: none; border-top: none; padding: 2px; vertical-align: middle;"><?= $barang[$no]['QTY_DMB']; ?></td>
|
|
<td class="fz12-td" style="border-right:2px solid #ddd; border-bottom: none; border-top: none; padding: 2px; vertical-align: middle;"><?= $barang[$no]['NAMA_BARANG']; ?></td>
|
|
<td class="fz12-td" style="border-right:2px solid #ddd; border-bottom: none; border-top: none; padding: 2px; vertical-align: middle;;">
|
|
<p class="f12" style="margin: 0px;">
|
|
<?php if (is_array($barang[$no]['SN']) || is_object($barang[$no]['SN'])) {
|
|
for ($i = 0; $i < sizeof($barang[$no]['SN']); $i++) {
|
|
echo $barang[$no]['SN'][$i]['NAMA_SNMB'];
|
|
?>,
|
|
<?php }
|
|
|
|
} ?>
|
|
</p>
|
|
</td>
|
|
|
|
</tr>
|
|
<?php
|
|
$pos = $no + 1;
|
|
|
|
echo '<script type="text/javascript">
|
|
|
|
tes(' . count($barang) . ', ' . $pos . ', serial, ' . $barang[$no]['QTY_DMB'] . ', "' . $barang[$no]['NAMA_BARANG'] . '", "tbsj", "tbbd")
|
|
</script>';
|
|
}
|
|
?>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="">
|
|
<div class="row">
|
|
<div class="col-md-12" style="margin-top: -10px;">
|
|
<p class=" f12">
|
|
|
|
Penerima
|
|
|
|
Hormat Kami
|
|
|
|
</p>
|
|
<br>
|
|
<br>
|
|
<p class="f11">
|
|
(....................................................)
|
|
|
|
(....................................................)
|
|
<div class="col-sm-2 " style="border:1px solid black; padding:5px; width:200px; margin-top:-60px; margin-left:550px;">
|
|
<p class="f12 center" style="margin:0px;"><b>Barang yang diterima harap diperiksa terlebih dahulu</b></P>
|
|
</div>
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
window.print();
|
|
</script>
|
|
<?php } ?>
|
|
|
|
</body>
|
|
|
|
</html>
|