<?php

namespace Modules\Lpj\Services;

class RekapHarianService
{
    public function getRekapHarian()
    {
        // return $id;
    }

    public function totalLaporan()
    {
        $jenis_penilaian = JenisPenilaian::all();
        $laporan = [];
        $grandTotal = [];

        foreach ($jenis_penilaian as $index => $jenis) {

            $totalLaporanDebiture = $this->totalLaporanDebiture();
            $totalKunjunganDebiture = $this->totalKunjunganDebiture();
            $totalKunjunganLokasi = $this->totalKunjunganLokasi();


            $grandTotal = [
                'laporan_debiture' => 0,
                'debiture' => 0,
                'lokasi' => 0,
                'pipeline' => 0
            ];
        }
        return $grandTotal;

    }


    private function totalLaporanDebiture()
    {
        $query = [
            'jenis_penilaian_id' => 1,
            'total' => 2
        ];
        return $query;
    }

    public function totalKunjunganDebiture()
    {
        $query = [
          'jenis_penilaian_id' => 1,
          'total' => 2
        ];
        return $query;
    }

    public function totalKunjunganLokasi()
    {
        $query = [
          'jenis_penilaian_id' => 1,
          'total' => 2
        ];
        return $query;
    }
}
