PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.1
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.1
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / templates / invoice-view.php

invoice-view.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.3.1, at templates/invoice-view.php

31 lines 886 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Enqueue PDF scripts
3 EasyInvoice\Includes\Helpers\PdfHelper::enqueuePdfScripts();
4 ?>
5
6 <div class="wrap">
7 <h1>Invoice #<?php echo esc_html($invoice->getNumber()); ?></h1>
8
9 <div class="invoice-actions">
10 <button type="button" class="button button-primary" id="generate-pdf">
11 Download PDF
12 </button>
13 </div>
14
15 </div>
16
17 <script>
18 document.addEventListener('DOMContentLoaded', function() {
19 const generatePdfButton = document.getElementById('generate-pdf');
20
21 generatePdfButton.addEventListener('click', function() {
22 // Use the new PDF generator that captures HTML directly
23 if (typeof InvoicePdfGenerator !== 'undefined') {
24 const pdfGenerator = new InvoicePdfGenerator();
25 pdfGenerator.generatePDF();
26 } else {
27 alert('PDF generator not available');
28 }
29 });
30 });
31 </script>