update taglel
This commit is contained in:
@@ -469,23 +469,24 @@ class MarhunController extends Controller
|
||||
->select('pengesahan.id as pengesahan_id')
|
||||
->first();
|
||||
|
||||
if($pengesahan != null)
|
||||
{
|
||||
$lelongbidmarhun->delete();
|
||||
}
|
||||
|
||||
|
||||
$marhun = LelongBidMarhun::join('lelongbid', 'lelongbidmarhun.lelongbid_id', '=', 'lelongbid.id')
|
||||
->where('lelongbid_id','=',$lelongbid_id)
|
||||
->get();
|
||||
|
||||
|
||||
$lelongbid = LelongBid::where('id', $lelongbid_id)->first();
|
||||
$txtmarhun = ",1 " . $lelongbidmarhun->marhun ;
|
||||
$lelongbid->marhun = str_replace( $txtmarhun,"",$lelongbid->marhun);
|
||||
$lelongbid->berat = $lelongbid->berat - $lelongbidmarhun->berat_emastambahan;
|
||||
$lelongbid->hargaasas = $lelongbid->hargaasas - $lelongbidmarhun->harga_asastambahan;
|
||||
$lelongbid->save();
|
||||
|
||||
if($pengesahan != null)
|
||||
{
|
||||
$lelongbidmarhun->delete();
|
||||
}
|
||||
|
||||
$marhundelete = LelongBidMarhun::where('lelongbid_id', $pengesahan->lelongbid_id)->delete();
|
||||
$marhundelete = LelongBidMarhun::where('lelongbid_id', $pengesahan->lelongbid_id)->delete();
|
||||
|
||||
// return redirect()->route('pengesahan.perubahanmutumarhun')
|
||||
// ->with('success','Pengesahan Padam Marhun Telah Berjaya');
|
||||
|
||||
Reference in New Issue
Block a user