From 6a8f33fcc9e82d0dd74eba176ffa8b350cfa2825 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 3 Apr 2026 10:23:05 +0000 Subject: [PATCH] update main.js --- admin/order_view.php | 4 ++-- api/order.php | 8 ++++---- assets/js/main.js | 2 +- kitchen.php | 2 +- patch.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/order_view.php b/admin/order_view.php index f747b8e..7925c51 100644 --- a/admin/order_view.php +++ b/admin/order_view.php @@ -502,11 +502,11 @@ function printThermalReceipt() { Type: ${data.orderType.toUpperCase()} ${tr['Type']}: ${tr[data.orderType] || data.orderType} - ${data.source ? \` + ${data.source ? `
Source: ${data.source.toUpperCase()} ${tr['Source'] || "Source"}: ${data.source.toUpperCase()} -
\` : ""} + ` : ""}
Date: ${data.date} ${tr['Date']}: ${data.date} diff --git a/api/order.php b/api/order.php index 94f22e6..0a3ad0d 100644 --- a/api/order.php +++ b/api/order.php @@ -92,7 +92,7 @@ try { if ($existing) { $customer_id = $existing['id']; } else { - $stmt = $pdo->prepare("INSERT INTO customers (name, phone) VALUES (?, ?, ?)"); + $stmt = $pdo->prepare("INSERT INTO customers (name, phone) VALUES (?, ?)"); $stmt->execute([$customer_name, $customer_phone]); $customer_id = $pdo->lastInsertId(); } @@ -254,7 +254,7 @@ try { ->execute([$redemptions_done, $customer_id]); // Record Loyalty History (Deduction) - $historyStmt = $pdo->prepare("INSERT INTO loyalty_points_history (customer_id, points_change, reason) VALUES (?, ?, ?, 'Redeemed Free Product(s)')"); + $historyStmt = $pdo->prepare("INSERT INTO loyalty_points_history (customer_id, points_change, reason) VALUES (?, ?, 'Redeemed Free Product(s)')"); $historyStmt->execute([$customer_id, -$points_deducted]); $redeem_history_id = $pdo->lastInsertId(); @@ -293,7 +293,7 @@ try { $awardStmt->execute([$points_awarded, $customer_id]); // Record Loyalty History (Award) - $historyStmt = $pdo->prepare("INSERT INTO loyalty_points_history (customer_id, points_change, reason) VALUES (?, ?, ?, 'Earned from Products')"); + $historyStmt = $pdo->prepare("INSERT INTO loyalty_points_history (customer_id, points_change, reason) VALUES (?, ?, 'Earned from Products')"); $historyStmt->execute([$customer_id, $points_awarded]); $award_history_id = $pdo->lastInsertId(); } @@ -371,7 +371,7 @@ try { } // Insert Items and Update Stock - $item_stmt = $pdo->prepare("INSERT INTO order_items (order_id, product_id, product_name, variant_id, variant_name, quantity, unit_price, vat_percent, vat_amount) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + $item_stmt = $pdo->prepare("INSERT INTO order_items (order_id, product_id, product_name, variant_id, variant_name, quantity, unit_price, vat_percent, vat_amount) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stock_stmt = $pdo->prepare("UPDATE products SET stock_quantity = stock_quantity - ? WHERE id = ?"); $order_items_list = []; diff --git a/assets/js/main.js b/assets/js/main.js index b4aae23..5325a51 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -941,7 +941,7 @@ document.addEventListener('DOMContentLoaded', () => {
Order: #${data.orderId}${tr['Order']}: #${data.orderId}
Type: ${data.orderType.toUpperCase()}${tr['Type']}: ${tr[data.orderType] || data.orderType}
- ${data.source ? \`
Source: ${data.source.toUpperCase()}${tr['Source'] || "Source"}: ${data.source.toUpperCase()}
\` : ""} + ${data.source ? `
Source: ${data.source.toUpperCase()}${tr['Source'] || "Source"}: ${data.source.toUpperCase()}
` : ""}
Date: ${data.date}${tr['Date']}: ${data.date}
Staff: ${CURRENT_USER.name}${tr['Staff']}: ${CURRENT_USER.name}
diff --git a/kitchen.php b/kitchen.php index 77d83cb..ae8f3b3 100644 --- a/kitchen.php +++ b/kitchen.php @@ -282,7 +282,7 @@ function renderOrders(orders) {
- ${order.order_type === 'dine-in' ? \`Table ${order.table_number}\` : order.order_type.toUpperCase()} + ${order.order_type === 'dine-in' ? `Table ${order.table_number}` : order.order_type.toUpperCase()}
${order.source ? order.source.toUpperCase() : "POS"} ${order.customer_name ? `
${order.customer_name}` : ''} ${order.car_plate ? `
${order.car_plate}` : ''} diff --git a/patch.php b/patch.php index 8b13789..38cf5f2 100644 --- a/patch.php +++ b/patch.php @@ -1 +1 @@ - +