update fasa dalam pindah lelong

This commit is contained in:
Nur Izzati Zulkifli
2023-09-04 12:45:59 +08:00
parent 99b886e9e4
commit ccaed30fe1
2 changed files with 9 additions and 4 deletions
+6 -2
View File
@@ -2786,6 +2786,7 @@ class LelongController extends Controller
$lelong_id = $id;
$lelong = Lelong::where('id','=',$id)->first();
$cawanganlel = CawanganLelong::where('lelong_id','=',$id)->get();
$fasa = $lelong->fasa;
$lelkarat = LelKarat::where('lelong_id','=',$id)->get();
$jeniskarat = JenisKarat::all();
@@ -2845,7 +2846,7 @@ class LelongController extends Controller
// dd($cawangan['caw_code']);
$datapindah = lelong::join('cawangan_lelong','cawangan_lelong.lelong_id','=','lelong.id')
->join('cawangan','cawangan.id','=','cawangan_lelong.caw_id')
->select("lelong.id","lelong.tarikh_lelong")
->select("lelong.id","lelong.tarikh_lelong",'lelong.fasa')
->where('cawangan.caw_code','!=', $cawangan['caw_code'])
->where('lelong.sts_lelong', 0)
->where('cawangan_lelong.lelong_id','!=', $lelong_id)
@@ -2869,7 +2870,8 @@ class LelongController extends Controller
'total_nilaimarhun',
'total_pinjaman',
'lelong_id',
'data'
'data',
'fasa'
));
}
@@ -2881,6 +2883,7 @@ class LelongController extends Controller
$lelongidasal = $request->lelongidasal;
$lelongidbaru = $request->lelong_id;
// dd($lelongidasal);
$fasa = $request->fasa;
$tarikhlelongbaru = LelongBid::where('lelong_id','=',$lelongidbaru)
// ->where('kodcaw','=',$request->caw)
->first();
@@ -2893,6 +2896,7 @@ class LelongController extends Controller
// dd($caw);
foreach($caw as $index=>$cawpindah){
$caw_pindah = CawanganLelong::where('caw_id', $cawpindah->id)
->where('fasa', $fasa)
->where('masamula_lelong', NULL)
->first();
// dd($caw_pindah);