DrizztDoUrden Posted January 19, 2022 Share Posted January 19, 2022 I need to add the customer delivery and billing vat_number on the invoice generated by prestashop. I've tryed to modify my classes/pdf/HTMLTemplateInvoice.php adding 'customer_vat_number' => $invoice_address->vat_number like that: $data = array( 'order' => $this->order, 'order_invoice' => $this->order_invoice, 'order_details' => $order_details, 'carrier' => $carrier, 'cart_rules' => $cart_rules, 'delivery_address' => $formatted_delivery_address, 'invoice_address' => $formatted_invoice_address, 'addresses' => array('invoice' => $invoice_address, 'delivery' => $delivery_address), 'tax_excluded_display' => $tax_excluded_display, 'display_product_images' => $display_product_images, 'layout' => $layout, 'tax_tab' => $this->getTaxTabContent(), 'customer' => $customer, 'footer' => $footer, 'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_, 'round_type' => $round_type, 'legal_free_text' => $legal_free_text, 'customer_vat_number' => $invoice_address->vat_number, // <= that doesn't works!! ); and also adding this to the pdf/invoice.addresses-tab.tpl <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="50%">{if $delivery_address}<span class="bold">{l s='Delivery Address' d='Shop.Pdf' pdf='true'}</span><br/><br/> {$delivery_address}<br/>{$customer_vat_number} // <= that {/if} </td> <td width="50%"><span class="bold">{l s='Billing Address' d='Shop.Pdf' pdf='true'}</span><br/><br/> {$invoice_address}<br/>{$customer_vat_number} // <= that </td> </tr> </table> But it doesn't works! Help please! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now