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';
}
+4 -2
View File
@@ -171,7 +171,8 @@ class GadaianController extends Controller
'upah6' => $keuntungan6bulan, 'upah6' => $keuntungan6bulan,
'upah12' => $keuntungan12bulan, 'upah12' => $keuntungan12bulan,
'hargajualan' => $hargajualan, 'hargajualan' => $hargajualan,
'kuantiti_marhun' => $request->kuantiti_marhun 'kuantiti_marhun' => $request->kuantiti_marhun,
'transaction' => 'Daftar Gadai'
])->json(); ])->json();
$komuditi = Http::put(config('api.url').'/api/komuditi/transaksi',[ $komuditi = Http::put(config('api.url').'/api/komuditi/transaksi',[
@@ -214,7 +215,8 @@ class GadaianController extends Controller
'upah6' => $keuntungan6bulan, 'upah6' => $keuntungan6bulan,
'upah12' => $keuntungan12bulan, 'upah12' => $keuntungan12bulan,
'hargajualan' => $hargajualan, 'hargajualan' => $hargajualan,
'kuantiti_marhun' => $request->kuantiti_marhun 'kuantiti_marhun' => $request->kuantiti_marhun,
'transaction' => 'Ubah Gadai'
])->json(); ])->json();
$update_komuditi = Http::put(config('api.url').'/api/komuditi/update',[ $update_komuditi = Http::put(config('api.url').'/api/komuditi/update',[
'unit_komuditi' => round($request->pinjaman, 2), 'unit_komuditi' => round($request->pinjaman, 2),
+4 -1
View File
@@ -416,6 +416,7 @@
var api_url = "<?php echo $api_url ?>"; var api_url = "<?php echo $api_url ?>";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
$('#daftar_gadai').on('click',function(){ $('#daftar_gadai').on('click',function(){
$("#daftar_gadai").prop('disabled', true);
var noic = $('#noic').val(); var noic = $('#noic').val();
var iclama = "{{ $customer_info['kplama'] }}"; var iclama = "{{ $customer_info['kplama'] }}";
var icbaru = "{{ $customer_info['kpbaru'] }}"; var icbaru = "{{ $customer_info['kpbaru'] }}";
@@ -431,13 +432,15 @@
title: 'Unit Komoditi Berbaki Minima', title: 'Unit Komoditi Berbaki Minima',
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi' text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
}); });
$("#daftar_gadai").prop('disabled', false);
event.preventDefault(); event.preventDefault();
return false; return false;
}else{ }else{
if(Number(data['unit_komuditi']) < 50000){ if(Number(data['unit_komuditi']) < 50000){
$("#daftar_gadai").prop('disabled', false);
Swal.fire({ Swal.fire({
icon: 'error', icon: 'error',
title: 'Unit Komoditi Berbaki Minumum', title: 'Unit Komoditi Berbaki Minima',
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi' text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
}); });
event.preventDefault(); event.preventDefault();
+8 -4
View File
@@ -504,7 +504,8 @@
'karat' : karat, 'karat' : karat,
'berat_emas' :berat_emas, 'berat_emas' :berat_emas,
'harga' : harga, 'harga' : harga,
'nilai_marhun' : nilai_marhun 'nilai_marhun' : nilai_marhun,
'teller' : "{{ Auth::user()->name }}"
}, },
success:function(data){ success:function(data){
$("#tambah_marhun").prop('disabled', false); $("#tambah_marhun").prop('disabled', false);
@@ -615,7 +616,8 @@
'karat' : karat, 'karat' : karat,
'berat_emas' :berat_emas, 'berat_emas' :berat_emas,
'harga' : harga, 'harga' : harga,
'nilai_marhun' : nilai_marhun 'nilai_marhun' : nilai_marhun,
'teller' : "{{ Auth::user()->name }}"
}, },
success:function(data){ success:function(data){
$("#tambah_marhun").prop('disabled', false); $("#tambah_marhun").prop('disabled', false);
@@ -1034,7 +1036,8 @@
data: { data: {
"_token": "{{ csrf_token() }}", "_token": "{{ csrf_token() }}",
"norujukan" : norujuk, "norujukan" : norujuk,
"recno" : recnozz[1] "recno" : recnozz[1],
"teller": "{{ Auth::user()->name }}"
}, },
success:function(data){ success:function(data){
location.reload(); location.reload();
@@ -1115,7 +1118,8 @@
'harga' : harga_edit, 'harga' : harga_edit,
'n_marhun' : nilai_marhun_edit, 'n_marhun' : nilai_marhun_edit,
'marhun' : marhun_edit, 'marhun' : marhun_edit,
'nota' : nota 'nota' : nota,
"teller": "{{ Auth::user()->name }}"
}, },
success:function(data){ success:function(data){
getMarhun(norujukedit); getMarhun(norujukedit);
+1 -1
View File
@@ -1846,7 +1846,7 @@
var marginsemasa = pinjaman_baru/nmsemasa * 100; var marginsemasa = pinjaman_baru/nmsemasa * 100;
$.ajax({ $.ajax({
method:'get', method:'get',
url: api + '/api/komuditi/check', url: api + '/api/komuditi/check',
success:function(komoditi){ success:function(komoditi){