|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /home/matalashes/.trash/app.bak.15/Views/admin/pages/custom/report/reportwaste/ |
Upload File : |
<head>
<style>
@page {
margin-left: 1cm;
margin-top: 1cm;
margin-right: 1cm;
margin-bottom: 1cm;
}
body {
line-height: 1em;
}
.center {
text-align: center;
}
.table {
font-size: 12px;
}
.table-border, .table-border th, .table-border tr, .table-border td {
border: 1px solid black;
border-collapse: collapse;
padding: 2px;
font-size: 10px;
}
.table-border thead {
text-align: center;
font-weight: bold;
}
.invoice-table {
width: 100%;
border-collapse: collapse;
}
.invoice-table th, .invoice-table td {
padding: 5px;
border: 1px solid black;
text-align: center;
font-size: 12px;
}
table .total {
text-align: right;
background: #074c9c;
color: #FFFFFF;
}
.invoice-table th {
background-color: #f2f2f2;
}
.invoice-head {
border-bottom: 2px solid #000000;
margin-bottom: 30px;
}
.client {
padding-left: 6px;
border-left: 3px solid #0087C3;
float: left;
}
</style>
</head>
<body>
<div class="row">
<table class="invoice-doc" style="width: 100%;">
<tbody>
<tr>
<td align="left"><h4 style="margin-bottom:20px;">Laporan Waste/Scrap</h4></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<table class="invoice-table">
<thead>
<tr class="text-center text-muted fw-bolder fs-7 text-capitalize gs-0">
<th rowspan="2">No</th>
<th colspan="2">BC 2.4</th>
<th rowspan="2">Kode Barang</th>
<th rowspan="2">Nama Barang</th>
<th rowspan="2">Satuan</th>
<th rowspan="2">Jumlah</th>
<th rowspan="2">Mata Uang</th>
<th rowspan="2">Nilai</th>
<th rowspan="2">Alasan</th>
</tr>
<tr class="text-center text-muted">
<th>Nomor</th>
<th>Tanggal</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
foreach ($_data as $d) {
$json = json_decode($d->pb_ic_item);
$sum = 0;
?>
<?php
foreach($json as $j){
$o = $j->item;
$q = $j->qty;
$a = $j->alasan;
// $n = $j->nilai;
// $nd = $j->no_dok;
// $td = $j->tgl_dok;
$barang = new \App\Models\MasterBarang();
$_barang = $barang->find($o);
$mb_kode = '';
$mb_name = '';
$mb_satuan = '';
if(isset($_barang)){
$mb_kode = $_barang->mb_kode;
$mb_name = $_barang->mb_name;
$mb_satuan = $_barang->mb_satuan;
}
?>
<tr>
<td><?= $i ?></td>
<td><?= $d->pb_bc24_no ?></td>
<td>
<?php if($d->pb_bc24_tgl == '0000-00-00' || $d->pb_bc24_tgl == '') { ?>
-
<?php } else { ?>
<?= date("d/m/Y", strtotime($d->pb_bc24_tgl ?? '')) ?>
<?php } ?>
</td>
<td><?= $_barang->mb_kode ?></td>
<td style="white-space: nowrap;"><?= $_barang->mb_name ?></td>
<td><?= $_barang->mb_satuan ?></td>
<td><?= number_format($q,0,",",".") ?></td>
<td>Rupiah</td>
<td align="right"><?= 'Rp '.number_format($d->pb_nilai_barang,0,",",".") ?></td>
<td><?= $a ?></td>
</tr>
<?php
$i++;
}
?>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</body>