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();