update
This commit is contained in:
@@ -1425,10 +1425,23 @@ class TebusController extends Controller
|
||||
|
||||
public function removeUpahLamaToday($kodcaw,$norujukan)
|
||||
{
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$data_ansuran = Advansur::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->first();
|
||||
$removed = Advansur::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->delete();
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "Hapus Upah";
|
||||
$audit->norujukan = $norujukan;
|
||||
$audit->old_data = $data_ansuran;
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
if($removed)
|
||||
return response(1);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user