|
|
|
|
|
|
|
|
else{ |
|
|
else{ |
|
|
|
|
|
|
|
|
//check the lastest compound number stored in dbase filtered by jenis |
|
|
//check the lastest compound number stored in dbase filtered by jenis |
|
|
$compound = Compound::where('jenis', $jenis)->whereNotNull('kpd')->withTrashed()->latest()->first(); |
|
|
|
|
|
|
|
|
$compound = Compound::where('jenis', $jenis)->where('kpd', '-')->withTrashed()->latest()->first(); |
|
|
|
|
|
|
|
|
//sanitize compound number to return only integer |
|
|
//sanitize compound number to return only integer |
|
|
$num = filter_var($compound['kpd'], FILTER_SANITIZE_NUMBER_INT); |
|
|
$num = filter_var($compound['kpd'], FILTER_SANITIZE_NUMBER_INT); |