Enable feature forecast gadaian for user id 4 only
This commit is contained in:
@@ -1302,13 +1302,13 @@ class ReportController extends Controller
|
||||
|
||||
if ($request->search_type == "custom-search") {
|
||||
$raw_queries = "(jbg = " . $request->jbg . " or jbg = " . ($request->jbg + 0.5) . ") ";
|
||||
if ($request->pinjaman == 1000.00) {
|
||||
$raw_queries = $raw_queries . "and pinjaman <= " . $request->pinjaman;
|
||||
} else if ($request->pinjaman == 10000.01) {
|
||||
$raw_queries = $raw_queries . "and pinjaman >= " . $request->pinjaman;
|
||||
} else {
|
||||
$raw_queries = $raw_queries . "and pinjaman between " . $request->pinjaman . " and " . ($request->pinjaman + 1000 - 0.01);
|
||||
}
|
||||
// if ($request->pinjaman == 1000.00) {
|
||||
// $raw_queries = $raw_queries . "and pinjaman <= " . $request->pinjaman;
|
||||
// } else if ($request->pinjaman == 10000.01) {
|
||||
// $raw_queries = $raw_queries . "and pinjaman >= " . $request->pinjaman;
|
||||
// } else {
|
||||
// $raw_queries = $raw_queries . "and pinjaman between " . $request->pinjaman . " and " . ($request->pinjaman + 1000 - 0.01);
|
||||
// }
|
||||
} else if ($request->search_type == "nokp-search") {
|
||||
$raw_queries = "nokp = '" . $request->nokp . "'";
|
||||
} else if ($request->search_type == "norujukan-search") {
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
@section('content')
|
||||
<style>
|
||||
.search-card {
|
||||
overflow-x: auto;
|
||||
border: 1px solid #dee2e6;
|
||||
;
|
||||
padding: 10px;
|
||||
border-top: none;
|
||||
}
|
||||
@@ -78,7 +76,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="form-group row" hidden>
|
||||
<label class="col-4 col-form-label">Pembiayaan</label>
|
||||
<div class="col-4">
|
||||
<select class="custom-select" id="pinjaman">
|
||||
@@ -120,29 +118,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group row">
|
||||
<label class="col-4 col-form-label">Baki Lelong</label>
|
||||
<div class="col col-form-label">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="pilihan_baki_lelong" id="pilihan_baki_lelong" value="semua" checked>
|
||||
<label class="form-check-label" for="exampleRadios1">
|
||||
Semua
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="pilihan_baki_lelong" id="pilihan_baki_lelong" value="positif">
|
||||
<label class="form-check-label" for="exampleRadios2">
|
||||
Baki Lelong
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="pilihan_baki_lelong" id="pilihan_baki_lelong" value="negatif">
|
||||
<label class="form-check-label" for="exampleRadios3">
|
||||
Rugi Lelong
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group row">
|
||||
<label class="col-4 col-form-label">Baki Lelong</label>
|
||||
<div class="col-4">
|
||||
@@ -283,7 +258,6 @@
|
||||
<div class="col">
|
||||
<div class="alert alert-primary">
|
||||
Harga emas lelongan dalam analisa gadaian ini adalah berdasarkan data <strong style="text-decoration: underline;">terkini</strong> yang dikemaskini oleh operasi.
|
||||
<!-- <span><br>Kemaskini pada: {{ $lel_karat_all[0]->updated_at }}</span> -->
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-5 col-form-label">Batch Lelong</label>
|
||||
@@ -317,8 +291,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div>
|
||||
<div class="col-lg-6 col-md-12"> -->
|
||||
<table class="table text-center table-bordered table-sm">
|
||||
<thead class="bg-info">
|
||||
<tr>
|
||||
@@ -386,23 +358,12 @@
|
||||
"pageLength": 10000
|
||||
});
|
||||
var marhunTable = $('#marhun-table').DataTable({
|
||||
// "pageLength": 10000
|
||||
paging: false,
|
||||
ordering: false,
|
||||
info: false,
|
||||
searching: false,
|
||||
});
|
||||
|
||||
// $(document).ready(function() {
|
||||
// var table = $('#main-table').DataTable({
|
||||
// ajax: 'data/arrays.txt',
|
||||
// columnDefs: [{
|
||||
// targets: -1,
|
||||
// data: null,
|
||||
// defaultContent: '<button>Click!</button>',
|
||||
// }, ],
|
||||
// });
|
||||
|
||||
$('#main-table tbody').on('click', '.click-norujukan', function() {
|
||||
marhunTable.clear().draw();
|
||||
var data = mainTable.row($(this).parents('tr')).data()[13];
|
||||
@@ -412,8 +373,8 @@
|
||||
$('#textTelefon').val(data.customer_detail.telefon);
|
||||
$('#textAlamat1').val(data.customer_detail.alamat1);
|
||||
$('#textNorujukan').val(data.norujukan);
|
||||
$('#textPembiayaanAsal').val(data.pinjaman);
|
||||
$('#textBakiPembiayaan').val(data.bakipjm);
|
||||
$('#textPembiayaanAsal').val(formatter.format(data.pinjaman));
|
||||
$('#textBakiPembiayaan').val(formatter.format(data.bakipjm));
|
||||
$('#textBerat').val(data.berat);
|
||||
console.log(data.gadai_marhun);
|
||||
var marhunIteration = 1;
|
||||
@@ -432,14 +393,11 @@
|
||||
|
||||
};
|
||||
});
|
||||
// });
|
||||
|
||||
$("#form-id").submit(function(e) {
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function clearInput() {
|
||||
document.getElementById('jbg').value = '5';
|
||||
document.getElementById('pinjaman').value = '1000.00';
|
||||
|
||||
@@ -282,6 +282,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@if(Auth::user()->id == 4)
|
||||
<li class="{{ (request()->is('report/forecastgadaian') || request()->is('report/forecastgadaian/*')) ? 'active' : '' }}">
|
||||
<a href="{{url('report/forecastgadaian')}}">
|
||||
<div class="sidebar-menu-main-title">
|
||||
@@ -292,6 +293,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
<li class="{{ (request()->is('report/')) ? 'active' : '' }}">
|
||||
<a href="#reportSubmenu" data-toggle="collapse" aria-expanded="false">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user