auto-tawarruq func excuse
This commit is contained in:
@@ -3183,18 +3183,9 @@ function pembatalanbalik()
|
|||||||
function funcexcuse(toggle){
|
function funcexcuse(toggle){
|
||||||
|
|
||||||
if(toggle){
|
if(toggle){
|
||||||
|
let pembiayaan = parseFloat($('#hargapembiayaansemasa').val().replace(/[^0-9.-]+/g,""));
|
||||||
var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,""));
|
var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,""));
|
||||||
let percentasal = parseFloat('{{ number_format($percent_asal,2) }}');
|
let percentasal = parseFloat('{{ number_format($percent_asal,2) }}');
|
||||||
jenisAT = 'hargalama';
|
|
||||||
$('#basic-addon2').text(percentasal);
|
|
||||||
$('.divlebihanmargin').hide();
|
|
||||||
$('#divjenisAT').show();
|
|
||||||
$('#perludibayarAT').val(formatter.format(jumupah));
|
|
||||||
// $('#divbayaranAT').hide();
|
|
||||||
$('#calcbayar').val(jumupah);
|
|
||||||
$("#perludibayarAT").prop("readonly", true);
|
|
||||||
// $('#divbaki').hide();
|
|
||||||
// gadaiautotawarruq(jenisAT);
|
|
||||||
|
|
||||||
const swalWithBootstrapButtons = Swal.mixin({
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
customClass: {
|
customClass: {
|
||||||
@@ -3279,9 +3270,19 @@ function funcexcuse(toggle){
|
|||||||
text: `Komen : ${data.komen}`
|
text: `Komen : ${data.komen}`
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
|
|
||||||
$(func).attr("onSubmit","return true;");
|
jenisAT = 'hargalama';
|
||||||
$(func).submit();
|
$('#basic-addon2').text(percentasal);
|
||||||
return true;
|
$('.divlebihanmargin').hide();
|
||||||
|
$('#divjenisAT').show();
|
||||||
|
$('#perludibayarAT').val(formatter.format(jumupah));
|
||||||
|
// $('#divbayaranAT').hide();
|
||||||
|
$('#calcbayar').val(jumupah);
|
||||||
|
$("#perludibayarAT").prop("readonly", true);
|
||||||
|
$('#pinjamanbaru').val(formatter.format(pembiayaan));
|
||||||
|
|
||||||
|
// $(func).attr("onSubmit","return true;");
|
||||||
|
// $(func).submit();
|
||||||
|
// return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3305,11 +3306,13 @@ function funcexcuse(toggle){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
let pembiayaan = parseFloat("{{ $pembiayaanbaru }}");
|
||||||
let percenthargasemasa = parseFloat('{{ number_format($percent_hargaemassemasa,2) }}');
|
let percenthargasemasa = parseFloat('{{ number_format($percent_hargaemassemasa,2) }}');
|
||||||
var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,""));
|
var jumupah = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,""));
|
||||||
let jumlebmargin = parseFloat('{{ ($percent_hargaemassemasa > 80) ? $bayaranlebihan : 0 }}');
|
let jumlebmargin = parseFloat('{{ ($percent_hargaemassemasa > 80) ? $bayaranlebihan : 0 }}');
|
||||||
let totalbayaran = (percenthargasemasa > 80) ? (jumlebmargin + jumupah) : jumupah;
|
let totalbayaran = (percenthargasemasa > 80) ? (jumlebmargin + jumupah) : jumupah;
|
||||||
$('#basic-addon2').text((percenthargasemasa > 80) ? '80.00' : percenthargasemasa);
|
$('#basic-addon2').text((percenthargasemasa > 80) ? '80.00' : percenthargasemasa);
|
||||||
|
$('#pinjamanbaru').val(formatter.format(pembiayaan));
|
||||||
|
|
||||||
jenisAT = 'none';
|
jenisAT = 'none';
|
||||||
$('.divlebihanmargin').show();
|
$('.divlebihanmargin').show();
|
||||||
|
|||||||
Reference in New Issue
Block a user