Brand Info

Student Info

Signatures & Verification

Fees Table (Add GST)

Sl NoParticularsAmount (₹)GST %Action
1 Admission Fee 000 00

Mob: | Email:

Website:

Student Information

NameRoll No.
FatherMother
CourseBill Date

INVOICE / FEE RECEIPT

Fee Details with GST

Sl NoParticularsAmount (₹)GST %GST Amt (₹)Total (₹)
Grand Total: ₹ 0
Student Signature
Receipt Signature
} // Header image preview document.getElementById('headerImg').addEventListener('change', function(){ const file = this.files[0]; if(!file) return; const reader = new FileReader(); reader.onload = e => { document.getElementById('headerImage').src = e.target.result; }; reader.readAsDataURL(file); }); // Logo preview document.getElementById('brandLogo').addEventListener('change',function(){ const file=this.files[0]; if(!file) return; const reader=new FileReader(); reader.onload=e=>{ const logo=document.getElementById('viewLogo'); logo.style.backgroundImage=`url(${e.target.result})`; logo.style.backgroundSize='cover'; logo.textContent=''; }; reader.readAsDataURL(file); }); // Signatures function sigPreview(inputId,lineId){ const file=document.getElementById(inputId).files[0]; if(!file) return; const reader=new FileReader(); reader.onload=e=>{ document.getElementById(lineId).style.backgroundImage=`url(${e.target.result})`; }; reader.readAsDataURL(file); } document.getElementById('stuSig').addEventListener('change',()=>sigPreview('stuSig','stuSigBox')); document.getElementById('recSig').addEventListener('change',()=>sigPreview('recSig','recSigBox')); document.getElementById('updateBtn').addEventListener('click',updateInvoice); // Add row in form table document.getElementById('addRowBtn').addEventListener('click', () => { const tbody = document.querySelector('#formFeesTable tbody'); const tr = document.createElement('tr'); const index = tbody.children.length + 1; tr.innerHTML = ` ${index} New Fee 0 0 `; tbody.appendChild(tr); attachRemoveEvents(); updateInvoice(); }); // Attach remove row functionality function attachRemoveEvents() { document.querySelectorAll('.remove-row-btn').forEach(btn => { btn.onclick = (e) => { e.target.closest('tr').remove(); const rows = document.querySelectorAll('#formFeesTable tbody tr'); rows.forEach((row, i) => row.children[0].innerText = i + 1); updateInvoice(); }; }); } attachRemoveEvents(); // PDF document.getElementById('pdfBtn').addEventListener('click',()=>{ updateInvoice(); html2pdf().from(document.getElementById('invoice')).set({margin:10, filename:`invoice_${document.getElementById('roll').value}.pdf`, image:{type:'jpeg',quality:0.98}, html2canvas:{scale:2}, jsPDF:{unit:'mm',format:'a4',orientation:'portrait'}}).save(); }); updateInvoice();