Update: 2026-08-02 17:52:28
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
// food/order/status.php — حالة الطلب الحالية (مصدر الحقيقة عند إعادة الاتصال بالسوكيت)
|
||||
require_once __DIR__ . '/../connect_app.php';
|
||||
|
||||
$orderId = filterRequest('order_id', 'int');
|
||||
if (!$orderId) jsonError('order_id is required');
|
||||
|
||||
$order = foodAssertOrderOwnership($orderId, 'customer', $food_passenger_id);
|
||||
|
||||
$itemsSt = $food_con->prepare("SELECT name_ar_snapshot, unit_price, quantity, line_total FROM food_order_items WHERE order_id=?");
|
||||
$itemsSt->execute([$orderId]);
|
||||
$order['items'] = $itemsSt->fetchAll();
|
||||
|
||||
// عناوين/أرقام الزبون تُحجب عن السائق قبل courier_assigned وبعد delivered — هنا هي بوابة الزبون نفسه فلا حجب
|
||||
jsonSuccess(['order' => $order]);
|
||||
Reference in New Issue
Block a user