copy dari repo om Irfan
This commit is contained in:
@@ -0,0 +1,425 @@
|
||||
<!doctype html>
|
||||
<html class="fixed sidebar-left-collapsed">
|
||||
|
||||
<head>
|
||||
|
||||
<!-- Basic -->
|
||||
<meta charset="UTF-8" http-equiv="refresh" content="600">
|
||||
|
||||
<title>PROSES | PEMBELIAN</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" />
|
||||
|
||||
<!-- 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>Batal Beli</h2>
|
||||
|
||||
<div class="right-wrapper pull-right">
|
||||
<ol class="breadcrumbs">
|
||||
<li>
|
||||
<a href="<?php echo base_url() ?>index.php/MenuBeli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li><span>Pembelian</span></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-tertiary">
|
||||
<header class="panel-heading">
|
||||
<div class="panel-actions">
|
||||
<a href="<?php echo base_url('') ?>index.php/MenuBeli"><strong>Kembali</strong><i class="fa fa-backward"></i></a>
|
||||
</div>
|
||||
|
||||
<h2 class="panel-title"><strong>DATA PEMBELIAN (KEUANGAN) <i class="fa fa-flag"></i></strong></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 class="dark">Kode</th>
|
||||
<th class="dark">Tanggal</th>
|
||||
<th class="dark">Atas Nama</th>
|
||||
<th class="dark">Supplier</th>
|
||||
<th class="dark">Nota Pembelian</th>
|
||||
<th class="dark">Jenis PPN</th>
|
||||
<th class="dark">Nilai Total</th>
|
||||
<th class="center dark">PILIHAN</th>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (is_array($pembelian) || is_object($pembelian)) {
|
||||
$no = 1;
|
||||
$kode_pembelian = NULL;
|
||||
foreach ($pembelian as $key) {
|
||||
if ($key['KODE_PEMBELIAN']!=$kode_pembelian) {
|
||||
$kode_pembelian = $key['KODE_PEMBELIAN'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="center"><?= $no; ?></td>
|
||||
<td><?= $key['KODE_PEMBELIAN']; ?></td>
|
||||
<td><?= $key['TGL_SJBELI']; ?></td>
|
||||
<?php if ($key['CORP_ID']=="1") { ?>
|
||||
<td class="text-primary"><strong>TMP</strong></td>
|
||||
<?php } else if ($key['CORP_ID']=="2") { ?>
|
||||
<td class="text-quartenary"><strong>DMT</strong></td>
|
||||
<?php } else if ($key['CORP_ID']=="3") { ?>
|
||||
<td class="text-danger"><strong>PCM</strong></td>
|
||||
<?php } ?>
|
||||
<td><?= $key['NAMA_SUPPLIER']; ?>, <?= $key['NAMA_KOTA']; ?></td>
|
||||
<td><?= $key['INV_PEMBELIAN']; ?></td>
|
||||
<?php if ($key['PPN_PEMBELIAN']!="0.00") { ?>
|
||||
<td>Include</td>
|
||||
<?php } else if ($key['PPN_PEMBELIAN']=="0.00") { ?>
|
||||
<td>Non-PPN</td>
|
||||
<?php } ?>
|
||||
<td><?= $key['TOTAL']; ?></td>
|
||||
<?php if ($key['ACC_KEUANGAN']===NULL AND $key['ACC_GUDANG']===NULL AND $key['STATUS_PEMBELIAN']==="1") { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-danger" data-toggle="modal" data-target="#modal-batal<?php echo $key['ID_PEMBELIAN'];?>"><i class="fa fa-times"></i></button>
|
||||
</td>
|
||||
<?php } else if ($key['ACC_KEUANGAN']===NULL AND $key['ACC_GUDANG']!=NULL AND $key['STATUS_PEMBELIAN']==="1") { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-warning" data-toggle="modal" data-target="#modal-batal<?php echo $key['ID_PEMBELIAN'];?>"><i class="fa fa-check"></i></button>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td class="actions center">
|
||||
<button type="button" class="btn btn-xs btn-default"><i class="fa fa-check"></i></button>
|
||||
</td>
|
||||
<?php } $no++; } ?>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: page -->
|
||||
</section>
|
||||
|
||||
<?php if (is_array($pembelian) || is_object($pembelian)) {
|
||||
foreach ($pembelian as $row) { ?>
|
||||
<!-- Modal Batal -->
|
||||
<div class="modal fade" id="modal-batal<?= $row['ID_PEMBELIAN'] ?>">
|
||||
<?= form_open('ManagePembelian/batalbeli_UA1', array('id' => 'formpembelian'), array('method' => 'batalbeli_UA1')); ?>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">Pembatalan Data</h4>
|
||||
</header>
|
||||
<div class="modal-body ">
|
||||
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="id_pembelian" class="form-control" value="<?= $row['ID_PEMBELIAN']; ?>">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Kode Pembelian</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="kode_pembelian" id="KODE_PEMBELIAN<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['KODE_PEMBELIAN'] ?>" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Tanggal</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
<input disabled type="text" name="tgl_sjbeli" id="TGL_SJBELI<?= $row['ID_PEMBELIAN'] ?>" class="form-control" data-plugin-datepicker value="<?= $row['TGL_SJBELI'] ?>">
|
||||
</div>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Atas Nama</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="nama_corp" id="NAMA_CORP<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['NAMA_CORP'] ?>" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Nama Supplier</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="nama_supplier" id="NAMA_SUPPLIER<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['NAMA_SUPPLIER'] ?>, <?= $row['NAMA_KOTA'] ?>" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Surat Jalan</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="sj_pembelian" id="SJ_PEMBELIAN<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['SJ_PEMBELIAN'] ?>" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Nota Pembelian</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="inv_pembelian" id="INV_PEMBELIAN<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['INV_PEMBELIAN'] ?>" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Nilai PPN</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="total" id="TOTAL<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['PPN_PEMBELIAN'] ?> %" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Nilai Nota</strong></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input disabled type="text" name="total" id="TOTAL<?= $row['ID_PEMBELIAN'] ?>" class="form-control" value="<?= $row['TOTAL'] ?>" required>
|
||||
<small class="help-block"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-3">
|
||||
<label><strong>Keterangan</strong> <span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<?php if ($row['KET_BATAL']==NULL) { ?>
|
||||
<textarea name="ket_batal" id="KET_BATAL" class="form-control" rows="6" col="6" required placeholder="Penyebab dibatalkan"></textarea>
|
||||
<?php } else if ($row['KET_BATAL']!=NULL) { ?>
|
||||
<textarea disabled name="ket_batal" id="KET_BATAL" class="form-control" rows="6" col="6" required placeholder="Penyebab dibatalkan"><?= $row['KET_BATAL'] ?></textarea>
|
||||
<?php } ?>
|
||||
<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-danger" onclick="DisableButton(this);"><strong>Batalkan</strong> <i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
<?= form_close(); ?>
|
||||
</div>
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/jquery/jquery.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/bootstrap/js/bootstrap.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/nanoscroller/nanoscroller.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/magnific-popup/magnific-popup.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
|
||||
|
||||
<!-- Specific Page Vendor -->
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/select2/select2.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/jquery-datatables/media/js/jquery.dataTables.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/jquery-datatables-bs3/assets/js/datatables.js"></script>
|
||||
<!-- Specific Page Vendor -->
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/pnotify/pnotify.custom.js"></script>
|
||||
|
||||
<!-- Theme Base, Components and Settings -->
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/theme.js"></script>
|
||||
|
||||
<!-- Theme Custom -->
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/theme.custom.js"></script>
|
||||
|
||||
<!-- Theme Initialization Files -->
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/theme.init.js"></script>
|
||||
|
||||
|
||||
<!-- Examples -->
|
||||
<!-- Examples -->
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.default.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.tabletools.js"></script>
|
||||
<!-- <script src="<?php echo base_url('') ?>assets/javascripts/tables/examples.datatables.editable.js"></script> -->
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/ui-elements/examples.notifications.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/vendor/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="<?php echo base_url('') ?>assets/javascripts/forms/examples.validation.js"></script>
|
||||
<!-- notif -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
<?php if ($this->session->flashdata('success')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Data berhasil <?= $this->session->flashdata('success'); ?>.',
|
||||
type: 'success',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('failed')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Data gagal <?= $this->session->flashdata('failed'); ?>, hubungi Administrator',
|
||||
type: 'error',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('latest')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Menu tidak valid, silahkan refresh Browser.',
|
||||
type: 'error',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('sn_used')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Ada data yang terpakai, pastikan data benar.',
|
||||
type: 'error',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('acc_gudang')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Pembatalan diproses. Menunggu konfirmasi Gudang.',
|
||||
type: 'warning',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('acc_keuangan')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Pembatalan diproses. Menunggu konfirmasi Keuangan.',
|
||||
type: 'warning',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('data_lock')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Data berhasil <?= $this->session->flashdata('data_lock'); ?>. Selesai Pembatalan.',
|
||||
type: 'warning',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('over_qty')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Data melebihi jumlah stock, hubungi Team Gudang.',
|
||||
type: 'error',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('data_used')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Data terpakai, pastikan data kosong sebelum dibatalkan.',
|
||||
type: 'error',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->flashdata('not_acc')) { ?>
|
||||
new PNotify({
|
||||
title: 'Notifikasi',
|
||||
text: 'Anda tidak berhak membatalkan data.',
|
||||
type: 'error',
|
||||
shadow: true
|
||||
});
|
||||
<?php } ?>
|
||||
});
|
||||
|
||||
function DisableButton(b) {
|
||||
b.disabled = true;
|
||||
b.value = 'Submitting';
|
||||
b.form.submit();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user