feat audit sag hilang and tuntut baki
This commit is contained in:
@@ -94,19 +94,6 @@ class LelongController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "test2";
|
||||
// $audit->new_data = $bakilelongtotal;
|
||||
$audit->new_data = json_encode([
|
||||
'bakilelongtotal' => $bakilelongtotal,
|
||||
'rugilelongtotal' => $rugilelongtotal,
|
||||
]);
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
|
||||
return response()->json($bakilelongtotal, 200);
|
||||
|
||||
@@ -411,6 +398,16 @@ class LelongController extends Controller
|
||||
'hargajual' => $request->hargajual
|
||||
]);
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->norujukan = $request->norujukan;
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "Tuntut Baki Lelong";
|
||||
$audit->new_data = null;
|
||||
$audit->kodcaw = $request->kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
return response()->json($tuntutbaki,200);
|
||||
}
|
||||
|
||||
@@ -485,8 +482,9 @@ class LelongController extends Controller
|
||||
return response()->json($tuntutbaki,200);
|
||||
}
|
||||
|
||||
public function resitLelong($kodcaw,$norujukan){
|
||||
public function resitLelong(Request $request, $kodcaw,$norujukan){
|
||||
|
||||
$current = Carbon::now();
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
@@ -499,12 +497,23 @@ class LelongController extends Controller
|
||||
->first();
|
||||
|
||||
$customerinfo = Customer::on('mysql7')
|
||||
->select('nama','kpbaru')
|
||||
->select('nama','kpbaru','teller')
|
||||
->where('kpbaru', $lelong['nokp'])
|
||||
->orWhere('kplama', $lelong['nokp'])
|
||||
->first();
|
||||
|
||||
$arraycustomer = ['nama' => $customerinfo['nama'],'kpbaru' => $customerinfo['kpbaru'],'nokp' => $lelong['nokp'],'batchno' => $lelong['batchno'],'nowakil' => $lelong['nowakil'],'tarikh' => $lelong['tarikh'],'bakipjm' => $lelong['bakipjm'],'bakiupah' => $lelong['bakiupah'],'recno' => $lelong['recno'],'t_lelong' => $lelong['t_lelong'],'norujukan' => $lelong['norujukan'],'hargajual' => $lelong['hargajual'],'jumlah' => $lelong['jumlah'],'cajlelong' => $lelong['cajlelong'],'pinjaman' => $lelong['pinjaman']];
|
||||
$arraycustomer = ['nama' => $customerinfo['nama'],'teller' => $customerinfo['teller'],'kpbaru' => $customerinfo['kpbaru'],'nokp' => $lelong['nokp'],'batchno' => $lelong['batchno'],'nowakil' => $lelong['nowakil'],'tarikh' => $lelong['tarikh'],'bakipjm' => $lelong['bakipjm'],'bakiupah' => $lelong['bakiupah'],'recno' => $lelong['recno'],'t_lelong' => $lelong['t_lelong'],'norujukan' => $lelong['norujukan'],'hargajual' => $lelong['hargajual'],'jumlah' => $lelong['jumlah'],'cajlelong' => $lelong['cajlelong'],'pinjaman' => $lelong['pinjaman']];
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->norujukan = $norujukan;
|
||||
$audit->users = $request->name;
|
||||
// $audit->users = $arraycustomer['teller'];
|
||||
$audit->actions = "Cetak Resit Lelong";
|
||||
$audit->new_data = null;
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
return response()->json($arraycustomer,200);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Audit;
|
||||
use App\Polis;
|
||||
use App\Cawangan;
|
||||
use App\LookupAlasan;
|
||||
@@ -53,11 +54,38 @@ class PolisController extends Controller
|
||||
'kodnegeri' => $request->kodnegeri,
|
||||
'koddaerah' => $request->koddaerah
|
||||
]);
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->norujukan = $request->norujukan;
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "Cetak SAG Hilang";
|
||||
$audit->new_data = json_encode($polis);
|
||||
$audit->kodcaw = $request->kodcaw;
|
||||
$audit->created_at = $harini;
|
||||
$audit->updated_at = $harini;
|
||||
$audit->save();
|
||||
|
||||
return response()->json($polis);
|
||||
|
||||
}
|
||||
|
||||
public function ulangcetakPolis(Request $request){
|
||||
|
||||
$harini = new Carbon();
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->norujukan = $request->norujukan;
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "Ulang Cetak SAG Hilang";
|
||||
$audit->new_data = null;
|
||||
$audit->kodcaw = $request->kodcaw;
|
||||
$audit->created_at = $harini;
|
||||
$audit->updated_at = $harini;
|
||||
$audit->save();
|
||||
|
||||
return response()->json($audit);
|
||||
}
|
||||
|
||||
public function editPolis(Request $request)
|
||||
{
|
||||
$harini = Carbon::now();
|
||||
|
||||
@@ -304,6 +304,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
||||
$router->put('polis/put/',['uses'=>'PolisController@PolischangeTebus']);
|
||||
$router->post('polis/create/',['uses'=>'PolisController@createPolis']);
|
||||
$router->put('polis/edit/',['uses'=>'PolisController@editPolis']);
|
||||
$router->put('polis/agh/',['uses'=>'PolisController@ulangcetakPolis']);
|
||||
|
||||
|
||||
//LAPORAN API
|
||||
|
||||
Reference in New Issue
Block a user