Problems PDF Invoice

ampradas

Постоялец
Регистрация
14 Сен 2016
Сообщения
34
Реакции
54
Hello!
I need help, In the invoices that I send to the clients, does not appear, the number of fiscal identification of them, Vat Number, I have configured prestashop, location, countries, and nothing does not appear in the PDF. I do not know what to do and how to do it. I need you to generate the invoice, show VAT NUMBER.
Thank you very much.
 
Hi
  1. Customers->Preferences->Enable B2B mode Для просмотра ссылки Войди или Зарегистрируйся
  2. In customer address mus be
    Company Name
    VAT number
    Для просмотра ссылки Войди или Зарегистрируйся
  3. activated on back-office the "European VAT number" module (optional)
  4. Для просмотра ссылки Войди или Зарегистрируйся - Find country like Greece Для просмотра ссылки Войди или Зарегистрируйся
  5. Edit Для просмотра ссылки Войди или Зарегистрируйся - and save :)
  6. Result Для просмотра ссылки Войди или Зарегистрируйся
If need edit template programicaly:

Make override classes/pdf/HtmlTemplateInvoice.php and edit or add what you need. Ex. in line ~309 exist:
Код:
$data = array(
            'order' => $this->order,
            'order_invoice' => $this->order_invoice,
            'order_details' => $order_details,
            'carrier' => $carrier,
.....

to $data = array you add line for each variable, as you can see in Country > adress, so you can add for example

Код:
 'incompany_value' => $invoice_address->company,
  'indni_value' => $invoice_address->dni,
  'invat_value' => $invoice_address->vat_number,
  'incountry_value' => $invoice_address->country,
  'inmail_value' => $customer->email

For creating variables for Company name, DNI and VAT, country and email (you can use all variables as firstname lastname etc)
and in your invoice template you simply use

Код:
VAT: {$invat_value}
and you see f.e. VAT: XX147258369

It's all ... :)


Hello!
I need help, In the invoices that I send to the clients, does not appear, the number of fiscal identification of them, Vat Number, I have configured prestashop, location, countries, and nothing does not appear in the PDF. I do not know what to do and how to do it. I need you to generate the invoice, show VAT NUMBER.
Thank you very much.
 
Назад
Сверху