add imbang duga api and lejeram api and fix round down
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user