{"id":6,"date":"2025-07-26T14:06:35","date_gmt":"2025-07-26T14:06:35","guid":{"rendered":"https:\/\/hotal.sabpro.in\/?page_id=6"},"modified":"2025-07-26T14:08:25","modified_gmt":"2025-07-26T14:08:25","slug":"hotal","status":"publish","type":"page","link":"https:\/\/hotal.sabpro.in\/index.php\/hotal\/","title":{"rendered":"hotal"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n  <title>Hotel Booking Receipt<\/title>\n  <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/jspdf\"><\/script>\n  <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/qrcodejs\/qrcode.min.js\"><\/script>\n  <style>\n    #qrcode img {\n      width: 180px !important;\n      height: 180px !important;\n    }\n    table {\n      width: 100%;\n      border-collapse: collapse;\n      margin-top: 10px;\n    }\n    table, th, td {\n      border: 1px solid black;\n      padding: 6px;\n    }\n    .btn {\n      background-color: #28a745;\n      color: white;\n      border: none;\n      padding: 10px;\n      margin: 10px 0;\n      cursor: pointer;\n    }\n    #receipt {\n      display: none;\n      margin-top: 20px;\n    }\n  <\/style>\n<\/head>\n<body>\n  <h2>Hotel Ram Pratap Siyag, Jaisalmer<\/h2>\n  <label>Guest Name:<\/label><br>\n  <input id=\"guestName\" placeholder=\"Enter Guest Name\"><br><br>\n\n  <label>Room Type:<\/label><br>\n  <input id=\"roomType\" placeholder=\"Deluxe \/ AC \/ Non-AC\"><br><br>\n\n  <label>Amount (\u20b9):<\/label><br>\n  <input type=\"number\" id=\"amount\"><br><br>\n\n  <label>Transaction ID:<\/label><br>\n  <input id=\"transactionId\" placeholder=\"Enter UPI Transaction ID\"><br><br>\n\n  <div id=\"qrcode\"><\/div><br>\n\n  <button class=\"btn\" onclick=\"generateTicket()\">Generate Ticket &#038; Download<\/button>\n\n  <div id=\"receipt\">\n    <h3>Booking Receipt<\/h3>\n    <table>\n      <tr><th>Ticket No<\/th><td id=\"ticketNo\"><\/td><\/tr>\n      <tr><th>Name<\/th><td id=\"r_name\"><\/td><\/tr>\n      <tr><th>Room Type<\/th><td id=\"r_room\"><\/td><\/tr>\n      <tr><th>Amount<\/th><td id=\"r_amount\"><\/td><\/tr>\n      <tr><th>Transaction ID<\/th><td id=\"r_txn\"><\/td><\/tr>\n    <\/table>\n    <br>\n    <button class=\"btn\" onclick=\"sendWhatsApp()\">Send on WhatsApp<\/button>\n  <\/div>\n\n  <script>\n    function generateTicket() {\n      const name = document.getElementById(\"guestName\").value;\n      const room = document.getElementById(\"roomType\").value;\n      const amount = document.getElementById(\"amount\").value;\n      const txn = document.getElementById(\"transactionId\").value;\n      const ticketNo = \"HTL\" + Math.floor(Math.random() * 1000000);\n\n      if (!name || !room || !amount || !txn) {\n        alert(\"Please fill all fields\");\n        return;\n      }\n\n      document.getElementById(\"ticketNo\").innerText = ticketNo;\n      document.getElementById(\"r_name\").innerText = name;\n      document.getElementById(\"r_room\").innerText = room;\n      document.getElementById(\"r_amount\").innerText = \"\u20b9\" + amount;\n      document.getElementById(\"r_txn\").innerText = txn;\n      document.getElementById(\"receipt\").style.display = \"block\";\n\n      \/\/ Generate QR\n      document.getElementById(\"qrcode\").innerHTML = \"\";\n      new QRCode(document.getElementById(\"qrcode\"), {\n        text: \"upi:\/\/pay?pa=8209740355@okbizaxis&pn=HotelRamPratap&am=\" + amount + \"&tn=\" + txn,\n        width: 180,\n        height: 180\n      });\n\n      \/\/ PDF\n      const doc = new jsPDF();\n      doc.setFontSize(16);\n      doc.text(\"Hotel Ram Pratap Siyag, Jaisalmer\", 20, 20);\n      doc.setFontSize(12);\n      doc.text(\"Booking Receipt\", 20, 30);\n      doc.text(\"Ticket No: \" + ticketNo, 20, 40);\n      doc.text(\"Name: \" + name, 20, 50);\n      doc.text(\"Room Type: \" + room, 20, 60);\n      doc.text(\"Amount: \u20b9\" + amount, 20, 70);\n      doc.text(\"Transaction ID: \" + txn, 20, 80);\n      doc.text(\"Thank you for booking with us!\", 20, 100);\n      doc.setFontSize(10);\n      doc.text(\"Background: Hotel Ram Pratap Siyag, Jaisalmer\", 20, 115);\n      doc.save(\"Hotel_Ticket_\" + ticketNo + \".pdf\");\n    }\n\n    function sendWhatsApp() {\n      const name = document.getElementById(\"guestName\").value;\n      const room = document.getElementById(\"roomType\").value;\n      const amount = document.getElementById(\"amount\").value;\n      const txn = document.getElementById(\"transactionId\").value;\n      const ticketNo = document.getElementById(\"ticketNo\").innerText;\n\n      const msg = `Hotel Ram Pratap Siyag Booking%0A----------------------------------%0ATicket No: ${ticketNo}%0AName: ${name}%0ARoom Type: ${room}%0AAmount: \u20b9${amount}%0ATransaction ID: ${txn}%0A%0AThank you for booking!`;\n\n      window.open(\"https:\/\/wa.me\/918209740355?text=\" + msg, \"_blank\");\n    }\n  <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Hotel Booking Receipt Hotel Ram Pratap Siyag, Jaisalmer Guest Name: Room Type: Amount (\u20b9): Transaction ID: Generate Ticket &#038; Download Booking Receipt Ticket No Name Room Type Amount Transaction ID Send on WhatsApp<\/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-6","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/pages\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":2,"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/pages\/6\/revisions"}],"predecessor-version":[{"id":9,"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/pages\/6\/revisions\/9"}],"wp:attachment":[{"href":"https:\/\/hotal.sabpro.in\/index.php\/wp-json\/wp\/v2\/media?parent=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}