copy dari repo om Irfan
This commit is contained in:
@@ -0,0 +1,295 @@
|
||||
<!doctype html>
|
||||
<html class="fixed sidebar-left-collapsed">
|
||||
|
||||
<head>
|
||||
|
||||
<!-- Basic -->
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>PROSES | PENJUALAN</title>
|
||||
<meta name="keywords" content="HTML5 Admin Template" />
|
||||
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
|
||||
<meta name="author" content="okler.net">
|
||||
<link rel="icon" type="image/png" href="<?php echo base_url('')?>assets/images/logoPcmBaru3.png" />
|
||||
|
||||
<!-- 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" />
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<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><strong>(Step 1)</strong> | Data SO | <strong style="color:Yellow"><?=$countSo?> SO Proses Gudang</strong></h2>
|
||||
|
||||
<div class="right-wrapper pull-right">
|
||||
<ol class="breadcrumbs">
|
||||
<li><span><strong style="color:Orange">Master Data </span></strong></li>
|
||||
</ol>
|
||||
|
||||
<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- start: page -->
|
||||
<?php $jabatan = $this->session->userdata('jabatan'); $nama_panggilan = $this->session->userdata('nama_panggilan'); $id_karyawan = $this->session->userdata('id_karyawan'); ?>
|
||||
<section class="panel panel-featured panel-featured-quartenary">
|
||||
<header class="panel-heading">
|
||||
<div class="panel-actions">
|
||||
<a href="<?php echo base_url('') ?>index.php" class="text-dark"><strong>Kembali</strong><i class="fa fa-backward"></i></a>
|
||||
</div>
|
||||
<h2 class="panel-title"><strong>DATA SALES ORDER</strong><br><i style="color:DarkOrchid">Note : [Auto Refresh setiap ada Perubahan Data.]</i></h2>
|
||||
</header>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-bordered table-striped mb-none" id="datatable-default">
|
||||
<thead>
|
||||
|
||||
<th class="center dark">No</th>
|
||||
<th width="200px" class="dark">Kode</th>
|
||||
<th class="dark">Pelanggan</th>
|
||||
<th width="400px" class="dark">Ketersediaan Barang</th>
|
||||
<?php if (strpos($jabatan,"GUDANG")!==FALSE OR $jabatan=="ADMINISTRATOR" OR $jabatan=="ADMIN ITP" OR $jabatan=="SUPPORT") { ?>
|
||||
<th class="center dark">Proses SO</th>
|
||||
<?php } ?>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (is_array($penjualan) || is_object($penjualan)) {
|
||||
$no = 1;
|
||||
foreach ($penjualan as $key) { ?>
|
||||
<tr>
|
||||
<?php
|
||||
$diffawal = new DateTime($key['TGL_SO']);
|
||||
$diffakhir = new DateTime($tgl);
|
||||
$diff = date_diff($diffawal, $diffakhir);
|
||||
$diff = $diff->format("%a");
|
||||
|
||||
if ($key['TGL_SO']==$key['TGL_CREATE']) {
|
||||
$tglshow = $key['TANGGAL'];
|
||||
} else {
|
||||
$tglshow = $key['TGL_CREATE'];
|
||||
}
|
||||
|
||||
if ($key['NAMA_PANGGILAN_KARYAWAN']==$nama_panggilan) {
|
||||
$owner = 1;
|
||||
} else if ($id_karyawan==9 OR $id_karyawan==43) {
|
||||
if ($key['SALES_ID']==50 OR $key['SALES_ID']==51) {
|
||||
$owner = 1;
|
||||
} else {
|
||||
$owner = 0;
|
||||
}
|
||||
} else {
|
||||
$owner = 0;
|
||||
}
|
||||
|
||||
if ($key['STATUS_SO']==6) {
|
||||
$ketrev = "*Belum Selesai Revisi*";
|
||||
} else if ($key['STATUS_SO']==7) {
|
||||
$ketrev = "*Di Revisi Sales*";
|
||||
} else {
|
||||
$ketrev = "";
|
||||
}
|
||||
$ketso = $key['KET_SO_A'];
|
||||
|
||||
?>
|
||||
<td class="center"><?= $no; ?></td>
|
||||
<?php if ($key['CORP_ID']=="1") { ?>
|
||||
<td><b style="color:DarkViolet"><?= $key['KODE_SO']; ?></b> <b style="color:Blue">[TMP]</b><br><i>(<?= $tglshow; ?>)</i><br><b style="color:Chocolate">Progres SO : <?=$diff?> Hari</b></td>
|
||||
<?php } else if ($key['CORP_ID']=="2") { ?>
|
||||
<td><b style="color:DarkViolet"><?= $key['KODE_SO']; ?></b> <b style="color:HotPink">[DMT]</b><br><i>(<?= $tglshow; ?>)</i><br><b style="color:Chocolate">Progres SO : <?=$diff?> Hari</b></td>
|
||||
<?php } else if ($key['CORP_ID']=="3") { ?>
|
||||
<td><b style="color:DarkViolet"><?= $key['KODE_SO']; ?></b> <b style="color:Red">[PCM]</b><br><i>(<?= $tglshow; ?>)</i><br><b style="color:Chocolate">Progres SO : <?=$diff?> Hari</b></td>
|
||||
<?php } else if ($key['CORP_ID']=="4") { ?>
|
||||
<td><b style="color:DarkViolet"><?= $key['KODE_SO']; ?></b> <b style="color:DarkGreen">[SFTR]</b><br><i>(<?= $tglshow; ?>)</i><br><b style="color:Chocolate">Progres SO : <?=$diff?> Hari</b></td>
|
||||
<?php } else if ($key['CORP_ID']=="5") { ?>
|
||||
<td><b style="color:DarkViolet"><?= $key['KODE_SO']; ?></b> <b style="color:Teal">[ITP]</b><br><i>(<?= $tglshow; ?>)</i><br><b style="color:Chocolate">Progres SO : <?=$diff?> Hari</b></td>
|
||||
<?php } ?>
|
||||
<?php if ($key['TYPE_PELANGGAN']=="0") { ?>
|
||||
<td><strong class="text-primary">Corporate</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><?php if ($owner==1) { ?> <b style="color:Red"><i class="fa fa-check"></i></b><?php } ?><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
||||
<?php } else if ($key['TYPE_PELANGGAN']=="1") { ?>
|
||||
<td><strong class="text-success">Dealer</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><?php if ($owner==1) { ?> <b style="color:Red"><i class="fa fa-check"></i></b><?php } ?><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
||||
<?php } else if ($key['TYPE_PELANGGAN']=="2") { ?>
|
||||
<td><strong class="text-warning">User</strong> : <b style="color:FireBrick">[<?= $key['NAMA_PANGGILAN_KARYAWAN']; ?>]</b><?php if ($owner==1) { ?> <b style="color:Red"><i class="fa fa-check"></i></b><?php } ?><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<?php foreach ($key['DATDO'] as $dat) { ?>
|
||||
<?php if ($dat['STAT']==0) { ?>
|
||||
<strong style="color:Red"><i class="fa fa-ban"></i> <?= $dat['QTY_DO']; ?> <?= $dat['KODE_BARANG']; ?></strong><br>
|
||||
<?php } else if ($dat['STAT']==1) { ?>
|
||||
<strong style="color:Navy"><i class="fa fa-check"></i> <?= $dat['QTY_DO']; ?> <?= $dat['KODE_BARANG']; ?></strong><br>
|
||||
<?php } else if ($dat['STAT']==2) { ?>
|
||||
<strong style="color:Violet"><i class="fa fa-exclamation"></i> <?= $dat['QTY_DO']; ?> <?= $dat['KODE_BARANG']; ?></strong><br>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if ($ketrev!="") { ?><u><i style="color:DarkGreen"><?=$ketrev?></i></u><br><b style="color:Coral">[<?= $ketso; ?>]</b><?php } ?>
|
||||
</td>
|
||||
<?php if (strpos($jabatan,"GUDANG")!==FALSE OR $jabatan=="ADMINISTRATOR" OR $jabatan=="ADMIN ITP" OR $jabatan=="SUPPORT") { ?>
|
||||
<?php if ($key['STATUS_SO']=="0" OR $key['STATUS_SO']=="7") { ?>
|
||||
<td class="actions center">
|
||||
<?php if ($jabatan!="ADMINISTRATOR") { ?>
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="window.location.href='<?= base_url('index.php/ManagePenjualan/dataOrder_Gudang_A2_Proses/');
|
||||
echo $key['ID_SO'];?>'"><i class="fa fa-arrow-right"></i></button>
|
||||
<?php } else { ?>
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="window.location.href='<?= base_url('index.php/Menu/PJ_Sub1_ProsesGudang_2/');
|
||||
echo $key['ID_SO'];?>'"><i class="fa fa-arrow-right"></i></button>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } else if ($key['STATUS_SO']=="4") { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-warning" onclick="window.location.href='<?= base_url('index.php/ManagePenjualan/dataOrder_Gudang_A2_Buka/');
|
||||
echo $key['ID_SO'];?>'"><i class="fa fa-search"></i></button>
|
||||
</td>
|
||||
<?php } else if ($key['STATUS_SO']=="6") { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-default"><i class="fa fa-times"></i></button>
|
||||
</td>
|
||||
<?php } else if ($key['STATUS_SO']=="8") { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-success" onclick="window.location.href='<?= base_url('index.php/ManagePenjualan/dataOrder_Gudang_A2_Parsial/');
|
||||
echo $key['ID_SO'];?>'"><i class="fa fa-plus"></i></button>
|
||||
</td>
|
||||
<?php } else if ($key['STATUS_SO']=="9") { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-success" onclick="window.location.href='<?= base_url('index.php/ManagePenjualan/dataOrder_Gudang_A2_Konsinyasi/');
|
||||
echo $key['ID_SO'];?>'"><i class="fa fa-plus"></i></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php $no++;
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: page -->
|
||||
</section>
|
||||
|
||||
<!-- Modal Login Mode Admin-->
|
||||
<div id="modal-login" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<?= form_open('ManagePenjualan/loginadmin_Penjualan_GA1', array('id' => 'formpenjualan'), array('method' => 'loginadmin_Penjualan_GA1')); ?>
|
||||
<div class="modal-content">
|
||||
<header class="panel-heading">
|
||||
<h2 class="panel-title"><strong>Halaman Login </strong><b class="text-danger">[Warna Merah harus diisi]</b></h2>
|
||||
</header>
|
||||
<div class="modal-body ">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong class="text-danger">Username</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="text" name="username" id="USERNAME" class="form-control" autocomplete="off" placeholder="Username" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong class="text-danger">Password</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="password" name="password" id="PASSWORD" class="form-control" autocomplete="off" placeholder="Password">
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer class="panel-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
|
||||
<button type="submit" name="SubmitButton" id="SubmitButton" class="btn btn-primary"><strong>Login</strong> <i class="fa fa-sign-in"></i></a></button>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<?= form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?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>
|
||||
$('#datatable-default').dataTable( {
|
||||
"paging": false
|
||||
} );
|
||||
|
||||
$(document).ready(function() {
|
||||
setInterval(function() {
|
||||
$.ajax({
|
||||
url: "<?= base_url() ?>index.php/Menu/hitung_countView_PJ_AA",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: 'countOldSo=' + <?= $countSo ?> + '&countOldBeli=' + <?= $countBeli ?>,
|
||||
success: function(response) {
|
||||
if (response.value==1) {
|
||||
notify("autorefresh_newitem");
|
||||
delayReload(5000,"<?= base_url() ?>index.php/ManagePenjualan/dataOrder_Gudang_A1");
|
||||
} else if (response.value==2) {
|
||||
notify("autorefresh_minusitem");
|
||||
delayReload(5000,"<?= base_url() ?>index.php/ManagePenjualan/dataOrder_Gudang_A1");
|
||||
}
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}, 15000);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user