Merge branch 'bug#ringkasanterkumpul' into 'master'

add lejeram wang tak dituntut

See merge request online-sistem1/api_arrahn!192
This commit is contained in:
hafifie rahman
2023-05-16 07:35:42 +00:00
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 --//