updated server 28-9-2022

This commit is contained in:
e.arrahn
2022-09-27 23:15:44 +08:00
parent a723acca91
commit 9f81fcdac6
4 changed files with 17 additions and 4 deletions
+2 -2
View File
@@ -387,7 +387,7 @@ class CustomerController extends Controller
$poskod = DB::connection('mysql7')->table('poskod')->where('poskod','=',$request->poskod)->first();
$customer_info = DB::connection('mysql7')->table('customer')
->select('kodcaw','tarikhdaftar','nopelanggan','kpbaru','kplama','nama','t_lahir','jantina','alamat1','poskod')
->select('kodcaw','tarikhdaftar','nopelanggan','kpbaru','kplama','nama','t_lahir','jantina','alamat1','poskod','telefon','telefon2')
->where('kplama','=',$nokp)
->orWhere('kpbaru','=',$nokp)
->get()->toArray();
@@ -415,7 +415,7 @@ class CustomerController extends Controller
if($customer_update)
{
$customer_info_new = DB::connection('mysql7')->table('customer')
->select('kodcaw','tarikhdaftar','nopelanggan','kpbaru','kplama','nama','t_lahir','jantina','alamat1','poskod')
->select('kodcaw','tarikhdaftar','nopelanggan','kpbaru','kplama','nama','t_lahir','jantina','alamat1','poskod','telefon','telefon2')
->where('kplama','=',$nokp)
->orWhere('kpbaru','=',$nokp)
->get()->toArray();
+8
View File
@@ -2946,6 +2946,14 @@ class GadaiController extends Controller
->where([['teb.t_tebus','>=',$request->mula],['teb.t_tebus','<=',$request->hingga],['gadai.sttebus','=','T'],['gadai.hargajualan','<>','NULL']])
->sum('gadai.pinjaman');
$pembiayaanlelong = Lelong::on($cawangan['mysql'])
->join('gadai as gad','gad.norujukan','=','lelong.norujukan')
->where('gad.hargajualan','!=',null)
->where([['t_jual','>=',$request->mula],['t_jual','<=',$request->hingga]])
->sum('lelong.pinjaman');
$Tebus += $pembiayaanlelong;
$rekod_pinjamandiberi = ['Gadai' => $Gadai,'Tebus' => $Tebus];
return response()->json($rekod_pinjamandiberi);
+6 -1
View File
@@ -1841,7 +1841,12 @@ class TebusController extends Controller
}
}
$total = ($ansuran + $bukanansuran);
$upahlelong = Lelong::on($cawangan['mysql'])
->where([['t_jual','>=',$request->mula],['t_jual','<=',$request->hingga],['t_jual','>','2022-07-24']])
->whereYear('t_jual','=',$current->year)
->sum('bakiupah');
$total = ($ansuran + $bukanansuran + $upahlelong);
}
return response($total);
+1 -1
View File
@@ -182,7 +182,7 @@ class VaultController extends Controller
$totpanjaran = $vault['totpanjar'];
$glpend = GlDetail::on($cawangan['mysql'])->where('tarikh','=', $current->toDateString())->sum('pendahuluan');
$glser = GlDetail::on($cawangan['mysql'])->where('tarikh','=', $current->toDateString())->sum('serahan');
$glser = GlDetail::on($cawangan['mysql'])->where('tarikh','=', $current->toDateString())->where('teller','<>','ONLINE')->sum('serahan');
$bakiakhir = $bakiawal - $keluar + $masuk + $glpend - $glser - $totpanjaran;