This commit is contained in:
afiq
2021-09-28 10:01:30 +08:00
parent d4d47d2e24
commit 588db3fc60
5 changed files with 28 additions and 9 deletions
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Audit extends Model
{
protected $table = 'audit';
}
+5 -3
View File
@@ -171,7 +171,8 @@ class GadaianController extends Controller
'upah6' => $keuntungan6bulan,
'upah12' => $keuntungan12bulan,
'hargajualan' => $hargajualan,
'kuantiti_marhun' => $request->kuantiti_marhun
'kuantiti_marhun' => $request->kuantiti_marhun,
'transaction' => 'Daftar Gadai'
])->json();
$komuditi = Http::put(config('api.url').'/api/komuditi/transaksi',[
@@ -190,7 +191,7 @@ class GadaianController extends Controller
public function editstore(Request $request){
$auth_user = Auth::user();
$total_nilai_marhun = $request->total_nilai_marhun;
$total_nilai_marhun = str_replace(',','',$total_nilai_marhun);
$keuntungan_sebln = $request->keuntungan_sebulan;
@@ -214,7 +215,8 @@ class GadaianController extends Controller
'upah6' => $keuntungan6bulan,
'upah12' => $keuntungan12bulan,
'hargajualan' => $hargajualan,
'kuantiti_marhun' => $request->kuantiti_marhun
'kuantiti_marhun' => $request->kuantiti_marhun,
'transaction' => 'Ubah Gadai'
])->json();
$update_komuditi = Http::put(config('api.url').'/api/komuditi/update',[
'unit_komuditi' => round($request->pinjaman, 2),
+4 -1
View File
@@ -416,6 +416,7 @@
var api_url = "<?php echo $api_url ?>";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
$('#daftar_gadai').on('click',function(){
$("#daftar_gadai").prop('disabled', true);
var noic = $('#noic').val();
var iclama = "{{ $customer_info['kplama'] }}";
var icbaru = "{{ $customer_info['kpbaru'] }}";
@@ -431,13 +432,15 @@
title: 'Unit Komoditi Berbaki Minima',
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
});
$("#daftar_gadai").prop('disabled', false);
event.preventDefault();
return false;
}else{
if(Number(data['unit_komuditi']) < 50000){
$("#daftar_gadai").prop('disabled', false);
Swal.fire({
icon: 'error',
title: 'Unit Komoditi Berbaki Minumum',
title: 'Unit Komoditi Berbaki Minima',
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
});
event.preventDefault();
+8 -4
View File
@@ -504,7 +504,8 @@
'karat' : karat,
'berat_emas' :berat_emas,
'harga' : harga,
'nilai_marhun' : nilai_marhun
'nilai_marhun' : nilai_marhun,
'teller' : "{{ Auth::user()->name }}"
},
success:function(data){
$("#tambah_marhun").prop('disabled', false);
@@ -615,7 +616,8 @@
'karat' : karat,
'berat_emas' :berat_emas,
'harga' : harga,
'nilai_marhun' : nilai_marhun
'nilai_marhun' : nilai_marhun,
'teller' : "{{ Auth::user()->name }}"
},
success:function(data){
$("#tambah_marhun").prop('disabled', false);
@@ -1034,7 +1036,8 @@
data: {
"_token": "{{ csrf_token() }}",
"norujukan" : norujuk,
"recno" : recnozz[1]
"recno" : recnozz[1],
"teller": "{{ Auth::user()->name }}"
},
success:function(data){
location.reload();
@@ -1115,7 +1118,8 @@
'harga' : harga_edit,
'n_marhun' : nilai_marhun_edit,
'marhun' : marhun_edit,
'nota' : nota
'nota' : nota,
"teller": "{{ Auth::user()->name }}"
},
success:function(data){
getMarhun(norujukedit);
+1 -1
View File
@@ -1846,7 +1846,7 @@
var marginsemasa = pinjaman_baru/nmsemasa * 100;
$.ajax({
$.ajax({
method:'get',
url: api + '/api/komuditi/check',
success:function(komoditi){