Add laporan tuntut baki by range date

This commit is contained in:
Amirah
2024-09-02 13:31:09 +08:00
parent 7cd24a0171
commit 1edf6d7617
2 changed files with 16 additions and 2 deletions
+15 -1
View File
@@ -1729,7 +1729,21 @@ class LelongController extends Controller
return $response;
}
public function showTuntutBakiRangeDate($kodcaw,Request $request){
$current = Carbon::now();
$current = new Carbon();
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$tuntutbaki = TuntutBaki::on($cawangan['mysql'])
->where('tarikh','>=',$request->mula)
->where('tarikh','<=',$request->akhir)
->get();
return response()->json($tuntutbaki,200);
}
}