Display VAT number of customer on invoices

Hi,

I have added the VAT number in the customer card. However, this information is not displayed on invoices.
I am using Dolibar 3.8.2 and the default crabe PDF template for invoices.
I have also tried to use the field “professional ID 1”, but this field is not also showing up in the generated invoice.

Any idea on how to display either the VAT number or the professional ID (for customers)?

Thanks in advance.
Jim-

Check out your settings in [Home] >[Setup] > [PDF] (respectively //…/admin/pdf.php).

- Rules to forge address boxes
– Parameter
–> Show professionnal id with addresses on documents - Prof Id 1 (CIF/NIF) --> Value: YES

and

- Other
– Parameter
–> Hide VAT Intra num with addresses on documents --> Value: NO

Hello,

I am trying to display VAT ID on supplier invoice - both for supplier and our company. How can I do this? I tried the settings above, but it doesn’t work for cornas template for supplier invoice. I can modify the PHP template - I just dont know where is the VAT ID stored…

	$carac_emetteur .= ($carac_emetteur ? "\n" : '').$labelbeforecontactname.": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs));
				$carac_emetteur .= (getDolGlobalInt('PDF_SHOW_PHONE_AFTER_USER_CONTACT') || getDolGlobalInt('PDF_SHOW_EMAIL_AFTER_USER_CONTACT')) ? ' (' : '';
				$carac_emetteur .= (getDolGlobalInt('PDF_SHOW_PHONE_AFTER_USER_CONTACT') && !empty($object->user->office_phone)) ? $object->user->office_phone : '';
				$carac_emetteur .= (getDolGlobalInt('PDF_SHOW_PHONE_AFTER_USER_CONTACT') && getDolGlobalInt('PDF_SHOW_EMAIL_AFTER_USER_CONTACT')) ? ', ' : '';
				$carac_emetteur .= (getDolGlobalInt('PDF_SHOW_EMAIL_AFTER_USER_CONTACT') && !empty($object->user->email)) ? $object->user->email : '';
				$carac_emetteur .= (getDolGlobalInt('PDF_SHOW_PHONE_AFTER_USER_CONTACT') || getDolGlobalInt('PDF_SHOW_EMAIL_AFTER_USER_CONTACT')) ? ')' : '';
				$carac_emetteur .= "\n";
			}

			$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'source', $object);
      $carac_emetteur .= "\n".VATID."\n";

			// Show sender
			$posy = 42 + $top_shift;
			$posx = $this->marge_gauche;
			if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
				$posx = $this->page_largeur - $this->marge_droite - 80;
			}
			$hautcadre = 40;

Thank you in advance… Dalibor

Hi @dalibor

For your vat id you can use

$outputlangs->convToOutputCharset($this->emetteur->tva_intra)

and for customer vat id

$outputlangs->transnoentities($object->thirdparty->tva_intra)

1 Like