Teacher training videos • Join competitions today!
Abacus Teacher Training
Videos
Vedic Maths Teacher Training
Videos
100 Level Challenge
Master Competition
International Abacus Competition
Global Challenge
Abacus Billing System

🧮 ABACUS BILLING 50% OFF ON LEVEL ITEMS

Discount Rules

Eligible ItemsDiscount
Abacus Level 0 to Level 850% OFF
Vedic Level 1 to Level 450% OFF
Writing Part 1 to Part 450% OFF
All Other Items0%

Free Courier: When order total (after discount) ≥ ₹5,000

Abacus Teacher Tool price: ₹2000

ItemPrice (₹)Quantity
Free courier on orders ₹5000+ after discount! Add ₹0 more to get free shipping.
50% discount applied on eligible level items + free courier after discount ≥₹5000
Total updates automatically when you change quantity

📦 Subtotal: 0

🚚 Courier Charges: 0

🎉 Discount (0%): - ₹0

🔧 Extra Tool Charges: 0

💰 FINAL AMOUNT: ₹0

📅 Order Date
--
Name required
Address required
State required
Valid 6-digit pincode required
Valid 10-digit mobile required
Invoice Generator

Invoice Generator

Apni company, customer aur item details bharein, phir "Generate Invoice" dabayein. Sab kuch is browser mein hi rehta hai, kahin bhejaa nahi jaata.

Your Company

No logo

Invoice Details

Bill To (Customer)

Items

ItemQtyRateAmount

Charges

Payment Status

Invoice yahan dikhega

Left side mein details bharein aur "Generate Invoice" dabayein.

Your Company

INVOICE

No.
Date:

Bill To

Payment

Pay to:

ItemQtyRate (₹)Amount (₹)
Thank you! 🙏
'; }; reader.readAsDataURL(file); }); document.getElementById('clearLogoBtn').addEventListener('click', function(){ logoDataUrl = null; logoInput.value = ''; logoPreview.innerHTML = 'No logo'; }); // ---------- items ---------- var itemRows = document.getElementById('itemRows'); var itemCounter = 0; function addItemRow(name, qty, rate){ itemCounter++; var id = 'item_' + itemCounter; var tr = document.createElement('tr'); tr.dataset.id = id; tr.innerHTML = ''+ ''+ ''+ '0.00'+ ''; itemRows.appendChild(tr); var qtyInput = tr.querySelector('.i-qty'); var rateInput = tr.querySelector('.i-rate'); var amountCell = tr.querySelector('.i-amount'); function recalc(){ var q = parseFloat(qtyInput.value)||0; var r = parseFloat(rateInput.value)||0; amountCell.textContent = money(q*r); } qtyInput.addEventListener('input', recalc); rateInput.addEventListener('input', recalc); tr.querySelector('.remove-row').addEventListener('click', function(){ tr.remove(); }); recalc(); } document.addEventListener('click', function(e){ var btn = e.target.closest('#addItemBtn'); if(btn){ e.preventDefault(); addItemRow(); } }); // seed with 3 empty rows to start addItemRow(); addItemRow(); addItemRow(); // ---------- payment status toggle ---------- var paymentStatus = 'pending'; var payPendingBtn = document.getElementById('payOptPending'); var payPaidBtn = document.getElementById('payOptPaid'); function setPayStatus(status){ paymentStatus = status; payPendingBtn.classList.toggle('active', status === 'pending'); payPaidBtn.classList.toggle('active', status === 'paid'); } payPendingBtn.addEventListener('click', function(){ setPayStatus('pending'); }); payPaidBtn.addEventListener('click', function(){ setPayStatus('paid'); }); // ---------- collect + render ---------- function collectItems(){ var rows = itemRows.querySelectorAll('tr'); var items = []; rows.forEach(function(tr){ var name = tr.querySelector('.i-name').value.trim(); var qty = parseFloat(tr.querySelector('.i-qty').value)||0; var rate = parseFloat(tr.querySelector('.i-rate').value)||0; if(!name && qty===0 && rate===0) return; items.push({name: name || 'Item', qty: qty, rate: rate, amount: qty*rate}); }); return items; } function totalRow(label, value, cssClass){ return '
'+ label +''+ value +'
'; } function renderInvoice(){ var items = collectItems(); // company header document.getElementById('outCompanyName').textContent = document.getElementById('cName').value || 'Your Company'; var metaParts = []; if(document.getElementById('cAddress').value) metaParts.push(document.getElementById('cAddress').value); if(document.getElementById('cPhone').value) metaParts.push('Ph: ' + document.getElementById('cPhone').value); if(document.getElementById('cGst').value) metaParts.push('GSTIN: ' + document.getElementById('cGst').value); document.getElementById('outCompanyMeta').textContent = metaParts.join('\n'); var logoWrap = document.getElementById('outLogoWrap'); if(logoDataUrl){ logoWrap.innerHTML = '
'; } else { logoWrap.innerHTML = ''; } document.getElementById('outInvoiceNo').textContent = document.getElementById('invNumber').value || '—'; document.getElementById('outInvoiceDate').textContent = formatDate(document.getElementById('invDate').value) || '—'; // customer document.getElementById('outCustName').textContent = document.getElementById('custName').value || 'Customer name'; document.getElementById('outCustAddress').textContent = document.getElementById('custAddress').value || ''; var mobile = document.getElementById('custMobile').value; document.getElementById('outCustMobile').textContent = mobile ? ('Mobile: ' + mobile) : ''; var custGst = document.getElementById('custGst').value; document.getElementById('outCustGst').textContent = custGst ? ('GSTIN: ' + custGst) : ''; // payment box if(paymentStatus === 'paid'){ document.getElementById('outPaymentPending').style.display = 'none'; document.getElementById('outPaymentPaid').style.display = 'block'; } else { document.getElementById('outPaymentPending').style.display = 'block'; document.getElementById('outPaymentPaid').style.display = 'none'; document.getElementById('outPayDetails').textContent = document.getElementById('cPay').value || '—'; } // items table var body = document.getElementById('outItemsBody'); body.innerHTML = ''; if(items.length === 0){ body.innerHTML = 'Koi item add nahi kiya gaya.'; } else { items.forEach(function(it){ var tr = document.createElement('tr'); tr.innerHTML = ''+ esc(it.name) +''+ ''+ it.qty +''+ ''+ money(it.rate) +''+ ''+ money(it.amount) +''; body.appendChild(tr); }); } // totals var subtotal = items.reduce(function(s,it){ return s + it.amount; }, 0); var discountType = document.getElementById('discountType').value; var discountRaw = parseFloat(document.getElementById('discountValue').value)||0; var discountAmount = discountType === 'percent' ? subtotal * discountRaw / 100 : discountRaw; if(discountAmount > subtotal) discountAmount = subtotal; var taxable = subtotal - discountAmount; var gstType = document.getElementById('gstType').value; var gstRaw = parseFloat(document.getElementById('gstValue').value)||0; var gstAmount = gstType === 'percent' ? taxable * gstRaw / 100 : gstRaw; var courier = parseFloat(document.getElementById('courierValue').value)||0; var finalTotal = taxable + gstAmount + courier; var rows = ''; rows += totalRow('Subtotal', '₹' + money(subtotal)); if(discountAmount > 0){ var discLabel = 'Discount' + (discountType==='percent' ? ' ('+discountRaw+'%)' : ''); rows += totalRow(discLabel, '- ₹' + money(discountAmount)); } if(gstAmount > 0){ var gstLabel = 'GST' + (gstType==='percent' ? ' ('+gstRaw+'%)' : ''); rows += totalRow(gstLabel, '+ ₹' + money(gstAmount)); } rows += totalRow('Courier / Shipping', courier > 0 ? '₹' + money(courier) : 'FREE'); rows += '
Grand Total₹'+ money(finalTotal) +'
'; document.getElementById('outTotals').innerHTML = rows; // footer note document.getElementById('outFootNote').textContent = document.getElementById('footNote').value || ''; document.getElementById('emptyState').style.display = 'none'; document.getElementById('invoice').classList.add('show'); } document.getElementById('generateBtn').addEventListener('click', renderInvoice); document.getElementById('resetBtn').addEventListener('click', function(){ if(!confirm('Sab fields clear kar dein?')) return; document.querySelectorAll('.panel input[type=text], .panel input[type=number], .panel textarea').forEach(function(el){ el.value=''; }); itemRows.innerHTML = ''; addItemRow(); addItemRow(); addItemRow(); logoDataUrl = null; logoInput.value = ''; logoPreview.innerHTML = 'No logo'; document.getElementById('invDate').value = todayStr(); document.getElementById('invNumber').value = 'INV-' + Math.floor(1000+Math.random()*9000); setPayStatus('pending'); document.getElementById('invoice').classList.remove('show'); document.getElementById('emptyState').style.display = 'block'; }); document.getElementById('printBtn').addEventListener('click', function(){ window.print(); }); document.getElementById('downloadPdfBtn').addEventListener('click', function(){ var invoiceEl = document.getElementById('invoice'); var actionRow = document.querySelector('.action-row'); var invNo = (document.getElementById('invNumber').value || 'invoice').trim(); var custName = (document.getElementById('custName').value || '').trim(); var safeName = custName ? custName.replace(/[^a-zA-Z0-9\u0900-\u097F ]/g, '').trim().replace(/\s+/g, '_') : ''; var pdfFileName = safeName ? (invNo + '-' + safeName) : invNo; var btn = document.getElementById('downloadPdfBtn'); var originalLabel = btn.textContent; btn.textContent = 'Preparing PDF…'; actionRow.style.display = 'none'; // Scroll to top first: html2canvas captures based on current scroll // position, so leftover scroll causes blank space at the top of the PDF. window.scrollTo(0, 0); html2pdf().set({ margin: 8, filename: pdfFileName + '.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true, scrollX: 0, scrollY: 0, windowWidth: document.documentElement.scrollWidth }, jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } }).from(invoiceEl).save().then(function(){ actionRow.style.display = 'flex'; btn.textContent = originalLabel; }).catch(function(err){ actionRow.style.display = 'flex'; btn.textContent = originalLabel; alert('PDF banane mein dikkat aayi. Kripya "Print" button se Save-as-PDF try karein.'); console.error(err); }); }); } if(document.readyState === 'loading'){ document.addEventListener('DOMContentLoaded', initInvoiceApp); } else { initInvoiceApp(); }
Join Our WhatsApp Channel
Scroll to Top