11 lines
3.1 KiB
PHP
11 lines
3.1 KiB
PHP
<!doctype html><html lang="id"><head><meta charset="utf-8"><title>Log Peralatan Teknisi</title><style>
|
|
@page{margin:24px 28px}body{font-family:DejaVu Sans,Arial,sans-serif;color:#172033;font-size:8px}.head{display:table;width:100%;border-bottom:2px solid #ef7d00;padding-bottom:10px}.head>div{display:table-cell;vertical-align:bottom}.right{text-align:right}.company{font-size:15px;font-weight:700}h1{font-size:17px;margin:14px 0 3px}.filter{color:#667085;margin-bottom:12px}table{width:100%;border-collapse:collapse}th{background:#f1f4f8;text-transform:uppercase;font-size:7px;color:#475467}th,td{border:1px solid #dfe5ed;padding:6px;vertical-align:top}tbody tr:nth-child(even){background:#fafbfc}.empty{text-align:center;padding:25px;color:#667085}.status{font-weight:700}.footer{margin-top:10px;color:#667085}
|
|
</style></head><body>
|
|
<div class="head"><div><div class="company"><?=html_escape($company?($company->name??$company->company_name??'Perusahaan'):'Perusahaan')?></div><div>Dokumen Persediaan</div></div><div class="right">Dicetak <?=date('d/m/Y H:i')?></div></div>
|
|
<?php $statusLabels=array('carried'=>'Dibawa','installed'=>'Dipasang','removed'=>'Dilepas','returned'=>'Dikembalikan');?>
|
|
<h1>Log Peralatan Teknisi</h1><div class="filter">Periode: <?=html_escape($filters['date_from']?:'Semua')?> s.d. <?=html_escape($filters['date_to']?:'Semua')?> · Customer: <?=$filters['customer_id']?'Sesuai filter':'Semua'?> · Teknisi: <?=$filters['technician_id']?'Sesuai filter':'Semua'?> · Status: <?=html_escape($statusLabels[$filters['status']??'']??'Semua')?> · Kondisi: <?=html_escape($filters['condition']?:'Semua')?> · Kepemilikan: <?=html_escape($filters['ownership']?:'Semua')?> · Barang: <?=html_escape($filters['query']?:'Semua')?></div>
|
|
<table><thead><tr><th>No</th><th>Dokumen</th><th>Teknisi</th><th>Barang</th><th>Barcode / Serial</th><th>Pemilik</th><th>Qty</th><th>Customer</th><th>Posisi</th><th>Status / Kondisi</th><th>Keterangan</th></tr></thead><tbody>
|
|
<?php foreach($rows as$index=>$row):?><tr><td><?=$index+1?></td><td><?=html_escape($row['document_no'])?><br><?=html_escape(date('d/m/Y',strtotime($row['document_date'])))?></td><td><?=html_escape($row['technician_name']?:'-')?></td><td><?=html_escape($row['display_name'])?></td><td><?=html_escape($row['barcode_snapshot'])?><br><?=html_escape($row['serial_number']?:'-')?></td><td><?=html_escape($row['ownership_type'])?></td><td><?=number_format((float)$row['qty'],abs((float)$row['qty']-round((float)$row['qty']))<.0001?0:4,',','.')?></td><td><?=html_escape($row['customer_name']?:'-')?></td><td><?=html_escape(($row['from_custodian_type']?:'-').' → '.($row['to_custodian_type']?:'-'))?></td><td class="status"><?=html_escape(($row['to_usage_status']?:'-').' / '.($row['to_condition_status']?:'-'))?></td><td><?=html_escape($row['document_notes']?:$row['notes']?:'-')?></td></tr><?php endforeach?>
|
|
<?php if(!$rows):?><tr><td colspan="11" class="empty">Tidak ada riwayat sesuai filter yang dipilih.</td></tr><?php endif?></tbody></table><div class="footer">Log ini merupakan riwayat operasional immutable; tidak mengubah nilai persediaan atau jurnal accounting.</div>
|
|
</body></html>
|