Update: 2026-07-06 02:04:01

This commit is contained in:
Hamza-Ayed
2026-07-06 02:04:01 +03:00
parent 41746c844f
commit 8d9126bb45
3 changed files with 26 additions and 16 deletions
+16 -8
View File
@@ -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,
+6 -4
View File
@@ -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);
+4 -4
View File
@@ -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;