@@ -349,6 +349,15 @@ class CustomerController extends Controller
|
||||
'tujuangadai'=>$request->tujuangadai
|
||||
]);
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "Daftar Pelanggan Baru";
|
||||
$audit->new_data = json_encode($customer);
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
return response()->json($customer, 201);
|
||||
}
|
||||
|
||||
@@ -372,7 +381,8 @@ class CustomerController extends Controller
|
||||
return response()->json($customer_update, 200);
|
||||
}
|
||||
|
||||
public function customerUpdateKaunter($nokp,Request $request){
|
||||
public function customerUpdateKaunter($nokp,$kodcaw, Request $request){
|
||||
$current = Carbon::now();
|
||||
|
||||
DB::connection('mysql7')->beginTransaction();
|
||||
|
||||
@@ -430,6 +440,15 @@ class CustomerController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->namateller;
|
||||
$audit->actions = "Kemaskini Pelanggan";
|
||||
$audit->new_data = json_encode($customer_info_new);
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
DB::connection('mysql7')->commit();
|
||||
|
||||
return response()->json($customer_update, 200);
|
||||
@@ -773,6 +792,16 @@ class CustomerController extends Controller
|
||||
|
||||
$blacklist = Blacklist::where('nokp',$request->nokp)->first();
|
||||
|
||||
|
||||
// $audit = new Audit();
|
||||
// $audit->users = $request->namateller;
|
||||
// $audit->actions = "Senarai Hitam Pelanggan";
|
||||
// $audit->new_data = json_encode($blacklist);
|
||||
// $audit->kodcaw = $kodcaw;
|
||||
// $audit->created_at = $current;
|
||||
// $audit->updated_at = $current;
|
||||
// $audit->save();
|
||||
|
||||
return response()->json($blacklist);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -112,14 +112,14 @@ class PanjarController extends Controller
|
||||
]);
|
||||
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->tuntutoleh;
|
||||
$audit->actions = "Daftar Perbelanjaan";
|
||||
$audit->new_data = $panjar;
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $harini;
|
||||
$audit->updated_at = $harini;
|
||||
$audit->save();
|
||||
// $audit = new Audit();
|
||||
// $audit->users = $request->tuntutoleh;
|
||||
// $audit->actions = "Daftar Perbelanjaan";
|
||||
// $audit->new_data = $panjar;
|
||||
// $audit->kodcaw = $kodcaw;
|
||||
// $audit->created_at = $harini;
|
||||
// $audit->updated_at = $harini;
|
||||
// $audit->save();
|
||||
|
||||
return response()->json($panjar);
|
||||
}
|
||||
@@ -279,8 +279,8 @@ class PanjarController extends Controller
|
||||
public function updateDenoPanjar($kodcaw,Request $request)
|
||||
{
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$harini = Carbon::now();
|
||||
$harini = new Carbon();
|
||||
|
||||
|
||||
$denopanjar=DenoPanjar::on('mysql7')
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -611,6 +611,8 @@ class TebusController extends Controller
|
||||
}
|
||||
|
||||
public function createWakil($kodcaw,$icno,Request $request){
|
||||
$current = Carbon::now();
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$wakil_create = Wakil::on($cawangan['mysql'])->create([
|
||||
@@ -623,15 +625,26 @@ class TebusController extends Controller
|
||||
'hubungan' => $request->hubungan,
|
||||
'alamat1' => $request->alamat,
|
||||
'telefon' => $request->telefon,
|
||||
'teller' => $request->teller,
|
||||
'nota' => $request->nota
|
||||
|
||||
]);
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "Daftar Wakil";
|
||||
$audit->new_data = json_encode($wakil_create);
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
return response()->json($wakil_create ,201);
|
||||
}
|
||||
|
||||
public function UbahWakil($kodcaw,Request $request)
|
||||
{
|
||||
$current = Carbon::now();
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$wakil = $request->nowakil;
|
||||
@@ -640,6 +653,15 @@ class TebusController extends Controller
|
||||
"nowakil" => $wakil
|
||||
));
|
||||
|
||||
// $audit = new Audit();
|
||||
// $audit->users = $request->teller;
|
||||
// $audit->actions = "Ubah Wakil";
|
||||
// $audit->new_data = json_encode($update_wakil);
|
||||
// $audit->kodcaw = $kodcaw;
|
||||
// $audit->created_at = $current;
|
||||
// $audit->updated_at = $current;
|
||||
// $audit->save();
|
||||
|
||||
return response()->json($update_wakil ,201);
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,15 @@ class VaultController extends Controller
|
||||
'teller' => 'ONLINE'
|
||||
]);
|
||||
|
||||
// $audit = new Audit();
|
||||
// $audit->users = $request->teller;
|
||||
// $audit->actions = "Daftar Peti Besi";
|
||||
// $audit->new_data = json_encode($gldetail);
|
||||
// $audit->kodcaw = $kodcaw;
|
||||
// $audit->created_at = $current;
|
||||
// $audit->updated_at = $current;
|
||||
// $audit->save();
|
||||
|
||||
return response()->json($gldetail,201);
|
||||
|
||||
}
|
||||
@@ -319,6 +328,19 @@ class VaultController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->teller;
|
||||
if (isset($request->jenisgldetail) && $request->jenisgldetail == 'pendahuluan') {
|
||||
$audit->actions = 'Daftar Pendahuluan';
|
||||
} else if (isset($request->jenisgldetail) && $request->jenisgldetail == 'serahan') {
|
||||
$audit->actions = 'Daftar Serahan';
|
||||
}
|
||||
$audit->new_data = json_encode($gldetail);
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
$audit->save();
|
||||
|
||||
|
||||
return response()->json($gldetail,201);
|
||||
|
||||
@@ -328,16 +350,16 @@ class VaultController extends Controller
|
||||
{
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$gldetail=GlDetail::on($cawangan['mysql'])
|
||||
->where('kodcaw','=',$kodcaw)
|
||||
->orderby('tarikh','desc')->get();
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->teller;
|
||||
$audit->actions = "test3";
|
||||
$audit->new_data = $gldetail;
|
||||
$audit = new Audit();
|
||||
// $audit->users = $request->input('teller');
|
||||
$audit->users = $request->name;
|
||||
$audit->actions = "Senarai Peti Besi";
|
||||
$audit->new_data = json_encode($gldetail);
|
||||
$audit->kodcaw = $kodcaw;
|
||||
$audit->created_at = $current;
|
||||
$audit->updated_at = $current;
|
||||
|
||||
@@ -189,7 +189,7 @@ class PanjarServices
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $panjar['tuntutoleh'];
|
||||
$audit->actions = "Keluarkan Perbelanjaan";
|
||||
$audit->actions = "Hapus Perbelanjaan";
|
||||
$audit->new_data = $panjar;
|
||||
$audit->kodcaw = $this->cawangan;
|
||||
$audit->created_at = $current;
|
||||
@@ -337,7 +337,7 @@ class PanjarServices
|
||||
));
|
||||
|
||||
$audit = new Audit();
|
||||
$audit->users = $request->tuntutoleh;
|
||||
$audit->users = $panjar['tuntutoleh'];
|
||||
$audit->actions = "Daftar Perbelanjaan";
|
||||
$audit->new_data = $panjar;
|
||||
$audit->kodcaw = $this->cawangan;
|
||||
|
||||
+2
-1
@@ -52,7 +52,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
||||
$router->post('customers/create/{kodcaw}',['uses'=>'CustomerController@createCustomer']);
|
||||
$router->delete('customers/{kodcaw}/{nokp}', ['uses' => 'CustomerController@delete']);
|
||||
$router->put('customers/update/{nokp}', ['uses' => 'CustomerController@customerUpdate']);
|
||||
$router->put('customers/update/kaunter/{nokp}', ['uses' => 'CustomerController@customerUpdateKaunter']);
|
||||
$router->put('customers/update/kaunter/{nokp}/{kodcaw}', ['uses' => 'CustomerController@customerUpdateKaunter']);
|
||||
$router->put('customers/update/khazanah/{nokp}', ['uses' => 'CustomerController@customerUpdateKhazanah']);
|
||||
$router->get('customers/laporan/{kodcaw}/{tarikh}',['uses'=>'CustomerController@getLaporanCustomers']);
|
||||
$router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
|
||||
@@ -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