updated server 28-9-2022
This commit is contained in:
@@ -387,7 +387,7 @@ class CustomerController extends Controller
|
|||||||
$poskod = DB::connection('mysql7')->table('poskod')->where('poskod','=',$request->poskod)->first();
|
$poskod = DB::connection('mysql7')->table('poskod')->where('poskod','=',$request->poskod)->first();
|
||||||
|
|
||||||
$customer_info = DB::connection('mysql7')->table('customer')
|
$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)
|
->where('kplama','=',$nokp)
|
||||||
->orWhere('kpbaru','=',$nokp)
|
->orWhere('kpbaru','=',$nokp)
|
||||||
->get()->toArray();
|
->get()->toArray();
|
||||||
@@ -415,7 +415,7 @@ class CustomerController extends Controller
|
|||||||
if($customer_update)
|
if($customer_update)
|
||||||
{
|
{
|
||||||
$customer_info_new = DB::connection('mysql7')->table('customer')
|
$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)
|
->where('kplama','=',$nokp)
|
||||||
->orWhere('kpbaru','=',$nokp)
|
->orWhere('kpbaru','=',$nokp)
|
||||||
->get()->toArray();
|
->get()->toArray();
|
||||||
|
|||||||
@@ -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']])
|
->where([['teb.t_tebus','>=',$request->mula],['teb.t_tebus','<=',$request->hingga],['gadai.sttebus','=','T'],['gadai.hargajualan','<>','NULL']])
|
||||||
->sum('gadai.pinjaman');
|
->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];
|
$rekod_pinjamandiberi = ['Gadai' => $Gadai,'Tebus' => $Tebus];
|
||||||
|
|
||||||
return response()->json($rekod_pinjamandiberi);
|
return response()->json($rekod_pinjamandiberi);
|
||||||
|
|||||||
@@ -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);
|
return response($total);
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ class VaultController extends Controller
|
|||||||
$totpanjaran = $vault['totpanjar'];
|
$totpanjaran = $vault['totpanjar'];
|
||||||
|
|
||||||
$glpend = GlDetail::on($cawangan['mysql'])->where('tarikh','=', $current->toDateString())->sum('pendahuluan');
|
$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;
|
$bakiakhir = $bakiawal - $keluar + $masuk + $glpend - $glser - $totpanjaran;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user