fix all the bug

This commit is contained in:
hafifierahman
2021-01-31 08:39:15 +08:00
parent c58c0dbc39
commit 86758cfbe1
18 changed files with 1209 additions and 151 deletions
+45 -6
View File
@@ -104,6 +104,7 @@
</tr>
</thead>
<tbody>
@php $count = 0; @endphp
@foreach ($marhun as $index=>$m)
<tr>
<td><input type="checkbox" id="checkmarhun" data-recno="{{ $m['recno'] }}" data-nm="{{ $m['n_marhun'] }}" data-marhun="{{ $m['marhun'] }}" data-berat="{{ $m['berat'] }}" style="display:none;"/><span class="spannar">{{ $index+1 }}</span></td>
@@ -116,6 +117,7 @@
<td>{{ $m['karat'] }}</td>
<td>RM {{ $m['harga'] }}</td>
</tr>
@php $count++; @endphp
@endforeach
</tbody>
<tr>
@@ -291,6 +293,21 @@ var array_nm = [];
var array_marhun = [];
var array_berat = [];
let bilangan_marhun = Number("{{ $count }}");
bilmarhun = () => {
if(bilangan_marhun ==1)
{
$('option[value="S"]').attr("disabled", true);
}
else
{
$('option[value="S"]').attr("disabled", false);
}
}
bilmarhun();
var tarikhtawarruq = new Date("2021/01/01");
var tarikhgadai = new Date("{{ $gadai['t_gadai'] }}");
@@ -752,11 +769,9 @@ function bayaransemua()
var marhun = "{{ $gadai['marhun'] }}";
var nowakil = nw;
alert(nw);
return;
$.ajax({
method:'put',
datatype: 'json',
url: api + '/api/updatetebus/' + kodcaw + '/' + norujukan,
data:{
"nopelanggan" : nopelanggan,
@@ -775,9 +790,24 @@ function bayaransemua()
"jenisbayarantebus" : jenisbayarantebus
},
success:function(success_data){
// $.ajax({
// method: 'put',
// datatype: 'json', ///////untuk kegunaaan aliran tunai penebusan je testing
// url: api + '/api/',
// data:{
// },
// success:function(data)
// {
// success la
// }
// });
Swal.fire({
icon: 'success',
title: 'Good job!',
title: 'Berjaya!',
text: 'You clicked the button!',
footer: '<a href>Why do I have this issue?</a>'
@@ -1154,12 +1184,21 @@ function bayaransemua()
jenisbayarantebus = "tawarruq";
}
if( $('#tambahpinjam').val() <= 0 && $('#tambahpinjam').val() === '')
{
Swal.fire(
'Amaran!',
'Amaun hendaklah melebihi daripada 0',
'error'
)
return false;
}
if(parseFloat($('#basic-addon2').text()) > 70)
if(parseFloat($('#basic-addon2').text()) > 80)
{
Swal.fire(
'Amaran!',
'Pinjaman Haruslah Dalam Lingkungan 70%!',
'Pinjaman Haruslah Dalam Lingkungan 80%!',
'error'
)
return false;