fix imbang duga akru for keuntungan penggadai and added fix of previous imbang duga

This commit is contained in:
Hafifie PKB
2024-04-01 22:06:12 +08:00
parent 3be2247cb0
commit 13890767dd
7 changed files with 493 additions and 10 deletions
@@ -10,10 +10,10 @@ use Illuminate\Http\Request;
class OnePercentController extends Controller
{
public function getKeuntunganImbangDuga(string $kod_cawangan)
public function getKeuntunganImbangDuga(string $kod_cawangan,Request $request)
{
$reports = new ReportOne($kod_cawangan);
$response = $reports->getTotalKeuntungan('B');
$response = $reports->getTotalKeuntungan('B',$request->tarikh);
return response()->json($response);
}
@@ -67,4 +67,25 @@ class OnePercentController extends Controller
return response()->json($totalrebate);
}
public function getAccruedincome(Request $request){
$reports = new ReportOne($request->kodcaw);
$response = $reports->calculateAccruedIncome($request);
return response()->json($response);
}
public function getAllCawanganAccruedIncome(Request $request){
$reports = new ReportOne($request->kodcaw);
$response = $reports->getAllCawanganAccruedIncome($request);
return response()->json($response);
}
public function getCurrentProfit($kod_cawangan,Request $request){
$reports = new ReportOne($kod_cawangan);
$response = $reports->CurrentProfit($request->mula,$request->hingga,$kod_cawangan);
return response()->json($response);
}
}