|
|
@@ -442,7 +442,8 @@ class CompoundResourceController extends BaseController |
|
|
|
else{ |
|
|
|
|
|
|
|
//check the lastest compound number stored in dbase filtered by jenis |
|
|
|
$compound = Compound::where('jenis', $jenis)->where('kpd', '-')->withTrashed()->latest()->first(); |
|
|
|
// $compound = Compound::where('jenis', $jenis)->where('kpd', '-')->withTrashed()->latest('created_c')->first(); |
|
|
|
$compound = Compound::where('jenis', $jenis)->withTrashed()->latest('created_c')->first(); |
|
|
|
|
|
|
|
//sanitize compound number to return only integer |
|
|
|
$num = filter_var($compound['kpd'], FILTER_SANITIZE_NUMBER_INT); |