add lejeram wang tak dituntut

This commit is contained in:
hafifierahman
2023-05-16 15:33:10 +08:00
parent 0e616ad89a
commit d630ccb64c
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -482,6 +482,19 @@ class LelongController extends Controller
return response()->json($wtd,200);
}
public function calculationwtdLejer($kodcaw,Request $request)
{
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$wtd = WTD::on($cawangan['mysql'])
->where('tarikh','>=', $request->mula)
->where('tarikh','<=', $request->hingga)
->sum('wtd');
return response()->json($wtd,200);
}
public function calculationserahbaki($kodcaw,Request $request)
{
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
+1
View File
@@ -505,6 +505,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
$router->get('CalculationPanjarLejer/{kodcaw}',['uses'=>'PanjarController@calculationpanjarLejer']);
$router->get('BakiLelongCalculationLejer/{kodcaw}',['uses'=>'LelongController@BakiLelongCalculationLejer']);
$router->get('KeuntunganSebenarLejer/{kodcaw}',['uses'=>'TebusController@calculationKeuntunganSebenarLejer']);
$router->get('WTDLejer/{kodcaw}',['uses'=>'LelongController@calculationwtdLejer']);
// //-- Untung Rugi --//