This commit is contained in:
Hamza-Ayed
2024-09-11 14:59:13 +03:00
parent 8df852ab66
commit 82298e7c62
2 changed files with 7 additions and 10 deletions

View File

@@ -705,7 +705,7 @@ class MapDriverController extends GetxController {
await Future.delayed(const Duration(seconds: 1));
recentDistanceToDash = Get.find<LocationController>().totalDistance;
// rideTimerFromBegin = i;
if (int.parse(duration) > i) {
if (int.parse(duration) + 300 > i) {
price = double.parse(totalCost);
} else {
if (startNameLocation.toLowerCase().contains('airport') ||
@@ -820,13 +820,10 @@ class MapDriverController extends GetxController {
? (i ~/ 60) *
(Get.find<HomeCaptainController>().latePrice +
.5) +
(recentDistanceToDash *
Get.find<HomeCaptainController>().comfortPrice)
: (i ~/ 60) *
(Get.find<HomeCaptainController>().latePrice +
.5) +
(recentDistanceToDash *
Get.find<HomeCaptainController>().mashwariPrice);
(price) -
int.parse(duration) *
(Get.find<HomeCaptainController>().latePrice + .5)
: price;
} else if (currentTime.hour >= 14 && currentTime.hour <= 17) {
price = carType == 'Comfort' // || carType == 'Free Ride'
? (i ~/ 60) * (Get.find<HomeCaptainController>().heavyPrice) +