tukar position utk mobile view
This commit is contained in:
@@ -38,8 +38,8 @@ class HomeController extends Controller
|
||||
|
||||
// }
|
||||
|
||||
|
||||
$CustomerInfo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/portal/customer/info',['ic' => $auth_user['icno']])->json();
|
||||
$CustomerInfo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/portal/customer/info',['ic' => $auth_user['icno']]);
|
||||
//dd($CustomerInfo)
|
||||
|
||||
$total = 0.00;
|
||||
$sixmonths = 0;
|
||||
|
||||
@@ -88,17 +88,17 @@ class TacController extends Controller
|
||||
$mobileno = '6' . $customer['telefon'];
|
||||
$messages = 'AR-RAHN PKB PORTAL : TAC: ' . $tac_token . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
||||
|
||||
$status = Http::get('http://gateway.onewaysms.com.my:10001/api.aspx',[
|
||||
'apiusername' => 'APIUK330HDAFO',
|
||||
'apipassword' => 'APIUK330HDAFOUK330',
|
||||
'senderid' => 'INFO',
|
||||
'mobileno' => $mobileno,
|
||||
'message'=> $messages,
|
||||
'languagetype'=> 1
|
||||
]);
|
||||
// $status = Http::get('http://gateway.onewaysms.com.my:10001/api.aspx',[
|
||||
// 'apiusername' => 'APIUK330HDAFO',
|
||||
// 'apipassword' => 'APIUK330HDAFOUK330',
|
||||
// 'senderid' => 'INFO',
|
||||
// 'mobileno' => $mobileno,
|
||||
// 'message'=> $messages,
|
||||
// 'languagetype'=> 1
|
||||
// ]);
|
||||
|
||||
return response($status);
|
||||
// return response(1);
|
||||
// return response($status);
|
||||
return response(1);
|
||||
}
|
||||
|
||||
private function randum_number($len = 6,$dup = 1, $sort = false){
|
||||
|
||||
Generated
+641
-860
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -47,8 +47,8 @@ return [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST_MYSQL', '127.0.0.1'),
|
||||
'port' => env('DB_PORT_MYSQL', '3306'),
|
||||
'database' => env('DB_DATABASE_MYSQL', 'forge'),
|
||||
'username' => env('DB_USERNAME_MYSQL', 'forge'),
|
||||
'database' => env('DB_DATABASE_MYSQL', 'online_db'),
|
||||
'username' => env('DB_USERNAME_MYSQL', 'root'),
|
||||
'password' => env('DB_PASSWORD_MYSQL', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
|
||||
Generated
+9399
-25
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-12 mb-5">
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="card shadow">
|
||||
<div class="card-header mb-4 bg-dark border-0">
|
||||
<div class="row align-items-center">
|
||||
@@ -39,56 +39,44 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
|
||||
<div class="tab-pane fade show active" id="tabs-icons-text-2" role="tabpanel" aria-labelledby="tabs-icons-text-2-tab">
|
||||
|
||||
<div class="table-responsive text-center">
|
||||
<table class="table align-items-center" id="selepas_tawarruq" style="width: 100%;">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Pembiayaan Asal</th>
|
||||
<th>Baki Pembiayaan</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Bayaran</th>
|
||||
<div class="form" >
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table align-items-left" id="selepas_tawarruq" style="width: 100%;">
|
||||
<thead class="thead-light">
|
||||
<div style="margin-bottom: 15px; text-align: left;">
|
||||
<i class="text-danger" style="font-size:12px;">Klik 'Klik Di Sini' untuk Pilihan Bayaran</i><br>
|
||||
<i class="text-danger" style="font-size:12px;">Amaun Semasa -> Amaun Keuntungan Semasa Sahaja.</i><br>
|
||||
<i class="text-danger" style="font-size:12px;">Amaun Lain -> Amaun Ansuran Pembiayaan & Amaun Keuntungan Semasa, Sila Masukkan Amaun</i>
|
||||
</div>
|
||||
<tr style="text-align: center;">
|
||||
<!-- <th width="10%">No</th> -->
|
||||
<th width="10%">No <br>Rujukan</th>
|
||||
<th width="10%">Bayaran</th>
|
||||
<th width="10%">Keuntungan</th>
|
||||
<th width="10%">Baki <br>Pembiayaan</th>
|
||||
<th width="10%">Pembiayaan Asal</th>
|
||||
<th width="10%">Tempoh</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp
|
||||
</thead>
|
||||
@php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp
|
||||
@foreach($arraybayar as $index=>$bayar)
|
||||
@if($bayar['hargajualan'] != '')
|
||||
<tbody class="list">
|
||||
<tr>
|
||||
<td>
|
||||
<tbody class="list" style="text-align: center;">
|
||||
<tr>
|
||||
<!-- <td>
|
||||
{{ $counter }}
|
||||
</td>
|
||||
</td> -->
|
||||
<td>
|
||||
{{ $bayar['norujukan'] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($bayar['pinjaman'],2) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($bayar['bakipjm'],2) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $bayar['tempoh'] }}
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
@php
|
||||
$upahtawarruq = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
|
||||
@endphp
|
||||
{{ $upahtawarruq }}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<select name="sltbayaran" value="{{ old('sltbayaran') ? old('sltbayaran') : '' }}" class="form-control mb-2" data-upah="{{ $upahtawarruq }}" data-jenis="tawarruq" style="text-align: center; border: revert;">
|
||||
<option selected disabled>Pilih Bayaran</option>
|
||||
<option selected disabled class="text-warning">Klik Di Sini</option>
|
||||
<option value="fixed">Amaun Semasa</option>
|
||||
<option value="otheramount">Amaun Lain</option>
|
||||
</select>
|
||||
@@ -98,21 +86,37 @@
|
||||
<input type="hidden" name="txtjenisbayaran[]" value="{{ $jenisbayaran }}" style="text-align: center;" />
|
||||
<input type="hidden" name="txtnorujukanhidden[]" value="{{ $bayar['norujukan'] }}" style="text-align: center;" />
|
||||
<input type="hidden" name="txtkodcawhidden[]" value="{{ $bayar['kodcaw'] }}" style="text-align: center;" />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $upahtawarruq }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($bayar['bakipjm'],2) }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ number_format($bayar['pinjaman'],2) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $bayar['tempoh'] }}
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
@php $counter++; @endphp
|
||||
</tbody>
|
||||
@php $counter++; @endphp
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</table>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="card shadow">
|
||||
@@ -130,7 +134,7 @@
|
||||
<table class="table align-items-center" id="ringkasan_bayaran" style="width: 100%;">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<!-- <th>No</th> -->
|
||||
<th>No Rujukan</th>
|
||||
<th>Bayaran</th>
|
||||
</tr>
|
||||
@@ -142,9 +146,9 @@
|
||||
@if($bayar['hargajualan'] != '')
|
||||
<tbody class="list">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- <td>
|
||||
{{ $counter }}
|
||||
</td>
|
||||
</td> -->
|
||||
<td>
|
||||
{{ $bayar['norujukan'] }}
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,418 @@
|
||||
@extends('layouts.indexfifth')
|
||||
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.not-allowed {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 1rem !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<title>Bayar SAG | Portal Pelanggan</title>
|
||||
<div class="container">
|
||||
|
||||
<form name="formpayment" method="post" action="{{ route('payment.engine') }}">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="d-flex">
|
||||
<p class="not-allowed text-sm">Home /Pembayaran /</p>
|
||||
<p class="text-sm text-dark">Bayar SAG Pilihan</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-12 mb-5">
|
||||
<div class="card shadow">
|
||||
<div class="card-header mb-4 bg-dark border-0">
|
||||
<div class="row align-items-center">
|
||||
<div class="d-flex">
|
||||
<h4 class="text-white" style="margin-right: 1%;">Senarai Surat Gadaian</h4>
|
||||
<i class="fas fa-clipboard-list fa-2x text-white"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
|
||||
<div class="tab-pane fade show active" id="tabs-icons-text-2" role="tabpanel" aria-labelledby="tabs-icons-text-2-tab">
|
||||
|
||||
<div class="table-responsive text-center">
|
||||
<table class="table align-items-center" id="selepas_tawarruq" style="width: 100%;">
|
||||
<thead class="thead-light">
|
||||
<!-- <div style="margin-bottom: 15px;">
|
||||
<i class="text-danger" style="font-size:12px;">Amaun Semasa -> Amaun Keuntungan Semasa Sahaja.</i><br>
|
||||
<i class="text-danger" style="font-size:12px;">Amaun Lain -> Amaun Ansuran Pembiayaan & Amaun Keuntungan Semasa, Sila Masukkan Amaun</i>
|
||||
</div> -->
|
||||
<tr>
|
||||
<th width="10%">No</th>
|
||||
<th width="10%">No Rujukan</th>
|
||||
<th width="10%">Keuntungan</th>
|
||||
<th width="10%">Baki Pembiayaan</th>
|
||||
<th width="10%">Pembiayaan Asal</th>
|
||||
<th width="10%">Tempoh</th>
|
||||
<th width="10%">Bayaran</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php $counter = 1;$jenisbayaran = 'tawarruq'; @endphp
|
||||
@foreach($arraybayar as $index=>$bayar)
|
||||
@if($bayar['hargajualan'] != '')
|
||||
<tbody class="list">
|
||||
<tr>
|
||||
<td>
|
||||
{{ $counter }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $bayar['norujukan'] }}
|
||||
</td>
|
||||
<td>
|
||||
@php
|
||||
$upahtawarruq = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/upahtawarruq/'. $bayar['kodcaw'] . '/' . $bayar['norujukan'])->json();
|
||||
@endphp
|
||||
{{ $upahtawarruq }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($bayar['bakipjm'],2) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($bayar['pinjaman'],2) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $bayar['tempoh'] }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<select name="sltbayaran" value="{{ old('sltbayaran') ? old('sltbayaran') : '' }}" class="form-control mb-2" data-upah="{{ $upahtawarruq }}" data-jenis="tawarruq" style="text-align: center; border: revert;">
|
||||
<option selected disabled class="text-warning">Klik Di Sini</option>
|
||||
<option value="fixed">Amaun Semasa</option>
|
||||
<option value="otheramount">Amaun Lain</option>
|
||||
</select>
|
||||
|
||||
<input type="text" value="{{ old('txtbayarantawarruq') ? old('txtbayarantawarruq') : '' }}" data-bakipjm="{{ $bayar['bakipjm'] }}" data-taglel="{{ $bayar['taglel'] }}" data-upah="{{ $upahtawarruq }}" data-nm="{{ $bayar['nilaimarhun'] }}" data-jenis="tawarruq" name="txtbayarantawarruq" readonly class="form-control txtbayaran" style="text-align: center; border: outset;" />
|
||||
<input type="hidden" name="txtbayaranhidden[]" class="bayaran" style="text-align: center;" />
|
||||
<input type="hidden" name="txtjenisbayaran[]" value="{{ $jenisbayaran }}" style="text-align: center;" />
|
||||
<input type="hidden" name="txtnorujukanhidden[]" value="{{ $bayar['norujukan'] }}" style="text-align: center;" />
|
||||
<input type="hidden" name="txtkodcawhidden[]" value="{{ $bayar['kodcaw'] }}" style="text-align: center;" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@php $counter++; @endphp
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="card shadow">
|
||||
<div class="card-header bg-dark border-0">
|
||||
<div class="row align-items-center">
|
||||
<div class="d-flex">
|
||||
<h4 class="text-white" style="margin-right: 1%;">Ringkasan Pembayaran</h4>
|
||||
<i class="fas fa-shopping-cart fa-2x text-white"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form" style="text-align: center;">
|
||||
<div style="overflow-x: auto;">
|
||||
<table class="table align-items-center" id="ringkasan_bayaran" style="width: 100%;">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Bayaran</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@php $counter = 1;
|
||||
@endphp
|
||||
|
||||
@foreach($arraybayar as $index=>$bayar)
|
||||
@if($bayar['hargajualan'] != '')
|
||||
<tbody class="list">
|
||||
<tr>
|
||||
<td>
|
||||
{{ $counter }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $bayar['norujukan'] }}
|
||||
</td>
|
||||
<td>
|
||||
<p id="spantransaksi{{ $counter }}">0.00</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
@php
|
||||
$counter++;
|
||||
@endphp
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row pb-4 font-weight-light">
|
||||
<div class="col-6">
|
||||
<label style="text-transform: uppercase;"><strong>Fi Pengurusan</strong></label>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<span class="text-primary"><strong>RM <span>1.00</span></strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pb-4 font-weight-light">
|
||||
<div class="col-6">
|
||||
<label style="text-transform: uppercase;"><strong>Jumlah Keseluruhan</strong></label>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<span class="text-primary"><strong>RM <span id="spanjumlah">1.00</span></strong></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="text-danger d-none" id="spanamarankosong">*Jangan biarkan kotak bayaran ditinggalkan kosong, Sila masukkan amaun!</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex justify-content-between col-12 mt-3 align-self-end">
|
||||
<a href="{{ route('home') }}" type="button" class="btn btn-danger">Batal</a>
|
||||
<button type="submit" id="bayarsbmt" class="btn btn-primary" disabled onclick="loadingbtn();">Bayar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$(window).keydown(function(event){
|
||||
if(event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const formatter = new Intl.NumberFormat('en-US', {
|
||||
minimumFractionDigits: 2
|
||||
});
|
||||
|
||||
var belumtawarruqtable = $('#belum_tawarruq').DataTable({
|
||||
"bLengthChange": false,
|
||||
"bFilter": false,
|
||||
"bInfo": false,
|
||||
language: {
|
||||
'paginate': {
|
||||
'previous': '<span class="fas fa-backward"></span>',
|
||||
'next': '<span class="fas fa-forward"></span>'
|
||||
}
|
||||
},
|
||||
"scrollX": true,
|
||||
"pageLength": 10
|
||||
});
|
||||
|
||||
var selepastawarruqtable = $('#selepas_tawarruq').DataTable({
|
||||
"bLengthChange": false,
|
||||
"bFilter": false,
|
||||
"bInfo": false,
|
||||
language: {
|
||||
'paginate': {
|
||||
'previous': '<span class="fas fa-backward"></span>',
|
||||
'next': '<span class="fas fa-forward"></span>'
|
||||
}
|
||||
},
|
||||
"scrollX": true,
|
||||
"pageLength": 10,
|
||||
"pagingType": "simple",
|
||||
"paging": false
|
||||
|
||||
});
|
||||
// var selepastawarruqtable = $('#ringkasan_bayaran').DataTable({
|
||||
// "bLengthChange": false,
|
||||
// "bFilter": false,
|
||||
// "bInfo": false,
|
||||
|
||||
// "scrollX": true,
|
||||
// });
|
||||
|
||||
function validateform() {
|
||||
return false;
|
||||
}
|
||||
|
||||
$("select[name=sltbayaran]").change(function(e) {
|
||||
let selected = $('option:selected', this).attr('value');
|
||||
let jenis = $(this).data('jenis');
|
||||
let upah = parseFloat($(this).data('upah').replace(",",""));
|
||||
let taglel = $(this).data('taglel');
|
||||
|
||||
if (selected === 'fixed') {
|
||||
$(this).closest('tr').find("input").attr('readonly', true);
|
||||
$(this).closest('tr').find(".txtbayaran").val(upah);
|
||||
$(this).closest('tr').find(".bayaran").val(upah);
|
||||
calculateall(jenis, taglel);
|
||||
|
||||
} else {
|
||||
// $(this).closest('tr').find("input").val();
|
||||
$(this).closest('tr').find("input").attr('readonly', false);
|
||||
$(this).closest('tr').find(".txtbayaran").val(upah);
|
||||
$(this).closest('tr').find(".bayaran").val(upah);
|
||||
calculateall(jenis, taglel);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name=txtbayaranarrahn]").change(function(e) {
|
||||
|
||||
let upah = parseFloat($(this).data('upah').replace(",",""));
|
||||
let pinjaman = $(this).data('pinjaman');
|
||||
let jenis = $(this).data('jenis');
|
||||
let nm = $(this).data('nm');
|
||||
let taglel = $(this).data('taglel');
|
||||
|
||||
let bayar = Number(this.value);
|
||||
|
||||
let errorlebih = nm - (nm * 0.1);
|
||||
|
||||
if (bayar > parseFloat(errorlebih)) {
|
||||
$("#bayarsbmt").prop('disabled', false);
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
|
||||
'error'
|
||||
)
|
||||
$(this).val(upah);
|
||||
$(this).closest('tr').find('.bayaran').val(upah);
|
||||
calculateall(jenis, taglel);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$(this).closest('tr').find('.bayaran').val(this.value);
|
||||
calculateall(jenis, taglel);
|
||||
|
||||
});
|
||||
|
||||
$("input[name=txtbayarantawarruq]").change(function(e) {
|
||||
|
||||
let upah = parseFloat($(this).data('upah').replace(",",""));
|
||||
let bakipinjam = $(this).data('bakipjm');
|
||||
let jenis = $(this).data('jenis');
|
||||
let nm = $(this).data('nm');
|
||||
let taglel = $(this).data('taglel');
|
||||
|
||||
let bayar = Number(this.value);
|
||||
|
||||
let errorlebih = (bakipinjam - (nm * 0.1) + upah);
|
||||
|
||||
if (bayar > parseFloat(errorlebih)) {
|
||||
$("#bayarsbmt").prop('disabled', false);
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Baki Pembiayaan tidak boleh kurang 10% daripada Nilai Marhun',
|
||||
'error'
|
||||
)
|
||||
$(this).val(errorlebih.toFixed(2));
|
||||
$(this).closest('tr').find('.bayaran').val(errorlebih.toFixed(2));
|
||||
calculateall(jenis, taglel);
|
||||
return false;
|
||||
}else if(bayar < parseFloat(upah) && parseFloat(upah) !== 0.00)
|
||||
{
|
||||
$("#bayarsbmt").prop('disabled', false);
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Bayaran tidak boleh kurang daripada keuntungan semasa!',
|
||||
'error'
|
||||
)
|
||||
$(this).val(upah);
|
||||
$(this).closest('tr').find('.bayaran').val(upah);
|
||||
calculateall(jenis, taglel);
|
||||
return false;
|
||||
}
|
||||
|
||||
$(this).closest('tr').find('.bayaran').val(this.value);
|
||||
calculateall(jenis, taglel);
|
||||
});
|
||||
|
||||
function calculateall(jenis, taglel) {
|
||||
var $row = $(this).closest('tr');
|
||||
var sumarrahn = 0;
|
||||
var sumtawarruq = 0;
|
||||
var sum = 0;
|
||||
var counterrorbayar = 0;
|
||||
|
||||
$('#belum_tawarruq').find('input[name=txtbayaranarrahn]').each(function() {
|
||||
sumarrahn += parseFloat(this.value) || 0;
|
||||
|
||||
if (this.value <= 0 || this.value == '') {
|
||||
counterrorbayar++;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#selepas_tawarruq').find('input[name=txtbayarantawarruq]').each(function(index) {
|
||||
|
||||
var bayaranselepas = (this.value * 100) / 10;
|
||||
bayaranselepas = Math.round(bayaranselepas);
|
||||
bayaranselepas = bayaranselepas / 10;
|
||||
|
||||
$('#spantransaksi' + (index+1)).text(formatter.format(bayaranselepas));
|
||||
|
||||
sumtawarruq += parseFloat(this.value) || 0;
|
||||
|
||||
if (this.value <= 0 || this.value == '') {
|
||||
counterrorbayar++;
|
||||
}
|
||||
});
|
||||
|
||||
sum = sumarrahn + sumtawarruq;
|
||||
sum = (sum * 100) / 10;
|
||||
sum = Math.round(sum);
|
||||
sum = sum / 10;
|
||||
|
||||
if (counterrorbayar > 0) {
|
||||
$('#spanamarankosong').removeClass("d-none");
|
||||
$("#bayarsbmt").prop('disabled', true);
|
||||
} else {
|
||||
$('#spanamarankosong').addClass("d-none");
|
||||
$("#bayarsbmt").prop('disabled', false);
|
||||
}
|
||||
|
||||
$("#spanbayaranarrahn").text(sumarrahn.toFixed(2));
|
||||
$("#spanbayarantawarruq").text(sumtawarruq.toFixed(2));
|
||||
$('#spanjumlah').text(formatter.format(sum + 1));
|
||||
}
|
||||
|
||||
if (document.addEventListener) {
|
||||
window.addEventListener('pageshow', function(event) {
|
||||
if (event.persisted || window.performance && window.performance.navigation.type == 2) {
|
||||
$('#logout-form').submit();
|
||||
}
|
||||
if (event.persisted || window.performance && window.performance.navigation.type == 0) {
|
||||
$('form[name="formpayment"]')[0].reset();
|
||||
}
|
||||
},
|
||||
false);
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -169,10 +169,10 @@
|
||||
<thead class="thead-light bg-dark text-white text-center">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Cawangan</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>JBG</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Cawangan</th>
|
||||
<th>JBG</th>
|
||||
<th>T Lanjut</th>
|
||||
{{-- <th>Status</th> --}}
|
||||
</tr>
|
||||
@@ -344,7 +344,7 @@ var hargaemastable = $('#harga_emas').DataTable({
|
||||
$('#totalsag').text(0);
|
||||
|
||||
var empat = selepastawarruqtable.columns(3).header();
|
||||
$(empat).html('JBG');
|
||||
//$(empat).html('JBG');
|
||||
selepastawarruqtable.column( 4 ).visible( true );
|
||||
selepastawarruqtable.column( 5 ).visible( true );
|
||||
// selepastawarruqtable.column( 6 ).visible( true );
|
||||
@@ -466,10 +466,10 @@ var hargaemastable = $('#harga_emas').DataTable({
|
||||
|
||||
selepastawarruqtable.row.add([
|
||||
`<input type="checkbox" onclick="tickfunc(this)" name="chkboxsag[]" value="${ps.norujukan}" id="sag-${counter}" data-norujukan="${ps.norujukan}" ${should_block} />`,
|
||||
namacawangan,
|
||||
`<a href="#" onclick="linktargetfunc(this)" class="linktarget" data-toggle="modal" data-nm="${ps.nilaimarhun}" data-berat="${ps.berat}" data-upah12="${ps.bakiupah}" data-pjmnum="${ps.pinjaman}" data-bakipjm="${ps.bakipjm}" data-lelong="${ps.taglel}" data-marhun='${marh}' data-pinjaman="${ps.pinjaman}" data-norujukan="${ps.norujukan}" data-hargajualan="${ps.hargajualan}" data-kodcaw="${ps.kodcaw}" data-target="#marhunModal"><span class="name mb-0 text-sm">${ps.norujukan}</span></a>`,
|
||||
ps.tempoh,
|
||||
`<a href="#" onclick="linktargetfunc(this)" class="linktarget" data-toggle="modal" data-nm="${ps.nilaimarhun}" data-berat="${ps.berat}" data-upah12="${ps.bakiupah}" data-pjmnum="${ps.pinjaman}" data-bakipjm="${ps.bakipjm}" data-lelong="${ps.taglel}" data-marhun='${marh}' data-pinjaman="${ps.pinjaman}" data-norujukan="${ps.norujukan}" data-hargajualan="${ps.hargajualan}" data-kodcaw="${ps.kodcaw}" data-target="#marhunModal" style="color:#3490dc"><span class="name mb-0 text-sm">${ps.norujukan}</span></a>`,
|
||||
formatter.format(ps.keuntungan),
|
||||
namacawangan,
|
||||
ps.tempoh,
|
||||
t_matang,
|
||||
// statementlelong
|
||||
]).draw();
|
||||
|
||||
Reference in New Issue
Block a user