{"id":65,"date":"2025-08-27T15:10:10","date_gmt":"2025-08-27T15:10:10","guid":{"rendered":"https:\/\/breakfasthouse.sabpro.in\/?page_id=65"},"modified":"2025-08-27T15:44:54","modified_gmt":"2025-08-27T15:44:54","slug":"booking","status":"publish","type":"page","link":"https:\/\/breakfasthouse.sabpro.in\/?page_id=65","title":{"rendered":"booking"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>Chodhary Restaurant &#8211; Order &#038; Payment<\/title>\n<style>\nbody { font-family: Arial, sans-serif; background: #fff8f0; margin: 0; padding: 0; }\n.container { max-width: 950px; margin: auto; padding: 20px; }\n.header { text-align: center; color: #ff6f00; font-size: 28px; font-weight: bold; margin-bottom: 20px; }\n.menu-section { border: 2px solid #ff6f00; margin-bottom: 20px; padding: 15px; border-radius: 10px; background: #fff3e0; }\n.menu-section h2 { color: #ff6f00; margin-bottom: 10px; border-bottom: 1px dotted #ccc; padding-bottom: 5px; }\n.menu-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }\n.menu-item input[type=\"number\"] { width: 60px; padding: 4px; }\n.customer-details, .hotel-details { border: 2px solid #ff6f00; padding: 15px; border-radius: 10px; margin-bottom: 20px; background: #fff3e0; }\n.customer-details h3, .hotel-details h3 { margin-bottom: 10px; color: #ff6f00; }\n.customer-details input[type=\"text\"], .customer-details input[type=\"tel\"], .customer-details input[type=\"email\"] { width: 100%; padding: 8px; margin-bottom: 10px; }\n.hotel-details p { margin: 5px 0; }\n.file-preview { margin-bottom: 10px; display: flex; gap: 10px; }\n.file-preview img { width: 80px; height: 80px; object-fit: cover; border: 1px solid #ccc; border-radius: 5px; }\n.total-section { text-align: right; font-size: 20px; font-weight: bold; margin-bottom: 20px; }\n.payment-section { text-align: center; border: 2px dashed #ff6f00; padding: 20px; border-radius: 10px; background: #fff3e0; margin-bottom: 20px; }\n.payment-section #qrcode { margin: auto; margin-bottom: 10px; }\nbutton { background-color: #ff6f00; color: white; padding: 12px 25px; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; margin-top: 5px; }\nbutton:hover { background-color: #e65c00; }\n.hidden { display: none; }\n<\/style>\n<\/head>\n<body>\n\n<div class=\"container\">\n<div class=\"header\">Chodhary Restaurant &#038; Kirana Store &#8211; Order &#038; Payment<\/div>\n\n<div class=\"menu-section\">\n<h2>Fixed Thali<\/h2>\n<div class=\"menu-item\">\n<span>Rajasthani Thali (\u20b9250)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"250\" data-name=\"Rajasthani Thali\">\n<\/div>\n<div class=\"menu-item\">\n<span>Sindhi Thali (\u20b9220)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"220\" data-name=\"Sindhi Thali\">\n<\/div>\n<\/div>\n\n<div class=\"menu-section\">\n<h2>Mix Veg<\/h2>\n<div class=\"menu-item\">\n<span>Mix Veg Plate (\u20b9180)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"180\" data-name=\"Mix Veg Plate\">\n<\/div>\n<div class=\"menu-item\">\n<span>Paneer Mix (\u20b9200)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"200\" data-name=\"Paneer Mix\">\n<\/div>\n<\/div>\n\n<div class=\"menu-section\">\n<h2>Dal Bati Churma<\/h2>\n<div class=\"menu-item\">\n<span>Dal Bati Churma (\u20b9150)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"150\" data-name=\"Dal Bati Churma\">\n<\/div>\n<\/div>\n\n<div class=\"menu-section\">\n<h2>Snacks<\/h2>\n<div class=\"menu-item\">\n<span>Paratha (\u20b940)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"40\" data-name=\"Paratha\">\n<\/div>\n<div class=\"menu-item\">\n<span>Puri Sabzi (\u20b960)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"60\" data-name=\"Puri Sabzi\">\n<\/div>\n<\/div>\n\n<div class=\"menu-section\">\n<h2>Drinks<\/h2>\n<div class=\"menu-item\">\n<span>Bottle Water (\u20b920)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"20\" data-name=\"Bottle Water\">\n<\/div>\n<div class=\"menu-item\">\n<span>Mineral Water (\u20b930)<\/span>\n<input type=\"number\" min=\"0\" value=\"0\" data-price=\"30\" data-name=\"Mineral Water\">\n<\/div>\n<\/div>\n\n<div class=\"customer-details\">\n<h3>Customer Details<\/h3>\n<input type=\"text\" id=\"custName\" placeholder=\"Full Name\" required>\n<input type=\"tel\" id=\"custMobile\" placeholder=\"Mobile Number\" required>\n<input type=\"email\" id=\"custEmail\" placeholder=\"Email (Optional)\">\n<\/div>\n\n<div class=\"hotel-details\">\n<h3>Hotel and Society Details<\/h3>\n<p><strong>Hotel\/Restaurant ID:<\/strong> <span id=\"hotelIDDisplay\">CR0123<\/span><\/p>\n<p><strong>PAN:<\/strong> <span id=\"panDisplay\">ABCDE1234F<\/span><\/p>\n<input type=\"text\" id=\"custHotelRoom\" placeholder=\"Customer's Hotel\/Room No.\" required>\n<\/div>\n\n<div class=\"customer-details\">\n<h3>Upload Documents<\/h3>\n<label>Upload Self Photo:<\/label>\n<input type=\"file\" id=\"custPhoto\" accept=\"image\/*\" onchange=\"showPreview(this,'selfPreview')\">\n<label>Upload ID Proof:<\/label>\n<input type=\"file\" id=\"custID\" accept=\"image\/*\" onchange=\"showPreview(this,'idPreview')\">\n<label>Upload Address Proof:<\/label>\n<input type=\"file\" id=\"custAddressProof\" accept=\"image\/*\" onchange=\"showPreview(this,'addressPreview')\">\n<div class=\"file-preview\">\n<img decoding=\"async\" id=\"selfPreview\" src=\"\" alt=\"\">\n<img decoding=\"async\" id=\"idPreview\" src=\"\" alt=\"\">\n<img decoding=\"async\" id=\"addressPreview\" src=\"\" alt=\"\">\n<\/div>\n<\/div>\n\n<div class=\"total-section\">\nTotal Amount: \u20b9<span id=\"totalAmount\">0<\/span>\n<\/div>\n\n<div class=\"payment-section\">\n<h3>UPI Payment<\/h3>\n<div id=\"qrcode\"><\/div>\n<input type=\"text\" id=\"transactionID\" placeholder=\"Enter Transaction ID after payment\">\n<button onclick=\"verifyTransaction()\">Submit Transaction ID<\/button>\n<\/div>\n\n<div style=\"text-align: center; margin-top: 20px;\">\n<button id=\"generatePDFBtn\" class=\"hidden\" onclick=\"generatePDF()\">Download PDF &#038; WhatsApp Share<\/button>\n<\/div>\n\n<\/div>\n\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/qrcodejs\/1.0.0\/qrcode.min.js\"><\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jspdf\/2.5.1\/jspdf.umd.min.js\"><\/script>\n<script>\n    var qrcode = new QRCode(document.getElementById(\"qrcode\"), {\n        text: \"upi:\/\/pay?pa=yourupiid@oksbi&pn=ChodharyRestaurant&am=0&cu=INR\",\n        width: 200,\n        height: 200,\n        colorDark: \"#000000\",\n        colorLight: \"#ffffff\",\n        correctLevel: QRCode.CorrectLevel.H\n    });\n\n    const menuInputs = document.querySelectorAll('.menu-item input[type=\"number\"]');\n    menuInputs.forEach(input => {\n        input.addEventListener('input', calculateTotal);\n    });\n\n    \/\/ Auto-generated Hotel Info\n    const hotelID = \"CR0123\";\n    const panNumber = \"ABCDE1234F\";\n\n    document.getElementById('hotelIDDisplay').innerText = hotelID;\n    document.getElementById('panDisplay').innerText = panNumber;\n\n    function calculateTotal() {\n        let total = 0;\n        menuInputs.forEach(input => {\n            total += Number(input.value) * Number(input.dataset.price);\n        });\n        document.getElementById('totalAmount').innerText = total;\n\n        const newText = `upi:\/\/pay?pa=yourupiid@oksbi&pn=ChodharyRestaurant&am=${total}&cu=INR`;\n        qrcode.makeCode(newText);\n    }\n\n    function showPreview(input, previewId) {\n        if (input.files && input.files[0]) {\n            const reader = new FileReader();\n            reader.onload = e => {\n                document.getElementById(previewId).src = e.target.result;\n            };\n            reader.readAsDataURL(input.files[0]);\n        }\n    }\n\n    function verifyTransaction() {\n        const tid = document.getElementById('transactionID').value.trim();\n        if (tid !== \"\") {\n            alert(\"Payment Verified Successfully!\");\n            document.getElementById('generatePDFBtn').classList.remove('hidden');\n        } else {\n            alert(\"Please enter valid Transaction ID\");\n        }\n    }\n\n    async function generatePDF() {\n        const { jsPDF } = window.jspdf;\n        const doc = new jsPDF('p', 'pt', 'a4');\n        let y = 40;\n        const margin = 40;\n\n        doc.setFontSize(20);\n        doc.setFont(\"helvetica\", \"bold\");\n        doc.text(\"Chodhary Restaurant & Kirana Store - Order Bill\", margin, y);\n        y += 30;\n\n        const now = new Date();\n        const dateStr = now.toLocaleDateString('en-GB');\n        const timeStr = now.toLocaleTimeString('en-GB');\n        doc.setFontSize(10);\n        doc.setFont(\"helvetica\", \"normal\");\n        doc.text(`Date: ${dateStr}`, 450, 60);\n        doc.text(`Time: ${timeStr}`, 450, 75);\n\n        doc.setFontSize(14);\n        doc.setFont(\"helvetica\", \"normal\");\n        doc.text(\"Customer Details:\", margin, y);\n        y += 15;\n        doc.line(margin, y, 550, y);\n        y += 20;\n\n        doc.setFontSize(12);\n        const name = document.getElementById('custName').value || \"N\/A\";\n        const mobile = document.getElementById('custMobile').value || \"N\/A\";\n        const email = document.getElementById('custEmail').value || \"N\/A\";\n        const custHotelRoom = document.getElementById('custHotelRoom').value || \"N\/A\";\n\n        doc.text(`Full Name: ${name}`, margin, y);\n        y += 15;\n        doc.text(`Mobile: ${mobile}`, margin, y);\n        y += 15;\n        doc.text(`Email: ${email}`, margin, y);\n        y += 15;\n        doc.text(`Hotel\/Room No: ${custHotelRoom}`, margin, y);\n        y += 30;\n\n        doc.setFontSize(14);\n        doc.setFont(\"helvetica\", \"normal\");\n        doc.text(\"Restaurant Details:\", margin, y);\n        y += 15;\n        doc.line(margin, y, 550, y);\n        y += 20;\n        \n        doc.setFontSize(12);\n        doc.text(`Restaurant ID: ${hotelID}`, margin, y);\n        y += 15;\n        doc.text(`PAN: ${panNumber}`, margin, y);\n        y += 30;\n\n        doc.setFontSize(14);\n        doc.setFont(\"helvetica\", \"bold\");\n        doc.text(\"Order Summary:\", margin, y);\n        y += 15;\n        doc.line(margin, y, 550, y);\n        y += 20;\n\n        doc.setFontSize(12);\n        doc.setFont(\"helvetica\", \"bold\");\n        doc.text(\"S.No.\", margin, y);\n        doc.text(\"Item Name\", margin + 60, y);\n        doc.text(\"Qty\", margin + 250, y);\n        doc.text(\"Price\", margin + 320, y);\n        doc.text(\"Total\", margin + 400, y);\n        y += 20;\n        doc.setFont(\"helvetica\", \"normal\");\n\n        let serial = 1;\n        let totalAmount = 0;\n        for (let input of menuInputs) {\n            if (input.value > 0) {\n                const itemTotal = Number(input.value) * Number(input.dataset.price);\n                doc.text(`${serial}`, margin, y);\n                doc.text(`${input.dataset.name}`, margin + 60, y);\n                doc.text(`${input.value}`, margin + 250, y);\n                doc.text(`\u20b9${input.dataset.price}`, margin + 320, y);\n                doc.text(`\u20b9${itemTotal}`, margin + 400, y);\n                y += 15;\n                serial++;\n                totalAmount += itemTotal;\n            }\n        }\n        y += 20;\n\n        doc.setFontSize(16);\n        doc.setFont(\"helvetica\", \"bold\");\n        doc.text(`Total Amount: \u20b9${totalAmount}`, margin + 300, y);\n        y += 30;\n\n        doc.setFontSize(14);\n        doc.setFont(\"helvetica\", \"bold\");\n        doc.text(\"Uploaded Documents:\", margin, y);\n        y += 15;\n        doc.line(margin, y, 550, y);\n        y += 20;\n        \n        \/\/ Add images side by side\n        const files = [{ id: 'custPhoto', title: 'Self Photo' }, { id: 'custID', title: 'ID Proof' }, { id: 'custAddressProof', title: 'Address Proof' }];\n        let x = margin;\n        const imgHeight = 80;\n        const imgWidth = 80;\n        const gap = 15;\n\n        for (const f of files) {\n            const inputElem = document.getElementById(f.id);\n            if (inputElem.files.length > 0) {\n                const file = inputElem.files[0];\n                const imgData = await readFileAsDataURL(file);\n\n                doc.setFontSize(10);\n                doc.setFont(\"helvetica\", \"normal\");\n                doc.text(f.title, x, y - 5);\n                doc.addImage(imgData, 'JPEG', x, y, imgWidth, imgHeight);\n                x += imgWidth + gap; \/\/ Move to the right for the next image\n            }\n        }\n        y += imgHeight + 20; \/\/ Move y down after all images are placed\n        \n        \/\/ Add signature section at the bottom right\n        const pageHeight = doc.internal.pageSize.height;\n        doc.setFontSize(12);\n        doc.setFont(\"helvetica\", \"bold\");\n        doc.text(\"Signature\", 480, pageHeight - 50);\n        doc.setFont(\"helvetica\", \"normal\");\n        doc.text(\"Authorized Signatory\", 420, pageHeight - 40);\n        doc.text(\"Chodhary Restaurant Manager\", 400, pageHeight - 30);\n\n\n        doc.save('Chodhary_Order_Bill.pdf');\n\n        const total = document.getElementById('totalAmount').innerText;\n        let message = `\u0928\u092e\u0938\u094d\u0924\u0947! \u092e\u0948\u0902 ${name} \u0939\u0942\u0901\u0964\\n\\n\u092e\u0948\u0902\u0928\u0947 Chodhary Restaurant \u0938\u0947 \u090f\u0915 \u0911\u0930\u094d\u0921\u0930 \u0915\u093f\u092f\u093e \u0939\u0948\u0964\\n\\nRestaurant ID: ${hotelID}\\nHotel\/Room No: ${custHotelRoom}\\n\\n\u0911\u0930\u094d\u0921\u0930 \u0915\u093e \u0935\u093f\u0935\u0930\u0923:\\n`;\n\n        menuInputs.forEach(input => {\n            if (input.value > 0) {\n                message += `\\n* ${input.dataset.name}: ${input.value} (\u20b9${input.dataset.price} each)`;\n            }\n        });\n        message += `\\n\\n\u0915\u0941\u0932 \u0930\u093e\u0936\u093f: \u20b9${total}`;\n\n        let whatsappURL = `https:\/\/api.whatsapp.com\/send?text=${encodeURIComponent(message)}`;\n        window.open(whatsappURL, '_blank');\n    }\n\n    function readFileAsDataURL(file) {\n        return new Promise((resolve, reject) => {\n            const reader = new FileReader();\n            reader.onload = e => resolve(e.target.result);\n            reader.onerror = e => reject(e);\n            reader.readAsDataURL(file);\n        });\n    }\n<\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Chodhary Restaurant &#8211; Order &#038; Payment Chodhary Restaurant &#038; Kirana Store &#8211; Order &#038; Payment Fixed Thali Rajasthani Thali (\u20b9250) Sindhi Thali (\u20b9220) Mix Veg Mix Veg Plate (\u20b9180) Paneer Mix (\u20b9200) Dal Bati Churma Dal Bati Churma (\u20b9150) Snacks Paratha (\u20b940) Puri Sabzi (\u20b960) Drinks Bottle Water (\u20b920) Mineral Water (\u20b930) Customer Details Hotel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-65","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":10,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/65\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=\/wp\/v2\/pages\/65\/revisions\/75"}],"wp:attachment":[{"href":"https:\/\/breakfasthouse.sabpro.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}