232 lines
8.7 KiB
PHP
232 lines
8.7 KiB
PHP
<!doctype html>
|
|
<html class="fixed sidebar-left-collapsed">
|
|
|
|
<head>
|
|
|
|
<!-- Basic -->
|
|
<meta charset="UTF-8">
|
|
|
|
<title>KEUANGAN</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 DP Penjualan</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-success">
|
|
<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:Olive">DP PENJUALAN | <u style="color:DarkRed"><?=$countDak?></u> DATA</b> <?php if ($hak<=1) {?> | <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 class="default">Pelanggan</th>
|
|
<th class="text-right default">Akumulasi</th>
|
|
<th class="center default">Lihat Data</th>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
if (is_array($dak) || is_object($dak)) {
|
|
$no = 1;
|
|
foreach ($dak as $key) { ?>
|
|
<tr>
|
|
<td class="center"><?= $no; ?></td>
|
|
<?php if ($key['TYPE_PELANGGAN']=="0") { ?>
|
|
<td><b class="text-primary">Corporate</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><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><br><?= $key['NAMA_PELANGGAN'] ?><br><i>(<?= $key['NAMA_KOTA'] ?>)</i></td>
|
|
<?php } ?>
|
|
<td class="text-right"><b style="color:Tomato"><?= $key['TOTALSISA']; ?></b></td>
|
|
<td class="actions center">
|
|
<span data-toggle="modal" data-target="#modalLihatDak"><button type="button" onclick="tampilkanDataDak('<?=$key['PELANGGAN_ID']?>')" class="btn btn-xs btn-primary" title="" data-toggle="tooltip" data-trigger="hover" data-original-title="Tombol untuk Lihat Data"><i class="fa fa-reorder"></i></button></span>
|
|
</td>
|
|
</tr>
|
|
<?php $no++;
|
|
}
|
|
} ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
<!-- end: page -->
|
|
</section>
|
|
</div>
|
|
</section>
|
|
|
|
<div id="modalLihatDak" class="modal fade ui-front" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog modal-lg" style="width:85%">
|
|
<header class="panel-heading">
|
|
<h2 class="panel-title"><b>Lihat Data | [<b id="namaPel" style="color:FireBrick"></b>]</b></h2>
|
|
<div class="panel-actions">
|
|
<a class="text-dark" data-dismiss="modal"><b>Tutup </b><i class="fa fa-times"></i></a>
|
|
</div>
|
|
</header>
|
|
<div class="panel-body">
|
|
<div class="modal-wrapper">
|
|
<div class="modal-text">
|
|
<div class="row form-bordered">
|
|
<div class="form-group">
|
|
<div class="col-md-12">
|
|
<table class="table table-bordered table-striped mb-none">
|
|
<thead>
|
|
<th class="center default">No</th>
|
|
<th class="default">Kode</th>
|
|
<th class="text-right default">Nilai DP</th>
|
|
<th class="text-right default">Terbayar</th>
|
|
<th class="text-right default">Subtotal</th>
|
|
<th class="center default">Rincian</th>
|
|
</thead>
|
|
<tbody id="isiTabelDak"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</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>
|
|
$('#table1').dataTable( {
|
|
"paging": false
|
|
} );
|
|
|
|
function tutupTab() {
|
|
window.close();
|
|
}
|
|
|
|
function tampilkanDataDak(id) {
|
|
$.ajax({
|
|
type: 'POST',
|
|
data: {
|
|
id_pelanggan : id,
|
|
},
|
|
url: '<?= base_url('') ?>index.php/Menu/GE_AmbilData_DataDakDpPenjualan',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
JUMLAH = response.total;
|
|
var baris = '';
|
|
|
|
for (var i = 1; i <= JUMLAH; i++) {
|
|
var kode = response.data[i - 1]['KODE_AKUNTANSI'];
|
|
var tanggal = response.data[i - 1]['TANGGAL'];
|
|
var nilai = response.data[i - 1]['KREDIT'];
|
|
var terbayar = response.data[i - 1]['DEBET'];
|
|
var subtotal = response.data[i - 1]['SISA'];
|
|
var um_id = response.data[i - 1]['UM_ID'];
|
|
|
|
baris += '<tr>';
|
|
baris += '<td class="center" style="vertical-align: middle;" >' + i + '</td>';
|
|
baris += '<td class="text-left" style="vertical-align: middle;"><b style="color:DarkViolet">' + kode + '</b><br>(' + tanggal + ')</td>';
|
|
baris += '<td class="text-right" style="vertical-align: middle;"><b style="color:Blue">' + nilai + '</b></td>';
|
|
baris += '<td class="text-right" style="vertical-align: middle;"><b style="color:SaddleBrown">' + terbayar + '</b></td>';
|
|
baris += '<td class="text-right" style="vertical-align: middle;"><b style="color:Tomato">' + subtotal + '</b></td>';
|
|
baris += '<td class="action center" style="vertical-align: middle;"><button type="button" class="btn btn-xs btn-success" onclick="openTab(' + um_id + ')"><i class="fa fa-external-link"></i></button></td>';
|
|
baris += '</tr>';
|
|
}
|
|
$('#isiTabelDak').html(baris);
|
|
$('#namaPel').html(response.nama_pelanggan);
|
|
}
|
|
});
|
|
}
|
|
|
|
function openTab(id) {
|
|
window.open('IN_Keuangan_DpPenjualan_2/'+id, '_blank');
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|