change recent

This commit is contained in:
hafifierahman
2021-01-12 11:46:12 +08:00
parent 80274522b3
commit 7ae83966f7
9 changed files with 213 additions and 7 deletions
+25
View File
@@ -79,6 +79,31 @@ class MarhunController extends Controller
return response('Deleted Successfully', 200);
}
public function deletemarhun($kodcaw,$norujukan,Request $request)
{
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$jemas = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->delete();
return response('Deleted Successfully', 200);
}
public function editmarhun($kodcaw,$norujukan,Request $request)
{
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$jemas = Marhun::on($cawangan['mysql'])->where([['recno','=',$request->recno],['norujukan','=',$norujukan]])->update(
[
'karat' => $request->karat,
'berat' => $request->berat,
'harga' => $request->harga,
'n_marhun' => $request->n_marhun
]);
return response('Edit Successfully', 200);
}
public function getLaporanMarhunHarian($kodcaw,$tarikh){
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();