{"config":{"dataTables":[],"site":{}},"modules":[],"pages":[{"id":"ae3c7ce349","path":"/","meta":{},"name":"Home","state":{"businessName":"","businessLogo":"","businessAddress":"","businessEmail":"","businessPhone":"","businessWebsite":"","customerName":"","customerCompany":"","customerAddress":"","customerEmail":"","quoteNumber":"","quoteDate":"","validUntil":"","currency":"USD","currencyOptions":[{"label":"USD - US Dollar","value":"USD"},{"label":"SGD - Singapore Dollar","value":"SGD"},{"label":"EUR - Euro","value":"EUR"},{"label":"GBP - British Pound","value":"GBP"},{"label":"AUD - Australian Dollar","value":"AUD"}],"items":[{"id":1,"description":"Website Design Service","qty":1,"unitPrice":2000},{"id":2,"description":"Monthly Maintenance","qty":12,"unitPrice":100}],"itemCounter":3,"discountType":"amount","discountTypeOptions":[{"label":"Amount","value":"amount"},{"label":"Percent (%)","value":"percent"}],"discountValue":0,"taxEnabled":false,"taxPercent":0,"notes":"Thank you for your business. We look forward to working with you.","terms":"Quotation valid for 30 days from the quotation date.","isDownloading":false,"isUploadingLogo":false},"methods":{"addItem":{"params":[],"code":"setState({ items: [...items, { id: itemCounter, description: '', qty: 1, unitPrice: 0 }], itemCounter: itemCounter + 1 })"},"removeItem":{"params":["id"],"code":"if (items.length <= 1) { $app.message.warning('At least one item is required'); return } setState({ items: items.filter(i => i.id !== id) })"},"moveItemUp":{"params":["id"],"code":"const idx = items.findIndex(i => i.id === id); if (idx <= 0) return; const newItems = [...items]; const tmp = newItems[idx - 1]; newItems[idx - 1] = newItems[idx]; newItems[idx] = tmp; setState({ items: newItems })"},"moveItemDown":{"params":["id"],"code":"const idx = items.findIndex(i => i.id === id); if (idx === -1 || idx >= items.length - 1) return; const newItems = [...items]; const tmp = newItems[idx + 1]; newItems[idx + 1] = newItems[idx]; newItems[idx] = tmp; setState({ items: newItems })"},"updateItemField":{"params":["id","field","value"],"code":"setState({ items: items.map(i => { if (i.id !== id) return i; if (field === 'description') return { ...i, description: value }; const num = Number(value); return { ...i, [field]: isNaN(num) ? 0 : num } }) })"},"getItemAmount":{"params":["item"],"code":"return (Number(item.qty) || 0) * (Number(item.unitPrice) || 0)"},"getSubtotal":{"params":[],"code":"return items.reduce((sum, i) => sum + (Number(i.qty) || 0) * (Number(i.unitPrice) || 0), 0)"},"getDiscountAmount":{"params":[],"code":"const subtotal = getSubtotal(); if (discountType === 'percent') return subtotal * (Number(discountValue) || 0) / 100; return Number(discountValue) || 0"},"getTaxableAmount":{"params":[],"code":"return Math.max(getSubtotal() - getDiscountAmount(), 0)"},"getTaxAmount":{"params":[],"code":"return taxEnabled ? getTaxableAmount() * (Number(taxPercent) || 0) / 100 : 0"},"getTotal":{"params":[],"code":"return getTaxableAmount() + getTaxAmount()"},"getCurrencySymbol":{"params":[],"code":"const map = { USD: '$', SGD: 'S$', EUR: '€', GBP: '£', AUD: 'A$' }; return map[currency] || currency"},"formatMoney":{"params":["num"],"code":"const n = Number(num) || 0; return n.toFixed(2).replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',')"},"handleLogoUpload":{"params":["e"],"code":"const file = e.target.files && e.target.files[0]; if (!file) return; try { setState({ isUploadingLogo: true }); const url = await $app.uploadFile(file); setState({ businessLogo: url }) } catch (err) { $app.message.error('Failed to upload logo') } finally { setState({ isUploadingLogo: false }) }"},"removeLogo":{"params":[],"code":"setState({ businessLogo: '' })"},"regenerateQuoteNumber":{"params":[],"code":"setState({ quoteNumber: 'QT-' + Date.now() })"},"downloadPdf":{"params":[],"code":"if (!businessName) { $app.message.warning('Please enter your business name before downloading'); return } try { setState({ isDownloading: true }); const payload = { businessName, businessLogo, businessAddress, businessEmail, businessPhone, businessWebsite, customerName, customerCompany, customerAddress, customerEmail, quoteNumber, quoteDate, validUntil, currency, items, discountType, discountValue, taxEnabled, taxPercent, notes, terms }; const response = await $app.post('/c/generate_quotation_pdf', payload, { responseType: 'blob' }); const blob = (response && response.data) || response; const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = (quoteNumber || 'quotation') + '.pdf'; document.body.appendChild(a); a.click(); document.body.removeChild(a); window.URL.revokeObjectURL(url); $app.message.success('Quotation PDF downloaded') } catch (err) { $app.message.error('Failed to generate PDF') } finally { setState({ isDownloading: false }) }"}},"lifecycles":{"onMounted":"const today = new Date(); const valid = new Date(); valid.setDate(valid.getDate() + 30); const pad = (n) => String(n).padStart(2, '0'); const toDateStr = (d) => d.getFullYear() + '-' + pad(d.getMonth()+1) + '-' + pad(d.getDate()); setState({ quoteNumber: 'QT-' + Date.now(), quoteDate: toDateStr(today), validUntil: toDateStr(valid) })","onBeforeUnmount":""},"schema":{"id":"d58d6f3fa9","component":"div","className":"min-h-screen bg-white text-slate-800","children":[{"id":"siteHeader","component":"div","className":"sticky top-0 z-20 bg-white/95 backdrop-blur border-b border-slate-200 px-6 py-4 flex items-center justify-between","children":[{"id":"brandWrap","component":"div","className":"flex items-center gap-2","children":[{"id":"brandName","component":"span","className":"text-lg font-semibold text-slate-900","children":[{"id":"c2f6118205","component":"text","props":{"textContent":"Free Quote Generator"}}]}]},{"id":"headerBadge","component":"span","className":"text-xs font-medium text-emerald-700 bg-emerald-50 px-3 py-1 rounded-full","children":[{"id":"05a40437ce","component":"text","props":{"textContent":"No sign-up required"}}]}]},{"id":"heroSection","component":"div","className":"max-w-4xl mx-auto text-center px-6 pt-12 pb-8","children":[{"id":"heroTitle","component":"h1","className":"text-3xl md:text-4xl font-bold text-slate-900 tracking-tight","children":[{"id":"2db6af9f77","component":"text","props":{"textContent":"Create a professional quotation in minutes."}}]},{"id":"heroSubtitle","component":"p","className":"mt-3 text-slate-500 text-base","children":[{"id":"65438801fb","component":"text","props":{"textContent":"Fill in your business details, add line items, preview instantly, and download a polished PDF quotation — free, no login needed."}}]}]},{"id":"mainGrid","component":"div","className":"max-w-7xl mx-auto px-6 pb-16 grid grid-cols-1 lg:grid-cols-2 gap-8 items-start","children":[{"id":"formCol","component":"div","className":"space-y-6","children":[{"id":"businessCard","component":"div","className":"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm","children":[{"id":"businessCardTitle","component":"h2","className":"text-sm font-semibold text-slate-900 uppercase tracking-wide mb-4","children":[{"id":"e4bd2af3db","component":"text","props":{"textContent":"1. Business Information"}}]},{"id":"businessGrid","component":"div","className":"grid grid-cols-1 sm:grid-cols-2 gap-4","children":[{"id":"bizNameField","component":"div","className":"sm:col-span-2","children":[{"id":"bizNameLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"a61c6bb7cd","component":"text","props":{"textContent":"Business / Company Name"}}]},{"id":"bizNameInput","component":"input","props":{"type":"text","placeholder":"e.g. Acme Studio"},"model":"businessName","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"logoField","component":"div","className":"sm:col-span-2","children":[{"id":"logoLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"19f4eb5af9","component":"text","props":{"textContent":"Logo (optional)"}}]},{"id":"logoRow","component":"div","className":"flex items-center gap-3","children":[{"id":"logoPreview","component":"img","condition":"businessLogo","props":{"src":"{{ businessLogo }}","alt":"Business logo preview"},"className":"h-12 w-12 object-contain rounded border border-slate-200"},{"id":"logoPlaceholder","component":"div","condition":"!businessLogo","className":"h-12 w-12 rounded border border-dashed border-slate-300 flex items-center justify-center text-slate-300","children":[{"id":"logoPlaceholderIcon","component":"icon","props":{"icon":"mdi:image-outline"},"className":"text-xl"}]},{"id":"logoUploadInput","component":"input","props":{"type":"file","accept":"image/*"},"events":{"change":"(e) => handleLogoUpload(e)"},"className":"border border-slate-300 rounded-lg px-3 py-2 text-xs text-slate-500 flex-1"},{"id":"logoRemoveBtn","component":"button","condition":"businessLogo","props":{"type":"button"},"events":{"click":"() => removeLogo()"},"className":"text-xs text-red-500 hover:text-red-600 font-medium","children":[{"id":"ba86c307f5","component":"text","props":{"textContent":"Remove"}}]}]},{"id":"logoUploadingText","component":"p","condition":"isUploadingLogo","className":"text-xs text-slate-400 mt-1","children":[{"id":"d8c366c05b","component":"text","props":{"textContent":"Uploading logo..."}}]}]},{"id":"bizAddressField","component":"div","className":"sm:col-span-2","children":[{"id":"bizAddressLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"44918b7e72","component":"text","props":{"textContent":"Business Address"}}]},{"id":"bizAddressInput","component":"textarea","props":{"rows":2,"placeholder":"Street, City, Country"},"model":"businessAddress","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"bizEmailField","component":"div","children":[{"id":"bizEmailLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"f111e61eb1","component":"text","props":{"textContent":"Email"}}]},{"id":"bizEmailInput","component":"input","props":{"type":"email","placeholder":"hello@business.com"},"model":"businessEmail","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"bizPhoneField","component":"div","children":[{"id":"bizPhoneLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"58a219dda7","component":"text","props":{"textContent":"Phone Number"}}]},{"id":"bizPhoneInput","component":"input","props":{"type":"text","placeholder":"+1 555 000 0000"},"model":"businessPhone","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"bizWebsiteField","component":"div","className":"sm:col-span-2","children":[{"id":"bizWebsiteLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"a76602d1d4","component":"text","props":{"textContent":"Website"}}]},{"id":"bizWebsiteInput","component":"input","props":{"type":"text","placeholder":"www.business.com"},"model":"businessWebsite","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]}]}]},{"id":"customerCard","component":"div","className":"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm","children":[{"id":"customerCardTitle","component":"h2","className":"text-sm font-semibold text-slate-900 uppercase tracking-wide mb-4","children":[{"id":"0107055d73","component":"text","props":{"textContent":"Customer Information"}}]},{"id":"customerGrid","component":"div","className":"grid grid-cols-1 sm:grid-cols-2 gap-4","children":[{"id":"custNameField","component":"div","children":[{"id":"custNameLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"9eec770dda","component":"text","props":{"textContent":"Customer Name"}}]},{"id":"custNameInput","component":"input","props":{"type":"text","placeholder":"Jane Doe"},"model":"customerName","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"custCompanyField","component":"div","children":[{"id":"custCompanyLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"ce7c3849d3","component":"text","props":{"textContent":"Customer Company (optional)"}}]},{"id":"custCompanyInput","component":"input","props":{"type":"text","placeholder":"Customer Co."},"model":"customerCompany","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"custAddressField","component":"div","className":"sm:col-span-2","children":[{"id":"custAddressLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"d56ac40a2e","component":"text","props":{"textContent":"Customer Address"}}]},{"id":"custAddressInput","component":"textarea","props":{"rows":2,"placeholder":"Street, City, Country"},"model":"customerAddress","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"custEmailField","component":"div","className":"sm:col-span-2","children":[{"id":"custEmailLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"e6bc299225","component":"text","props":{"textContent":"Customer Email"}}]},{"id":"custEmailInput","component":"input","props":{"type":"email","placeholder":"customer@email.com"},"model":"customerEmail","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]}]}]},{"id":"detailsCard","component":"div","className":"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm","children":[{"id":"detailsCardTitle","component":"h2","className":"text-sm font-semibold text-slate-900 uppercase tracking-wide mb-4","children":[{"id":"f80208f8d2","component":"text","props":{"textContent":"Quotation Details"}}]},{"id":"detailsGrid","component":"div","className":"grid grid-cols-1 sm:grid-cols-2 gap-4","children":[{"id":"quoteNumField","component":"div","children":[{"id":"quoteNumLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"f3b8e7b6bf","component":"text","props":{"textContent":"Quotation Number"}}]},{"id":"quoteNumRow","component":"div","className":"flex items-center gap-2","children":[{"id":"quoteNumInput","component":"input","props":{"type":"text"},"model":"quoteNumber","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"},{"id":"quoteNumRegenBtn","component":"button","props":{"type":"button"},"events":{"click":"() => regenerateQuoteNumber()"},"className":"shrink-0 h-9 w-9 flex items-center justify-center border border-slate-300 rounded-lg text-slate-500 hover:bg-slate-50","children":[{"id":"quoteNumRegenIcon","component":"icon","props":{"icon":"mdi:refresh"},"className":"text-base"}]}]}]},{"id":"currencyField","component":"div","children":[{"id":"currencyLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"ae1b5190aa","component":"text","props":{"textContent":"Currency"}}]},{"id":"currencySelect","component":"select","model":"currency","props":{"options":"{{ currencyOptions }}"},"className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"quoteDateField","component":"div","children":[{"id":"quoteDateLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"0feebad5ea","component":"text","props":{"textContent":"Quotation Date"}}]},{"id":"quoteDateInput","component":"input","props":{"type":"date"},"model":"quoteDate","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]},{"id":"validUntilField","component":"div","children":[{"id":"validUntilLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"626a2bc8c9","component":"text","props":{"textContent":"Valid Until"}}]},{"id":"validUntilInput","component":"input","props":{"type":"date"},"model":"validUntil","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-400"}]}]}]},{"id":"itemsCard","component":"div","className":"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm","children":[{"id":"itemsCardTitle","component":"h2","className":"text-sm font-semibold text-slate-900 uppercase tracking-wide mb-4","children":[{"id":"46a68103e2","component":"text","props":{"textContent":"2. Quotation Items"}}]},{"id":"itemsHeaderRow","component":"div","className":"grid grid-cols-12 gap-2 text-xs font-medium text-slate-400 uppercase px-1 pb-2","children":[{"id":"itemsHeadDesc","component":"span","className":"col-span-5","children":[{"id":"dd0c8f763a","component":"text","props":{"textContent":"Description"}}]},{"id":"itemsHeadQty","component":"span","className":"col-span-2 text-center","children":[{"id":"2b52e19837","component":"text","props":{"textContent":"Qty"}}]},{"id":"itemsHeadPrice","component":"span","className":"col-span-2 text-right","children":[{"id":"373742934b","component":"text","props":{"textContent":"Unit Price"}}]},{"id":"itemsHeadAmount","component":"span","className":"col-span-2 text-right","children":[{"id":"14bda31ad7","component":"text","props":{"textContent":"Amount"}}]},{"id":"itemsHeadActions","component":"span","className":"col-span-1"}]},{"id":"itemsRow","component":"div","className":"grid grid-cols-12 gap-2 items-center py-2 border-t border-slate-100","loop":{"source":"items","item":"item"},"children":[{"id":"itemDescInput","component":"input","className":"col-span-5 border border-slate-300 rounded-lg px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10","props":{"type":"text","value":"{{ item.description }}","placeholder":"Item or service description"},"events":{"input":"(e) => updateItemField(item.id, 'description', e.target.value)"}},{"id":"itemQtyInput","component":"input","className":"col-span-2 border border-slate-300 rounded-lg px-2 py-1.5 text-sm text-center focus:outline-none focus:ring-2 focus:ring-slate-900/10","props":{"type":"number","min":0,"value":"{{ item.qty }}"},"events":{"input":"(e) => updateItemField(item.id, 'qty', e.target.value)"}},{"id":"itemPriceInput","component":"input","className":"col-span-2 border border-slate-300 rounded-lg px-2 py-1.5 text-sm text-right focus:outline-none focus:ring-2 focus:ring-slate-900/10","props":{"type":"number","min":0,"step":"0.01","value":"{{ item.unitPrice }}"},"events":{"input":"(e) => updateItemField(item.id, 'unitPrice', e.target.value)"}},{"id":"itemAmountText","component":"div","className":"col-span-2 text-sm text-right font-medium text-slate-700","children":[{"id":"25022124e4","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getItemAmount(item)) }}"}}]},{"id":"itemActions","component":"div","className":"col-span-1 flex items-center justify-end gap-1","children":[{"id":"itemMoveUpBtn","component":"button","props":{"type":"button"},"events":{"click":"() => moveItemUp(item.id)"},"className":"text-slate-400 hover:text-slate-700","children":[{"id":"itemMoveUpIcon","component":"icon","props":{"icon":"mdi:arrow-up"},"className":"text-sm"}]},{"id":"itemMoveDownBtn","component":"button","props":{"type":"button"},"events":{"click":"() => moveItemDown(item.id)"},"className":"text-slate-400 hover:text-slate-700","children":[{"id":"itemMoveDownIcon","component":"icon","props":{"icon":"mdi:arrow-down"},"className":"text-sm"}]},{"id":"itemDeleteBtn","component":"button","props":{"type":"button"},"events":{"click":"() => removeItem(item.id)"},"className":"text-red-400 hover:text-red-600","children":[{"id":"itemDeleteIcon","component":"icon","props":{"icon":"mdi:trash-can-outline"},"className":"text-sm"}]}]}]},{"id":"addItemBtn","component":"button","props":{"type":"button"},"events":{"click":"() => addItem()"},"className":"mt-3 text-sm font-medium text-slate-900 border border-slate-300 rounded-lg px-4 py-2 hover:bg-slate-50 flex items-center gap-1.5","children":[{"id":"addItemIcon","component":"icon","props":{"icon":"mdi:plus"},"className":"text-base"},{"id":"addItemLabel","component":"span","children":[{"id":"b515a45669","component":"text","props":{"textContent":"Add Item"}}]}]}]},{"id":"summaryCard","component":"div","className":"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm","children":[{"id":"summaryCardTitle","component":"h2","className":"text-sm font-semibold text-slate-900 uppercase tracking-wide mb-4","children":[{"id":"94c085221a","component":"text","props":{"textContent":"3. Pricing Summary"}}]},{"id":"discountRow","component":"div","className":"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4","children":[{"id":"discountTypeField","component":"div","children":[{"id":"discountTypeLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"45f8f6e5ad","component":"text","props":{"textContent":"Discount"}}]},{"id":"discountTypeSelect","component":"select","model":"discountType","props":{"options":"{{ discountTypeOptions }}"},"className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10"}]},{"id":"discountValueField","component":"div","children":[{"id":"discountValueLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"6efaa8cef0","component":"text","props":{"textContent":"Discount Value"}}]},{"id":"discountValueInput","component":"input","props":{"type":"number","min":0},"model":"discountValue","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10"}]}]},{"id":"taxRow","component":"div","className":"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4 items-end","children":[{"id":"taxToggleField","component":"label","className":"flex items-center gap-2 text-sm text-slate-700","children":[{"id":"taxToggleInput","component":"input","props":{"type":"checkbox"},"model":"taxEnabled","className":"h-4 w-4 rounded border-slate-300"},{"id":"taxToggleText","component":"span","children":[{"id":"db70e35606","component":"text","props":{"textContent":"Apply Tax"}}]}]},{"id":"taxPercentField","component":"div","condition":"taxEnabled","children":[{"id":"taxPercentLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"396ad8435a","component":"text","props":{"textContent":"Tax Percentage (%)"}}]},{"id":"taxPercentInput","component":"input","props":{"type":"number","min":0,"max":100},"model":"taxPercent","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10"}]}]},{"id":"totalsBox","component":"div","className":"border-t border-slate-100 pt-4 space-y-2","children":[{"id":"totalsSubtotalRow","component":"div","className":"flex justify-between text-sm text-slate-600","children":[{"id":"totalsSubtotalLabel","component":"span","children":[{"id":"2e9359f026","component":"text","props":{"textContent":"Subtotal"}}]},{"id":"totalsSubtotalValue","component":"span","children":[{"id":"02ae3e25f0","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getSubtotal()) }}"}}]}]},{"id":"totalsDiscountRow","component":"div","condition":"getDiscountAmount() > 0","className":"flex justify-between text-sm text-slate-600","children":[{"id":"totalsDiscountLabel","component":"span","children":[{"id":"e35a74ce00","component":"text","props":{"textContent":"Discount"}}]},{"id":"totalsDiscountValue","component":"span","children":[{"id":"d53ed9b927","component":"text","props":{"textContent":"-{{ getCurrencySymbol() }}{{ formatMoney(getDiscountAmount()) }}"}}]}]},{"id":"totalsTaxRow","component":"div","condition":"taxEnabled","className":"flex justify-between text-sm text-slate-600","children":[{"id":"totalsTaxLabel","component":"span","children":[{"id":"324deaf92f","component":"text","props":{"textContent":"Tax ({{ taxPercent || 0 }}%)"}}]},{"id":"totalsTaxValue","component":"span","children":[{"id":"1ed3057f89","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getTaxAmount()) }}"}}]}]},{"id":"totalsTotalRow","component":"div","className":"flex justify-between text-base font-bold text-slate-900 border-t border-slate-200 pt-2","children":[{"id":"totalsTotalLabel","component":"span","children":[{"id":"8872fc203d","component":"text","props":{"textContent":"Total"}}]},{"id":"totalsTotalValue","component":"span","children":[{"id":"e6bd5aeca2","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getTotal()) }}"}}]}]}]}]},{"id":"notesCard","component":"div","className":"bg-white border border-slate-200 rounded-2xl p-6 shadow-sm","children":[{"id":"notesCardTitle","component":"h2","className":"text-sm font-semibold text-slate-900 uppercase tracking-wide mb-4","children":[{"id":"ff9b7f9e88","component":"text","props":{"textContent":"4. Additional Information"}}]},{"id":"notesField","component":"div","className":"mb-4","children":[{"id":"notesLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"388f65875a","component":"text","props":{"textContent":"Notes"}}]},{"id":"notesInput","component":"textarea","props":{"rows":2},"model":"notes","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10"}]},{"id":"termsField","component":"div","children":[{"id":"termsLabel","component":"label","className":"block text-xs font-medium text-slate-500 mb-1","children":[{"id":"f45a63696b","component":"text","props":{"textContent":"Terms & Conditions"}}]},{"id":"termsInput","component":"textarea","props":{"rows":2},"model":"terms","className":"w-full border border-slate-300 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-slate-900/10"}]}]}]},{"id":"previewCol","component":"div","className":"lg:sticky lg:top-24 space-y-4","children":[{"id":"previewLabel","component":"div","className":"text-xs font-semibold text-slate-400 uppercase tracking-wide","children":[{"id":"160296867c","component":"text","props":{"textContent":"Live Preview"}}]},{"id":"previewDoc","component":"div","className":"bg-white border border-slate-200 rounded-2xl shadow-md p-8","children":[{"id":"previewHeader","component":"div","className":"flex justify-between items-start gap-4 pb-6 border-b border-slate-100","children":[{"id":"previewBizInfo","component":"div","children":[{"id":"previewLogo","component":"img","condition":"businessLogo","props":{"src":"{{ businessLogo }}","alt":"Business logo"},"className":"h-12 object-contain mb-2"},{"id":"previewBizName","component":"div","className":"text-lg font-bold text-slate-900","children":[{"id":"ff75680390","component":"text","props":{"textContent":"{{ businessName || 'Your Business Name' }}"}}]},{"id":"previewBizAddress","component":"div","className":"text-xs text-slate-500 mt-1 whitespace-pre-line","children":[{"id":"a941c58457","component":"text","props":{"textContent":"{{ businessAddress }}"}}]},{"id":"previewBizContact","component":"div","className":"text-xs text-slate-500","children":[{"id":"a9cd1ef0a3","component":"text","props":{"textContent":"{{ businessEmail }}{{ businessPhone ? ' | ' + businessPhone : '' }}"}}]},{"id":"previewBizWebsite","component":"div","className":"text-xs text-slate-500","children":[{"id":"2ad1ff43fc","component":"text","props":{"textContent":"{{ businessWebsite }}"}}]}]},{"id":"previewQuoteInfo","component":"div","className":"text-right shrink-0","children":[{"id":"previewQuoteTitle","component":"div","className":"text-2xl font-extrabold text-slate-900 tracking-wide","children":[{"id":"c4a8999420","component":"text","props":{"textContent":"QUOTATION"}}]},{"id":"previewQuoteNum","component":"div","className":"text-xs text-slate-500 mt-2","children":[{"id":"4a79559894","component":"text","props":{"textContent":"Quote #: {{ quoteNumber }}"}}]},{"id":"previewQuoteDate","component":"div","className":"text-xs text-slate-500","children":[{"id":"8c8afafa7c","component":"text","props":{"textContent":"Date: {{ quoteDate }}"}}]},{"id":"previewValidUntil","component":"div","className":"text-xs text-slate-500","children":[{"id":"3ad3aa4ecd","component":"text","props":{"textContent":"Valid Until: {{ validUntil }}"}}]}]}]},{"id":"previewCustomer","component":"div","className":"py-6 border-b border-slate-100","children":[{"id":"previewCustomerLabel","component":"div","className":"text-[11px] font-semibold text-slate-400 uppercase tracking-wide mb-1","children":[{"id":"eb5b8f1baf","component":"text","props":{"textContent":"Prepared for"}}]},{"id":"previewCustomerName","component":"div","className":"text-sm font-semibold text-slate-800","children":[{"id":"12ffdf0bc1","component":"text","props":{"textContent":"{{ customerName || 'Customer Name' }}{{ customerCompany ? ' - ' + customerCompany : '' }}"}}]},{"id":"previewCustomerAddress","component":"div","className":"text-xs text-slate-500 mt-1","children":[{"id":"7e1024535c","component":"text","props":{"textContent":"{{ customerAddress }}"}}]},{"id":"previewCustomerEmail","component":"div","className":"text-xs text-slate-500","children":[{"id":"0abb52a14a","component":"text","props":{"textContent":"{{ customerEmail }}"}}]}]},{"id":"previewTable","component":"table","className":"w-full text-sm mt-6","children":[{"id":"previewThead","component":"thead","children":[{"id":"previewTheadRow","component":"tr","className":"bg-slate-50","children":[{"id":"previewThDesc","component":"th","className":"text-left text-[11px] uppercase text-slate-400 font-medium px-2 py-2","children":[{"id":"f2f7fd1e9e","component":"text","props":{"textContent":"Description"}}]},{"id":"previewThQty","component":"th","className":"text-center text-[11px] uppercase text-slate-400 font-medium px-2 py-2","children":[{"id":"58611c2443","component":"text","props":{"textContent":"Qty"}}]},{"id":"previewThPrice","component":"th","className":"text-right text-[11px] uppercase text-slate-400 font-medium px-2 py-2","children":[{"id":"63a8551b3e","component":"text","props":{"textContent":"Unit Price"}}]},{"id":"previewThAmount","component":"th","className":"text-right text-[11px] uppercase text-slate-400 font-medium px-2 py-2","children":[{"id":"a9132f9263","component":"text","props":{"textContent":"Amount"}}]}]}]},{"id":"previewTbody","component":"tbody","children":[{"id":"previewRow","component":"tr","loop":{"source":"items","item":"item"},"className":"border-b border-slate-100","children":[{"id":"previewCellDesc","component":"td","className":"px-2 py-2 text-slate-700","children":[{"id":"4c57f4c854","component":"text","props":{"textContent":"{{ item.description || '-' }}"}}]},{"id":"previewCellQty","component":"td","className":"px-2 py-2 text-center text-slate-700","children":[{"id":"967256239b","component":"text","props":{"textContent":"{{ item.qty }}"}}]},{"id":"previewCellPrice","component":"td","className":"px-2 py-2 text-right text-slate-700","children":[{"id":"1e69477df5","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(item.unitPrice) }}"}}]},{"id":"previewCellAmount","component":"td","className":"px-2 py-2 text-right font-medium text-slate-800","children":[{"id":"f3f6f3b8d6","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getItemAmount(item)) }}"}}]}]}]}]},{"id":"previewTotals","component":"div","className":"mt-4 ml-auto max-w-xs space-y-1.5","children":[{"id":"previewSubtotalRow","component":"div","className":"flex justify-between text-sm text-slate-600","children":[{"id":"previewSubtotalLabel","component":"span","children":[{"id":"81de082fdd","component":"text","props":{"textContent":"Subtotal"}}]},{"id":"previewSubtotalValue","component":"span","children":[{"id":"1b6ffe6065","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getSubtotal()) }}"}}]}]},{"id":"previewDiscountRow","component":"div","condition":"getDiscountAmount() > 0","className":"flex justify-between text-sm text-slate-600","children":[{"id":"previewDiscountLabel","component":"span","children":[{"id":"1d01f1f9fb","component":"text","props":{"textContent":"Discount"}}]},{"id":"previewDiscountValue","component":"span","children":[{"id":"5b8fa0497a","component":"text","props":{"textContent":"-{{ getCurrencySymbol() }}{{ formatMoney(getDiscountAmount()) }}"}}]}]},{"id":"previewTaxRow","component":"div","condition":"taxEnabled","className":"flex justify-between text-sm text-slate-600","children":[{"id":"previewTaxLabel","component":"span","children":[{"id":"b7a1bb5d87","component":"text","props":{"textContent":"Tax ({{ taxPercent || 0 }}%)"}}]},{"id":"previewTaxValue","component":"span","children":[{"id":"a41f4e6814","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getTaxAmount()) }}"}}]}]},{"id":"previewTotalRow","component":"div","className":"flex justify-between text-base font-bold text-slate-900 border-t border-slate-200 pt-2 mt-1","children":[{"id":"previewTotalLabel","component":"span","children":[{"id":"574010d3e0","component":"text","props":{"textContent":"Total"}}]},{"id":"previewTotalValue","component":"span","children":[{"id":"cfc3e2cb57","component":"text","props":{"textContent":"{{ getCurrencySymbol() }}{{ formatMoney(getTotal()) }}"}}]}]}]},{"id":"previewNotes","component":"div","condition":"notes","className":"mt-8","children":[{"id":"previewNotesLabel","component":"div","className":"text-[11px] font-semibold text-slate-400 uppercase tracking-wide mb-1","children":[{"id":"82ffdf1d0d","component":"text","props":{"textContent":"Notes"}}]},{"id":"previewNotesText","component":"div","className":"text-xs text-slate-600 whitespace-pre-line","children":[{"id":"802de6dc4c","component":"text","props":{"textContent":"{{ notes }}"}}]}]},{"id":"previewTerms","component":"div","condition":"terms","className":"mt-4","children":[{"id":"previewTermsLabel","component":"div","className":"text-[11px] font-semibold text-slate-400 uppercase tracking-wide mb-1","children":[{"id":"8d71c8e6d4","component":"text","props":{"textContent":"Terms & Conditions"}}]},{"id":"previewTermsText","component":"div","className":"text-xs text-slate-600 whitespace-pre-line","children":[{"id":"c1eac185b0","component":"text","props":{"textContent":"{{ terms }}"}}]}]},{"id":"previewWatermark","component":"div","className":"mt-8 pt-4 border-t border-slate-100 text-center text-[11px] text-slate-300","children":[{"id":"5db00b1afa","component":"text","props":{"textContent":"Generated with Component.app"}}]}]},{"id":"downloadBtn","component":"button","props":{"type":"button","disabled":"{{ isDownloading }}"},"events":{"click":"() => downloadPdf()"},"className":"w-full bg-slate-900 text-white font-medium text-sm rounded-xl py-3 hover:bg-slate-800 transition disabled:opacity-60 flex items-center justify-center gap-2","children":[{"id":"downloadBtnIcon","component":"icon","props":{"icon":"mdi:file-pdf-box"},"className":"text-base"},{"id":"downloadBtnText","component":"span","children":[{"id":"35bf049ade","component":"text","props":{"textContent":"{{ isDownloading ? 'Generating PDF...' : 'Download PDF' }}"}}]}]},{"id":"downloadHint","component":"p","className":"text-xs text-slate-400 text-center","children":[{"id":"d3e299203a","component":"text","props":{"textContent":"Free download, no sign-up required. Create an account later to save quotation history."}}]}]}]},{"id":"siteFooter","component":"div","className":"text-center text-xs text-slate-400 py-6 border-t border-slate-100","children":[{"id":"8212912637","component":"text","props":{"textContent":"Powered by Component.app"}}]}]}}],"features":{"authentication":{"isEnabled":false,"pages":{}},"permission":{"isEnabled":true},"pdf":{"isEnabled":true,"templates":[{"name":"","contentPage":"","headerfooter":{"isDisplay":true,"headerTemplate":"","footerTemplate":"<div style=\"font-size: 10px; width: 100%; text-align: center; padding: 10px;\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>\""},"paper":{"size":"a4","landscape":"false","scale":1}}]},"chatbot":{"isEnabled":true,"ai":[{"componentId":"","assistantId":"","webhookVerifyToken":""}]},"oauth2":{"isEnabled":false},"stripePayment":{"isEnabled":true,"configurations":{"environments":"sandbox","defaultCurrency":"usd","accountCountry":"US","enabledScenarios":["one_time_custom","one_time_checkout","save_payment_method","subscriptions","refunds_disputes"],"allowedPaymentMethods":["card","google_pay","apple_pay","link","express_checkout"],"requireBillingAddress":false,"requireShippingAddress":false,"checkout":{"collectPhoneNumber":false,"allowPromotionCodes":false,"pageConfigs":{"requiredComponents":["stripe-elements","payment-form","order-summary"],"optionalComponents":["shipping-form","billing-form","promo-code"],"styling":{"theme":"light","primaryColor":"#0570de","borderRadius":"8px","fontSize":"16px"}}},"subscriptions":{"enableTrial":true,"defaultTrialDays":7,"allowMultipleSubscriptions":false,"prorateUpgrades":true,"sendInvoiceEmails":true,"pageConfigs":{"requiredComponents":["stripe-elements","payment-form","order-summary"],"optionalComponents":["shipping-form","billing-form","promo-code"],"styling":{"theme":"light","primaryColor":"#0570de","borderRadius":"8px","fontSize":"16px"}}},"security":{"savePaymentMethods":true},"business":{"statementDescriptor":"","receiptEmail":true,"enableRefunds":true,"refundPolicy":"full_refund_within_30_days"},"notifications":{"sendPaymentConfirmations":true,"sendInvoiceReminders":true,"sendFailedPaymentNotifications":true}}}},"accessibleApis":[],"favicon":{"s3Key":"app_7bbc708a-e904-4783-bbdc-9c699aec8416/favicon/favicon_1786710663201.zip","bucketName":"4dcff347-a082-4dd9e-0072-46d4e1c54a0a-resources-prod","uploadedAt":"2026-08-14T12:31:03.375Z","sourceFile":{"fileName":"favicon.ico","url":"https://4dcff347-a082-4dd9e-0072-46d4e1c54a0a-resources-prod.s3.ap-southeast-1.amazonaws.com/app_7bbc708a-e904-4783-bbdc-9c699aec8416/favicon/favicon.ico"},"faviconFiles":[{"fileName":"favicon.ico","url":"https://4dcff347-a082-4dd9e-0072-46d4e1c54a0a-resources-prod.s3.ap-southeast-1.amazonaws.com/app_7bbc708a-e904-4783-bbdc-9c699aec8416/favicon/favicon.ico"}]}}
