`;
});
updateTotal();
}
function changeQty(index, delta) {
selectedItems[index].qty = Math.max(1, selectedItems[index].qty + delta);
localStorage.setItem("selectedItems", JSON.stringify(selectedItems));
renderTable();
}
function removeItem(index) {
selectedItems.splice(index, 1);
localStorage.setItem("selectedItems", JSON.stringify(selectedItems));
renderTable();
}
function updateTotal() {
const total = selectedItems.reduce((sum, item) => sum + item.qty * item.rate, 0);
const totalEl = document.getElementById("totalAmount");
if (totalEl) totalEl.textContent = total.toFixed(2);
}
// ✅ Close Selected Items Table
function closeSelectedItemsTable() {
if (window.opener) {
window.close();
} else {
const tableDiv = document.getElementById('selectedItemsTableOuter');
if (tableDiv) tableDiv.style.display = 'none';
}
}
// ✅ Open Customer Details Form
function openCoustomerDetailsForm() {
window.open(
"https://kitchen-king-ii.blogspot.com/2025/08/customer-table-input-form-date-time.html#customerTableInputFormOuter",
"_blank",
"width=1000,height=700,scrollbars=yes,resizable=yes"
);
}
// ✅ Open Order Form
function openOrderForm() {
window.open(
"https://kitchen-king-ii.blogspot.com/2025/08/order-form.html#orderFormOuter",
"_blank",
"width=1000,height=700,scrollbars=yes,resizable=yes"
);
}
// ❌❌ start for source page, On load of source page data collect
// ❌ end Direct (data in popup) functions for your specific source pages from the active page:
//
Duel code page Edit link . Order Form Customer Details Section 🔽 Order ID: Select Table: -- Select Table -- F-1 F-2 F-3 F-4 Mobile No. Customer Name Email Address Save Customer Details Item Details Section Select Item: -- Choose an item -- Green Salad Onion Salad Chicken Curry Paneer Butter Masala Rate: Quantity: − + Save Item Open Selected Items Back /* =============================== SECTION 6 — Handle Table & Customer Info Submission =============================== */ // Auto fill Order ID + DateTime window.onload = function () { const now = new Date(); const formatted = now.toISOString().slice...
Comments
Post a Comment