post_type === \EasyInvoice\Constants\PostTypes::EASY_INVOICE_QUOTE_POST_TYPE) { // Load quote from post using the correct service provider $quote = \EasyInvoice\Providers\QuoteServiceProvider::getQuoteRepository()->find($post->ID); // Ensure quote has proper slug for pretty URLs if ($quote) { $quote->ensureProperSlug(); } } if (!$quote) { wp_die(__('Quote not found.', 'easy-invoice')); } // Get the selected template for this quote $current_template = $quote->getTemplate(); if (empty($current_template)) { $current_template = 'standard'; } // Initialize formatter for the quote templates $formatter = new \EasyInvoice\Helpers\QuoteFormatter($quote); // Check if the template file exists $template_file = EASY_INVOICE_PLUGIN_DIR . 'templates/quote-templates/' . $current_template . '.php'; $template_file = file_exists($template_file) ? $template_file : EASY_INVOICE_PLUGIN_DIR . 'templates/quote-templates/default.php'; ?> >
| getName()); ?> | getDescription()); ?> | getQuantity()); ?> | getPrice(), 2)); ?> | getAdjustPercentage(); if ($adjust_percentage != 0) { echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%'; } else { echo esc_html__('—', 'easy-invoice'); } ?> | getAmount(), 2)); ?> |