`;
});
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:
//
Order ID Date-Time Customer Name Remove Image File Table No. Mobile No. Email Address Remove Data ID Sl. No. Items Rate - Quantity + Remove Amount Rs. Total: 0 Refresh Send to Order Add Item -->
Comments
Post a Comment