44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Reports;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\Reports\OnePercentService as ReportOne;
|
|
use Illuminate\Http\Request;
|
|
|
|
class OnePercentController extends Controller
|
|
{
|
|
|
|
public function getKeuntunganImbangDuga(string $kod_cawangan)
|
|
{
|
|
$reports = new ReportOne($kod_cawangan);
|
|
$response = $reports->getTotalKeuntungan('B');
|
|
|
|
return response()->json($response);
|
|
}
|
|
|
|
public function getUjrahImbangDuga(string $kod_cawangan)
|
|
{
|
|
$reports = new ReportOne($kod_cawangan);
|
|
$response = $reports->getTotalUjrah('B');
|
|
|
|
return response()->json($response);
|
|
}
|
|
|
|
public function getKeuntunganLejerAm(string $kod_cawangan,Request $request)
|
|
{
|
|
$reports = new ReportOne($kod_cawangan);
|
|
$response = $reports->getTotalKeuntungan('L',$request->mula,$request->hingga);
|
|
|
|
return response()->json($response);
|
|
}
|
|
|
|
public function getUjrahLejerAm(string $kod_cawangan,Request $request)
|
|
{
|
|
$reports = new ReportOne($kod_cawangan);
|
|
$response = $reports->getTotalUjrah('L',$request->mula,$request->hingga);
|
|
|
|
return response()->json($response);
|
|
}
|
|
}
|