{"id":92,"date":"2025-05-08T13:41:09","date_gmt":"2025-05-08T13:41:09","guid":{"rendered":"https:\/\/stock.kinginvestment.in\/?p=92"},"modified":"2025-05-08T13:49:16","modified_gmt":"2025-05-08T13:49:16","slug":"dipware-home-innovation","status":"publish","type":"post","link":"https:\/\/stock.kinginvestment.in\/index.php\/2025\/05\/08\/dipware-home-innovation\/","title":{"rendered":"Dipware Home innovation"},"content":{"rendered":"\n<!--more-->\n\n\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Invoice Generator<\/title>\n  <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/html2pdf.js\/0.10.1\/html2pdf.bundle.min.js\"><\/script>\n  <style>\n    body {\n      font-family: Arial, sans-serif;\n      padding: 20px;\n    }\n    input, textarea, select {\n      padding: 5px;\n      margin: 5px 0;\n      width: 100%;\n    }\n    .form-section, .invoice-box {\n      border: 1px solid #000;\n      padding: 20px;\n      margin-top: 20px;\n    }\n    .form-section h3 {\n      margin-top: 0;\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: 8px;\n    }\n    .center {\n      text-align: center;\n    }\n    .btn {\n      padding: 10px 20px;\n      margin-top: 10px;\n      font-size: 16px;\n    }\n  <\/style>\n<\/head>\n<body>\n\n<h2>Invoice Input Form<\/h2>\n\n<div class=\"form-section\">\n  <h3>Invoice Details<\/h3>\n  <label>Invoice No: <input type=\"text\" id=\"invNo\"><\/label>\n  <label>Date: <input type=\"date\" id=\"invDate\"><\/label>\n  <label>Place of Supply: <input type=\"text\" id=\"placeSupply\"><\/label>\n\n  <h3>Customer Details<\/h3>\n  <label>Billed To: <input type=\"text\" id=\"billedTo\"><\/label>\n  <label>Shipped To: <input type=\"text\" id=\"shippedTo\"><\/label>\n\n  <h3>Items<\/h3>\n  <table id=\"itemsTable\">\n    <thead>\n      <tr>\n        <th>Description<\/th>\n        <th>Qty<\/th>\n        <th>Unit<\/th>\n        <th>Price<\/th>\n        <th>Discount (%)<\/th>\n        <th><button onclick=\"addItem()\" type=\"button\">+<\/button><\/th>\n      <\/tr>\n    <\/thead>\n    <tbody id=\"itemsBody\">\n      <tr>\n        <td><input type=\"text\" class=\"desc\"><\/td>\n        <td><input type=\"number\" class=\"qty\" value=\"1\"><\/td>\n        <td><input type=\"text\" class=\"unit\" value=\"PCS\"><\/td>\n        <td><input type=\"number\" class=\"price\" value=\"0\"><\/td>\n        <td><input type=\"number\" class=\"discount\" value=\"0\"><\/td>\n        <td><button type=\"button\" onclick=\"removeRow(this)\">\u2212<\/button><\/td>\n      <\/tr>\n    <\/tbody>\n  <\/table>\n\n  <button class=\"btn\" onclick=\"generateInvoice()\">Generate Invoice<\/button>\n<\/div>\n\n<div id=\"invoice\" class=\"invoice-box\" style=\"display:none;\">\n  <h2 class=\"center\">TAX INVOICE<\/h2>\n  <h3 class=\"center\">ALFA ENTERPRISES (POONAM)<\/h3>\n  <p class=\"center\">RZ-194, BINDA PUR, INDRAPARK, NEW DELHI-10059<br>\n  Mob-9810567468, GST NO-07ADJPC9671P1ZU<\/p>\n\n  <p><strong>Invoice No:<\/strong> <span id=\"outInvNo\"><\/span> &nbsp;\n     <strong>Date:<\/strong> <span id=\"outInvDate\"><\/span> &nbsp;\n     <strong>Place of Supply:<\/strong> <span id=\"outPlaceSupply\"><\/span><\/p>\n\n  <p><strong>Billed To:<\/strong> <span id=\"outBilledTo\"><\/span><\/p>\n  <p><strong>Shipped To:<\/strong> <span id=\"outShippedTo\"><\/span><\/p>\n\n  <table>\n    <thead>\n      <tr>\n        <th>S.N.<\/th>\n        <th>Description<\/th>\n        <th>Qty<\/th>\n        <th>Unit<\/th>\n        <th>Price<\/th>\n        <th>Discount<\/th>\n        <th>Final Price<\/th>\n        <th>Amount<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody id=\"outItemsBody\"><\/tbody>\n  <\/table>\n\n  <p style=\"text-align:right;\"><strong>Total: \u20b9 <span id=\"grandTotal\"><\/span><\/strong><\/p>\n\n  <div class=\"center\">\n    <button class=\"btn\" onclick=\"downloadPDF()\">Download PDF<\/button>\n  <\/div>\n<\/div>\n\n<script>\n  function addItem() {\n    const row = document.createElement('tr');\n    row.innerHTML = \n      <td><input type=\"text\" class=\"desc\"><\/td>\n      <td><input type=\"number\" class=\"qty\" value=\"1\"><\/td>\n      <td><input type=\"text\" class=\"unit\" value=\"PCS\"><\/td>\n      <td><input type=\"number\" class=\"price\" value=\"0\"><\/td>\n      <td><input type=\"number\" class=\"discount\" value=\"0\"><\/td>\n      <td><button type=\"button\" onclick=\"removeRow(this)\">\u2212<\/button><\/td>\n    ;\n    document.getElementById('itemsBody').appendChild(row);\n  }\n\n  function removeRow(btn) {\n    btn.parentElement.parentElement.remove();\n  }\n\n  function generateInvoice() {\n    document.getElementById('invoice').style.display = 'block';document.getElementById('outInvNo').innerText = document.getElementById('invNo').value;\n    document.getElementById('outInvDate').innerText = document.getElementById('invDate').value;\n    document.getElementById('outPlaceSupply').innerText = document.getElementById('placeSupply').value;\n    document.getElementById('outBilledTo').innerText = document.getElementById('billedTo').value;\n    document.getElementById('outShippedTo').innerText = document.getElementById('shippedTo').value;\n\n    const tbody = document.getElementById('outItemsBody');\n    tbody.innerHTML = '';\n\n    let total = 0;\n    const rows = document.querySelectorAll('#itemsBody tr');\n    rows.forEach((row, index) => {\n      const desc = row.querySelector('.desc').value;\n      const qty = parseFloat(row.querySelector('.qty').value);\n      const unit = row.querySelector('.unit').value;\n      const price = parseFloat(row.querySelector('.price').value);\n      const discount = parseFloat(row.querySelector('.discount').value);\n\n      const finalPrice = price - (price * discount \/ 100);\n      const amount = finalPrice * qty;\n      total += amount;\n\n      const newRow = document.createElement('tr');\n      newRow.innerHTML = \n        <td>${index + 1}<\/td>\n        <td>${desc}<\/td>\n        <td>${qty}<\/td>\n        <td>${unit}<\/td>\n        <td>${price.toFixed(2)}<\/td>\n        <td>${discount.toFixed(2)}%<\/td>\n        <td>${finalPrice.toFixed(2)}<\/td>\n        <td>${amount.toFixed(2)}<\/td>\n      ;\n      tbody.appendChild(newRow);\n    });\n\n    document.getElementById('grandTotal').innerText = total.toFixed(2);\n  }\n\n  function downloadPDF() {\n    const element = document.getElementById('invoice');\n    html2pdf().from(element).save('Generated_Invoice.pdf');\n  }\n<\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[1],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":4,"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":97,"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/posts\/92\/revisions\/97"}],"wp:attachment":[{"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stock.kinginvestment.in\/index.php\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}