diff --git a/app/Http/Controllers/DashboardBoDController.php b/app/Http/Controllers/DashboardBoDController.php index af68816..70bb309 100644 --- a/app/Http/Controllers/DashboardBoDController.php +++ b/app/Http/Controllers/DashboardBoDController.php @@ -350,8 +350,9 @@ class DashboardBoDController extends Controller public function getDetailExpenditure($year = '%') { $year = $this->interpolateYear($year); - $projects = Project::where('mulai_proyek', 'like', $year) - /* ->orWhere('akhir_proyek', 'like', $year) */ + $projects = Project::select('m_proyek.*', 'md.name as divisi_name') + ->where('mulai_proyek', 'like', $year) + ->join('m_divisi as md', 'md.id', '=', 'm_proyek.divisi_id') ->orderBy('id', 'desc') ->get(); foreach ($projects as $project) { diff --git a/app/Models/Project.php b/app/Models/Project.php index 1e575d6..2721944 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -15,6 +15,7 @@ class Project extends Model 'kode_sortname', 'jumlah_stakeholder', 'nama', + 'nickname', 'mulai_proyek', 'akhir_proyek', 'area_kerja',