This commit is contained in:
Suvodip
2025-03-19 19:31:46 +05:30
parent 773d443bbf
commit 1452a3a093
4 changed files with 39 additions and 8 deletions

View File

@@ -99,6 +99,19 @@ if ($invoiceInfo['tenure'] > 1) {
<button onclick="window.print()" class="btn text-white btn-print w-100" style="background-color: #374151;">Print Invoice</button>
</div>
</div>
<script src="/assets/js/html2pdf.bundle.min.js"></script>
<script>
function downloadPDF() {
const invoice = document.getElementById("invoice-box");
html2pdf(invoice, {
margin: 10,
filename: 'invoice.pdf',
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
});
}
</script>
<style>
body {