| @@ -297,10 +297,16 @@ class CompoundController extends Controller | |||
| public function viewCompoundHistoryDetail($kpd){ | |||
| $id = Auth::guard('sadmin')->id(); | |||
| $user = Staff::with('StaffDetail')->find($id); | |||
| $compound = Compound::with('ConfidentialFile')->where('kpd',$kpd)->first(); | |||
| if(empty($compound)) | |||
| { | |||
| $kpd = (int)$kpd; | |||
| $compound = Compound::with('ConfidentialFile')->where('kpd',$kpd)->first(); | |||
| } | |||
| $file = ConfidentialFile::with('History','History.SubHistory')->where('no_siri',$compound->ConfidentialFile->no_siri)->first(); | |||
| $role = Roles::where('kod',$file->modul)->first(); | |||
| $site = SiteSetting::first(); | |||