From 8d9126bb45efdf6e0b48b5fc40699da1ae10ce90 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Mon, 6 Jul 2026 02:04:01 +0300 Subject: [PATCH] Update: 2026-07-06 02:04:01 --- backend/bot/cron_ai_engine.php | 24 ++++++++++++++++-------- backend/bot/update_jordan_kazan.php | 10 ++++++---- backend/ride/pricing/get.php | 8 ++++---- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/backend/bot/cron_ai_engine.php b/backend/bot/cron_ai_engine.php index c5c58d87..375ceef3 100644 --- a/backend/bot/cron_ai_engine.php +++ b/backend/bot/cron_ai_engine.php @@ -74,9 +74,9 @@ try { // أسعار الدقائق if ($country === 'JO') { - $newNormalMin = 0.06; - $newPeakMin = 0.07; - $newLateMin = 0.08; + $newNormalMin = 0.05; + $newPeakMin = 0.06; + $newLateMin = 0.05; } else { $newNormalMin = round($newSpeedPrice / 4, 3); $newPeakMin = round($newNormalMin * 1.15, 3); @@ -86,20 +86,28 @@ try { $updateSql = "UPDATE kazan SET speedPrice = :speedPrice, comfortPrice = :comfortPrice, - familyPrice = :ladyPrice, + ladyPrice = :ladyPrice, + electricPrice = :electricPrice, + vanPrice = :vanPrice, deliveryPrice = :deliveryPrice, - freePrice = :mishwarVipPrice, - naturePrice = :normalMin, - heavyPrice = :peakMin, - latePrice = :lateMin + mishwarVipPrice = :mishwarVipPrice, + fixedPrice = :fixedPrice, + awfarPrice = :awfarPrice, + normalMinPrice = :normalMin, + peakMinPrice = :peakMin, + lateMinPrice = :lateMin WHERE country = :countryName"; $upStmt = $con->prepare($updateSql); $upStmt->execute([ ':speedPrice' => $newSpeedPrice, ':comfortPrice' => $newComfortPrice, ':ladyPrice' => $newLadyPrice, + ':electricPrice' => $newElectricPrice, + ':vanPrice' => $newVanPrice, ':deliveryPrice' => $newDeliveryPrice, ':mishwarVipPrice' => $newMishwarVipPrice, + ':fixedPrice' => $newFixedPrice, + ':awfarPrice' => $newAwfarPrice, ':normalMin' => $newNormalMin, ':peakMin' => $newPeakMin, ':lateMin' => $newLateMin, diff --git a/backend/bot/update_jordan_kazan.php b/backend/bot/update_jordan_kazan.php index 6f87defe..0d9360c6 100644 --- a/backend/bot/update_jordan_kazan.php +++ b/backend/bot/update_jordan_kazan.php @@ -17,10 +17,12 @@ echo "Updating Kazan pricing for Jordan...\n"; // Update the kazan table where country is Jordan $sql = "UPDATE kazan - SET speedPrice = '0.25', - naturePrice = '0.05', - heavyPrice = '0.06', - latePrice = '0.05' + SET speedPrice = '0.22', + fixedPrice = '0.22', + awfarPrice = '0.19', + normalMinPrice = '0.05', + peakMinPrice = '0.06', + lateMinPrice = '0.05' WHERE country = 'Jordan' OR country = 'JO'"; $stmt = $con->prepare($sql); diff --git a/backend/ride/pricing/get.php b/backend/ride/pricing/get.php index 54336bbb..c735e863 100644 --- a/backend/ride/pricing/get.php +++ b/backend/ride/pricing/get.php @@ -161,10 +161,10 @@ function calculateDynamicPrice($country, $minFare, $distance, $duration, $kazanR } catch (Exception $e) {} } - $naturePrice = (float) ($kazanRow['naturePrice'] ?? 0); - $heavyPrice = (float) ($kazanRow['heavyPrice'] ?? 0); - $latePrice = (float) ($kazanRow['latePrice'] ?? 0); - $kazanPercent = (float) ($kazanRow['kazan'] ?? 10); + $naturePrice = (float) ($kazanRow['normalMinPrice'] ?? 0); + $heavyPrice = (float) ($kazanRow['peakMinPrice'] ?? 0); + $latePrice = (float) ($kazanRow['lateMinPrice'] ?? 0); + $kazanPercent = (float) ($kazanRow['kazanPercent'] ?? 10); // === General Settings === $minBillableKm = 0.2;