update
This commit is contained in:
@@ -227,6 +227,7 @@ class LelongController extends Controller
|
||||
$cawangansim = CawanganSimulasi::where('simulasi_id','=',$id)->get();
|
||||
$simkarat = SimKarat::where('simulasi_id','=',$id)->get();
|
||||
|
||||
|
||||
$lelong = new Lelong();
|
||||
$lelong->tarikh_lelong = $simulasi->tarikh_lelong;
|
||||
$lelong->harga_emas_asas = $simulasi->harga_emas_asas;
|
||||
@@ -247,7 +248,17 @@ class LelongController extends Controller
|
||||
|
||||
foreach($cawangansim as $caw)
|
||||
{
|
||||
$cawanganlel = CawanganLelong::where('caw_id','=',$caw->caw_id)->orderBy('id','desc')->first();
|
||||
if($cawanganlel)
|
||||
{
|
||||
$batchno = $cawanganlel->batchlel+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$batchno = 1;
|
||||
}
|
||||
$caw_lelong = new CawanganLelong;
|
||||
$caw_lelong->batchlel = $batchno;
|
||||
$caw_lelong->lelong_id = $lelong->id;
|
||||
$caw_lelong->caw_id = $caw->caw_id;
|
||||
$caw_lelong->online = $caw->online;
|
||||
|
||||
Reference in New Issue
Block a user