post_type === \EasyInvoice\Constants\PostTypes::EASY_INVOICE_POST_TYPE) { // Load invoice from post using the correct service provider $invoice = \EasyInvoice\Providers\InvoiceServiceProvider::getInvoiceRepository()->find($post->ID); } if (!$invoice) { wp_die(__('Invoice not found.', 'easy-invoice')); } // Initialize formatter for currency formatting $formatter = new \EasyInvoice\Helpers\InvoiceFormatter($invoice); // Stripe is handled by the Pro plugin // Get the selected template for this invoice $current_template = $invoice->getTemplate(); if (empty($current_template)) { $current_template = 'standard'; } // Check if the template file exists $template_file = EASY_INVOICE_PLUGIN_DIR . 'templates/invoice-templates/' . $current_template . '.php'; $template_file = file_exists($template_file) ? $template_file : EASY_INVOICE_PLUGIN_DIR . 'templates/invoice-templates/default.php'; ?> > <?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?>
getStatus() === 'unpaid'): ?>
getStatus(); $show_pay_button = $invoice && in_array($invoice_status, ['unpaid', 'available']); ?>
getId(), '_easy_invoice_additional_css', true) ?: ''; $has_css = !empty($additional_css); ?>

getTitle() ?: __('Invoice', 'easy-invoice')); ?> getStatus() ?: 'draft')); ?>

getNumber()); ?> • getIssueDate())); ?>
getCustomerName()): ?>
getCustomerName()); ?>
getCustomerEmail()); ?>
getCustomerAddress()); ?>
getNotes()): ?>
getNotes())); ?>
getItems() as $item): ?>
getName()); ?> getDescription()); ?> getQuantity()); ?> format($item->getPrice())); ?> getAdjustPercentage(); if ($adjust_percentage != 0) { echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%'; } else { echo esc_html__('—', 'easy-invoice'); } ?> format($item->getAmount())); ?>
: format($invoice->getSubtotal())); ?>
getDiscountAmount() > 0): ?>
: -format($invoice->getDiscountAmount())); ?>
getTaxAmount() > 0): ?>
: format($invoice->getTaxAmount())); ?>
: format($invoice->getTotal())); ?>
getId(), '_easy_invoice_additional_css', true) ?: ''; if (!empty($additional_css)): ?>