@@ -449,7 +449,7 @@ class CompoundResourceController extends BaseController | |||
//compulsory increment to store new compound number, WHILE number is found, keep looping | |||
do{ | |||
dd($num); | |||
dd($compound); | |||
(int)$num += 1; | |||
//add 0s at the fornt if number is less than 1000 |
@@ -892,8 +892,10 @@ class CompoundController extends Controller | |||
$compound = Compound::find($request->_id); | |||
if(!empty($compound)){ | |||
$faulty = Faulty::with('DeedLaw','Department')->where('_id',$request->get('seksyen'))->first(); | |||
$faulty = Faulty::with('DeedLaw','Department')->where('_id',$request->get('seksyen'))->first(); | |||
if(!empty($faulty) && !empty($faulty->Deedlaw) && !empty($faulty->Department)){ | |||
$tarikh_dikeluarkan = new Carbon($request->tarikh_dikeluarkan); | |||
$jalan = CodeMukim::where('_id', $request->namaJalan)->first(); | |||
if($compound->jenis == 'Parkir'){ | |||
@@ -915,7 +917,7 @@ class CompoundController extends Controller | |||
$compound->created_at = new Carbon($request->tarikh_dikeluarkan); | |||
$compound->save(); | |||
return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
// return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
}else if($compound->jenis == 'Pelbagai_KT'){ | |||
$compound->kpd = $request->kpd; | |||
@@ -937,7 +939,8 @@ class CompoundController extends Controller | |||
$compound->created_c = $tarikh_dikeluarkan->toDateTimeString(); | |||
$compound->save(); | |||
return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
// return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
}else if($compound->jenis == 'Pelbagai_JPB'){ | |||
$compound->kpd = $request->kpd; | |||
$compound->butiran_kesalahan = $request->butiran_kesalahan; | |||
@@ -958,8 +961,18 @@ class CompoundController extends Controller | |||
$compound->created_c = $tarikh_dikeluarkan->toDateTimeString(); | |||
$compound->save(); | |||
return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
} | |||
// return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
} | |||
if($compound->modul == '03') | |||
{ | |||
// $this->dispatch(new StoreCompoundEPBT($request->all(), $kpd, $staff->StaffDetail->full_name, $staff->StaffDetail->no_badan, $faulty->nama)); | |||
return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
} | |||
return redirect()->back()->with('success_msg', 'Berjaya kemasikini!'); | |||
}else { | |||
return redirect()->back()->withInput()->with('error_msg', '<strong>Tidak Berjaya!</strong> Rekod seksyen kesalahan tidak ditemui!'); | |||
} |
@@ -10,7 +10,7 @@ use Illuminate\Queue\InteractsWithQueue; | |||
use Illuminate\Contracts\Queue\ShouldQueue; | |||
use Illuminate\Foundation\Bus\Dispatchable; | |||
use Illuminate\Http\Request; | |||
use App\Jobs\Throwable; | |||
use App\SiteSetting; | |||
use App\Model\Staff; | |||
use App\Model\StaffDetail; | |||
@@ -134,42 +134,42 @@ class StoreCompoundEPBT implements ShouldQueue | |||
} | |||
array_push($k, | |||
strtoupper($this->kpd), //no kompaun | |||
$kod_kompaun, //strtoupper($kod_kompaun), //kodKompaun | |||
$compound->Deedlaw->akkod, //kod akta | |||
strtoupper($compound->Faulty->nama), //keterangan kesalahan | |||
$compound->created_at->toDateString(), //tarikh | |||
$compound->created_at->toTimeString(), //masa | |||
14, //tempoh | |||
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman | |||
$roads->JLN_MKKOD, //kodbandar | |||
$jenis_kompaun, //jenis | |||
strtoupper($no_akaun), //no akaun (no plat) | |||
$compound->jumlah_asal_kompaun, //jumlah kompaun | |||
strtoupper($this->no_badan), //no badan | |||
'-', //no pembantu penguatkuasa | |||
strtoupper($this->enf_nama), //nama enforcer | |||
$now, //time created epbt | |||
$compound->Faulty->itkod, //kod kesalahan | |||
strtoupper($nama_pesalah), //nama pesalah | |||
$compound->nama_jalan, //nama jalan - alamat pesalah | |||
$compound->nama_taman, //nama taman - alamat pesalah | |||
'81300', //postcode | |||
$compound->nama_kawasan, //bandar | |||
'JOHOR', //negeri | |||
'B', //notis | |||
'NULL', //notisamaran | |||
$coordinate[0], //latitud | |||
$coordinate[1], //longitud | |||
'-', //device | |||
$no_cukai_jalan, //no cukai jalan | |||
$no_kereta, //no plat | |||
'NULL', //no kupon | |||
$jenis_kereta, //jenis kenderaan | |||
$warna_kenderaan, //warna kenderaan | |||
$no_petak, //no petak parking | |||
$no_petak //kod petak | |||
); | |||
strtoupper($this->kpd), //no kompaun | |||
$kod_kompaun, //strtoupper($kod_kompaun), //kodKompaun | |||
$compound->Deedlaw->akkod, //kod akta | |||
strtoupper($compound->Faulty->nama), //keterangan kesalahan | |||
$compound->created_at->toDateString(), //tarikh | |||
$compound->created_at->toTimeString(), //masa | |||
14, //tempoh | |||
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman | |||
$roads->JLN_MKKOD, //kodbandar | |||
$jenis_kompaun, //jenis | |||
strtoupper($no_akaun), //no akaun (no plat) | |||
$compound->jumlah_asal_kompaun, //jumlah kompaun | |||
strtoupper($this->no_badan), //no badan | |||
'-', //no pembantu penguatkuasa | |||
strtoupper($this->enf_nama), //nama enforcer | |||
$now, //time created epbt | |||
$compound->Faulty->itkod, //kod kesalahan | |||
strtoupper($nama_pesalah), //nama pesalah | |||
$compound->nama_jalan, //nama jalan - alamat pesalah | |||
$compound->nama_taman, //nama taman - alamat pesalah | |||
'81300', //postcode | |||
$compound->nama_kawasan, //bandar | |||
'JOHOR', //negeri | |||
'B', //notis | |||
'NULL', //notisamaran | |||
$coordinate[0], //latitud | |||
$coordinate[1], //longitud | |||
'-', //device | |||
$no_cukai_jalan, //no cukai jalan | |||
$no_kereta, //no plat | |||
'NULL', //no kupon | |||
$jenis_kereta, //jenis kenderaan | |||
$warna_kenderaan, //warna kenderaan | |||
$no_petak, //no petak parking | |||
$no_petak //kod petak | |||
); | |||
$urlQueryString = ''; | |||
@@ -204,7 +204,7 @@ class StoreCompoundEPBT implements ShouldQueue | |||
info("Tidak berjaya simpan rekod kompaun ke epbt!"); | |||
} | |||
} catch (Throwable $e) { | |||
} catch (\Exception $e) { | |||
report($e); | |||
@@ -0,0 +1 @@ | |||
[{"_id":"5f9b9a453686fc242e2d515f","modul":"03","jenis":"Pelbagai_JPB","kpd":"JPB0001","no_plate":null,"nric":"-","no_daftar_syarikat":"test","nama_syarikat":"test","nama":"test jpb","lesen":"-","tarikh_masa":"30/10/2020 12:44:53 PM","faulty_skter":"SEKSYEN 39 (2)","faulty_name":"MEROSAKKAN ATAU MENYEBABKAN KEROSAKKAN KEPADA MANA-MANA JALAN","enforcer":"000000, Test Enforcer","status":"Belum Bayar","kadar_kompaun":"2000","catatan_dari_admin":null,"updated_by":null,"updates_by":null,"tarikh_bayar":null,"amount_payment":"-","created_at":"2020-10-30 12:44:53","updated_at":"2020-10-30 12:44","index":"New","status_kemaskini":"-","kesalahan":"-","DT_RowIndex":1}] |