ubah dan hapus
This commit is contained in:
@@ -183,7 +183,7 @@
|
||||
<div class="col-8">
|
||||
<input type="text" id="bayaran" placeholder="0.00" class="form-control" disabled/>
|
||||
</div>
|
||||
</diV>
|
||||
</div>
|
||||
<div class="form-group row" id="divtambahpinjaman">
|
||||
<div class="col-4">
|
||||
TAMBAH PEMBIAYAAN(RM)
|
||||
@@ -193,7 +193,8 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@php
|
||||
$maxgadai = ($gadai['nilaimarhun'] * 0.7) - $gadai['pinjaman'];
|
||||
$maxgadai = ($gadai['nilaimarhun'] * 0.8) - $gadai['bakipjm'];
|
||||
|
||||
@endphp
|
||||
<input type="text" id="tambahpinjamsebenar" placeholder="0.00" value="{{ $maxgadai }}" class="form-control" disabled/>
|
||||
</div>
|
||||
@@ -683,10 +684,14 @@ function bayaransemua()
|
||||
var pinjaman = "{{ $gadai['pinjaman']}}";
|
||||
var ansuran = 0;
|
||||
var addpinjaman = 0;
|
||||
var bakipinjaman = 0;
|
||||
var bakipinjaman = $('#perludibayar').val();
|
||||
var bakiupah = 0;
|
||||
var historygadaian = 0;
|
||||
var marhun = "{{ $gadai['marhun'] }}";
|
||||
var nowakil = nw;
|
||||
|
||||
var urlroute = '{{ route("resit.tebus", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
|
||||
$.ajax({
|
||||
method:'PUT',
|
||||
@@ -703,14 +708,18 @@ function bayaransemua()
|
||||
"bakipinjaman" : bakipinjaman,
|
||||
"bakiupah" : bakiupah,
|
||||
"historygadaian" : historygadaian,
|
||||
"marhun" : marhun
|
||||
"marhun" : marhun,
|
||||
"nowakil" : nowakil
|
||||
},
|
||||
success:function(success_data){
|
||||
Swal.fire(
|
||||
'Good job!',
|
||||
'You clicked the button!',
|
||||
'success'
|
||||
).then(function() {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Good job!',
|
||||
text: 'You clicked the button!',
|
||||
footer: '<a href>Why do I have this issue?</a>'
|
||||
|
||||
}).then(function() {
|
||||
window.open(urlroute, '_blank');
|
||||
window.location.replace("{{ url()->previous() }}");
|
||||
})
|
||||
}
|
||||
@@ -902,7 +911,7 @@ function bayaransemua()
|
||||
var pinjaman = parseFloat("{{ $gadai['pinjaman']}}");
|
||||
var marhun_detail = marhun_baru;
|
||||
var kuantiti_marhun = Number("{{sizeof($marhun)}}") - array_recno.length;
|
||||
var nowakil = '';
|
||||
var nowakil = nw;
|
||||
|
||||
console.log("Pinjaman Baru Sekali Lagi: " + pinjamanbaru);
|
||||
// console.log('lebihan : ' + lebihan + ' ');
|
||||
@@ -910,9 +919,9 @@ function bayaransemua()
|
||||
console.log("nilai_marhun_lama:" + nilai_marhun_lama + " " + "nilai_marhun:" + nilai_marhun + " " + "pinjamanbaru:" + pinjamanbaru + " " + "bakipinjaman:" + bakipinjaman + " ");
|
||||
console.log("historygadaian:" + historygadaian + " " + "marhun:" + marhun + " " + "total_berat:" + total_berat + " " + "pinjaman:" + pinjaman + " ");
|
||||
console.log("marhun_detail: " + marhun_detail + "kuantiti_marhun: " + kuantiti_marhun);
|
||||
|
||||
console.log(nowakil);
|
||||
|
||||
// return;
|
||||
return;
|
||||
|
||||
var kadarupahbaru = 0;
|
||||
|
||||
@@ -1079,6 +1088,7 @@ function bayaransemua()
|
||||
|
||||
}
|
||||
|
||||
let nw = 0;
|
||||
|
||||
function wakilfunction(e)
|
||||
{
|
||||
@@ -1116,6 +1126,9 @@ function wakilfunction(e)
|
||||
title: 'Maklumat anda Berjaya Direkodkan!'
|
||||
});
|
||||
|
||||
console.log(data.NOWAKIL);
|
||||
nw = data.NOWAKIL;
|
||||
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$(e).html("Ubah");
|
||||
$(e).attr("onclick","ubahwakil(this)");
|
||||
@@ -1169,7 +1182,7 @@ function daftarwakil()
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
|
||||
Reference in New Issue
Block a user