first
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Audit extends Model
|
||||
{
|
||||
protected $table = 'audit';
|
||||
}
|
||||
@@ -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),
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1846,7 +1846,7 @@
|
||||
|
||||
var marginsemasa = pinjaman_baru/nmsemasa * 100;
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api + '/api/komuditi/check',
|
||||
success:function(komoditi){
|
||||
|
||||
Reference in New Issue
Block a user