Update: 2026-07-06 02:13:27

This commit is contained in:
Hamza-Ayed
2026-07-06 02:13:28 +03:00
parent ac50598ee0
commit 6dccb63178
+21 -3
View File
@@ -44,14 +44,17 @@ $hour = (int)$currentTime->format('H');
switch ($country) {
case 'Syria':
$minFare = 150.0;
case 'SY':
$minFare = 14500.0;
$promoMaxDiscount = 30.0;
break;
case 'Egypt':
case 'EG':
$minFare = 20.0;
$promoMaxDiscount = 25.0;
break;
case 'Jordan':
case 'JO':
$minFare = 1.0;
$promoMaxDiscount = 0.30;
break;
@@ -215,9 +218,24 @@ function calculateDynamicPrice($country, $minFare, $distance, $duration, $kazanR
$totalMinutes = floor($duration / 60);
$airportCtx = (stripos($startNameAddress, 'airport') !== false || stripos($startNameAddress, 'مطار') !== false || stripos($endNameAddress, 'airport') !== false || stripos($endNameAddress, 'مطار') !== false);
// === Queen Alia Airport (Amman) Bounding Box ===
$ammNorthLat = 31.745;
$ammSouthLat = 31.700;
$ammEastLng = 36.015;
$ammWestLng = 35.970;
$airportCtx = false;
$clubCtx = (stripos($startNameAddress, 'club') !== false || stripos($startNameAddress, 'ديسكو') !== false || stripos($endNameAddress, 'club') !== false || stripos($endNameAddress, 'ديسكو') !== false);
if ($isJordan) {
if (($destLat <= $ammNorthLat && $destLat >= $ammSouthLat && $destLng <= $ammEastLng && $destLng >= $ammWestLng) ||
($passengerLat <= $ammNorthLat && $passengerLat >= $ammSouthLat && $passengerLng <= $ammEastLng && $passengerLng >= $ammWestLng)) {
$airportCtx = true;
}
} else if ($isEgypt) {
$airportCtx = (stripos($startNameAddress, 'airport') !== false || stripos($startNameAddress, 'مطار') !== false || stripos($endNameAddress, 'airport') !== false || stripos($endNameAddress, 'مطار') !== false);
}
$northLat = 33.415313;
$southLat = 33.400265;
$eastLng = 36.531505;