feat:(laporan) tambah rekap harian so dan biaya internal dan external
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class LaporanBiayaInternalExternalController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function showLaporanBiayaInternal()
|
||||
{
|
||||
return view('lpj::laporan-biaya.internal');
|
||||
}
|
||||
|
||||
public function showLaporanBiayaExternal()
|
||||
{
|
||||
return view('lpj::laporan-biaya.external');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,55 +13,10 @@ class RekapHarianSoController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$total_laporan_debitur = 0;
|
||||
$tujuan_penilaian = TujuanPenilaian::all();
|
||||
return view('lpj::rekap-harian-so.index', compact('tujuan_penilaian'));
|
||||
return view('lpj::rekap-harian-so.index', compact('tujuan_penilaian', 'total_laporan_debitur'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('lpj::create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('lpj::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('lpj::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
63
app/Services/RekapHarianService.php
Normal file
63
app/Services/RekapHarianService.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user