sonicsoftware.in

Invoice Generator — Create Bill Online

Try Sonic’s free invoice generator to create professional bills in seconds and manage your finances without extra cost.!

Quickly generate professional invoices online — Invoice Generator

📄
Enter Details
🔍
Preview


#ItemQuantityUnitRateAmount
10.00

Total: 0.00

Add your company's logo (100×80 px)

`); win.document.close(); setTimeout(()=>win.print(), 300); }function downloadInvoice(){ const content = document.getElementById('previewHTML').innerHTML; const primary = (getComputedStyle(document.documentElement).getPropertyValue('--primary') || '#F1C40F').trim(); const htmlDoc = `Invoice${content}`; const blob = new Blob([htmlDoc], {type: 'text/html'}); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `invoice-${document.getElementById('invoiceNo').value || 'invoice'}.html`; document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url); }/* Init */ window.addEventListener('load', function(){ // hide buttons until preview created if(document.getElementById('btnDownload')) document.getElementById('btnDownload').classList.add('hidden'); if(document.getElementById('btnPrint')) document.getElementById('btnPrint').classList.add('hidden');// clear inputs for fresh start (no persistence) const idsToClear = ['companyName','companyAddress','companyGST','invoiceNo','customerName','customerAddress','notes','terms']; idsToClear.forEach(id => { const el = document.getElementById(id); if(el) el.value = ''; });// set default dates const dateEl = document.getElementById('invoiceDate'); const dueEl = document.getElementById('dueDate'); if(dateEl) dateEl.value = '2025-12-14'; // if(dueEl) dueEl.value = '2025-12-21'; // default single row (with placeholders) const tbody = document.getElementById('itemBody'); tbody.innerHTML = `10.00`;document.querySelectorAll('#itemBody tr').forEach(tr => attachInputHandlers(tr)); recalc(); toggleGST(); });
Scroll to Top