171 lines
6.3 KiB
PHP
171 lines
6.3 KiB
PHP
<!doctype html>
|
|
<html class="fixed sidebar-left-collapsed">
|
|
|
|
<head>
|
|
|
|
<!-- Basic -->
|
|
<meta charset="UTF-8">
|
|
|
|
<title>STOK BARANG</title>
|
|
<meta name="keywords" content="HTML5 Admin Template" />
|
|
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
|
|
<meta name="author" content="okler.net">
|
|
|
|
<!-- Mobile Metas -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
|
|
<!-- Vendor CSS -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap/css/bootstrap.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/font-awesome/css/font-awesome.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/magnific-popup/magnific-popup.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
|
|
|
|
<!-- Specific Page Vendor CSS -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/select2/select2.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/jquery-datatables-bs3/assets/css/datatables.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/pnotify/pnotify.custom.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/bootstrap-multiselect/bootstrap-multiselect.css" />
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/vendor/base/jquery-ui.css" />
|
|
|
|
<!-- Theme CSS -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/theme.css" />
|
|
|
|
<!-- Skin CSS -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/skins/default.css" />
|
|
|
|
<!-- Theme Custom CSS -->
|
|
<link rel="stylesheet" href="<?php echo base_url('') ?>assets/stylesheets/theme-custom.css">
|
|
|
|
<!-- Head Libs -->
|
|
<script src="<?php echo base_url('') ?>assets/vendor/modernizr/modernizr.js"></script>
|
|
|
|
</head>
|
|
<script src="<?= base_url() ?>assets/bower_components/jquery/jquery-3.3.1.min.js"></script>
|
|
<script src="<?= base_url() ?>assets/bower_components/sweetalert2/sweetalert2.all.min.js"></script>
|
|
|
|
<style>
|
|
.ui-front {
|
|
z-index: 9999;
|
|
}
|
|
|
|
.solid {
|
|
border-left-style: solid;
|
|
border-width: 5px;
|
|
border-color: darkcyan;
|
|
}
|
|
|
|
.f18 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
let base_url = '<?= base_url() ?>';
|
|
</script>
|
|
|
|
<body>
|
|
<section class="body">
|
|
|
|
<!-- start: header -->
|
|
<?php $this->load->view('template/header'); ?>
|
|
<!-- end: header -->
|
|
|
|
<div class="inner-wrapper">
|
|
<!-- start: sidebar -->
|
|
<?php $this->load->view('template/sidebar'); ?>
|
|
<!-- end: sidebar -->
|
|
|
|
<section role="main" class="content-body">
|
|
|
|
<header class="page-header">
|
|
<h2><b>Data Sewa Barang</b></h2>
|
|
|
|
<div class="right-wrapper pull-right">
|
|
<ol class="breadcrumbs">
|
|
<li><span><b style="color:Gold">Master Data </span></b></li>
|
|
</ol>
|
|
|
|
<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- start: page -->
|
|
<section class="panel panel-featured panel-featured-secondary">
|
|
<header class="panel-heading">
|
|
<div class="panel-actions">
|
|
<a onclick="tutupTab()"><b style="color:Black">Tutup <i class="fa fa-times"></i></b></a>
|
|
</div>
|
|
<h2 class="panel-title"><b style="color:Red">DATA SEWA | <u style="color:DarkRed"><?=$countSewa?></u> DATA</b> <?php if ($hak==0) {?> | <b style="color:Red"><i>Tidak Berhak*</i></b><?php } ?></h2>
|
|
</header>
|
|
<div class="panel-body">
|
|
<table class="table table-bordered table-striped mb-none" id="table1">
|
|
<thead>
|
|
<th class="center default">No</th>
|
|
<th width="160px" class="default">Kode</th>
|
|
<th class="default">Pelanggan</th>
|
|
<th width="320px" class="default">Barang</th>
|
|
<th width="200px" class="default">Gudang</th>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
if (is_array($sewa) || is_object($sewa)) {
|
|
$no = 1;
|
|
foreach ($sewa as $key) { ?>
|
|
<tr>
|
|
<?php
|
|
$tgl_now = date('Y-m-d');
|
|
$diffawal = new DateTime($key['TGL_SEWA']);
|
|
$diffakhir = new DateTime($tgl_now);
|
|
$diff = date_diff($diffawal, $diffakhir);
|
|
$diff = $diff->format("%a");
|
|
?>
|
|
<td class="center"><?= $no; ?></td>
|
|
<td class="default"><b style="color:DarkOrchid"><?= $key['KODE_SEWA']; ?></b><br>(<?= $key['TANGGAL']; ?>)<br><b style="color:Blue">Durasi : <?=$diff?> Hari</b></td>
|
|
<?php if ($key['TYPE_PELANGGAN']=="0") { ?>
|
|
<td><b class="text-primary">Corporate</b> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
|
<?php } else if ($key['TYPE_PELANGGAN']=="1") { ?>
|
|
<td><b class="text-success">Dealer</b> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
|
<?php } else if ($key['TYPE_PELANGGAN']=="2") { ?>
|
|
<td><b style="color:DarkOrange">User</b> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
|
<?php } ?>
|
|
<td>
|
|
<?php foreach ($key['BARANG'] as $dat) { $sisa = $dat['QTY_DFSW']-$dat['KEMBALI_DFSW']; ?>
|
|
<?php if ($sisa>0) { ?>
|
|
<b style="Color:Teal">[<?= $dat['QTY_DFSW']-$dat['KEMBALI_DFSW']; ?> EA <?= $dat['KODE_BARANG']; ?>]</b><?php if ($dat['SN']!=null) { ?><br><b><i style="color:Tomato"><?= $dat['SN']; ?></i></b><?php } ?><br>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</td>
|
|
<td><b style="color:DarkSlateGray"><?= $key['CIPTA_SEWA']; ?></b></td>
|
|
</tr>
|
|
<?php $no++;
|
|
}
|
|
} ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
<!-- end: page -->
|
|
</section>
|
|
</div>
|
|
</section>
|
|
|
|
<?php
|
|
$this->load->view('template/sidebar_right');
|
|
$this->load->view('template/script_vendor');
|
|
$this->load->view('template/script_flashdata');
|
|
$this->load->view('template/notification');
|
|
?>
|
|
|
|
<script>
|
|
$('#table1').dataTable( {
|
|
"paging": false
|
|
} );
|
|
|
|
function tutupTab() {
|
|
window.close();
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|