Is Spain a legal invoice has to show a CIF (tax identification number of a company) or NIF (tax identification number of a person).
Phoca PDF does not display this parameter.
How can I add?
Thanks in advance,
CIF/NIF NUMBER INTO INVOICE
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: CIF/NIF NUMBER INTO INVOICE
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 12
- Joined: 13 Oct 2011, 03:53
Re: CIF/NIF NUMBER INTO INVOICE
Hi,
this article has obsolete, was a solution for VM 1.1.0, but I have the new solution.
There are modify the tmpl.invoice.php, tmpl.deliverynote.php, and virtuemartpdfoutput.php files.
This files are in the path: "..plugins\phocapdf\virtuemart\"
In tmpl.invoice.php and tmpl.deliverynote.php files you have to modify the same lines in both files, the line is the 166:
Original code:
New code
Because "vm_extrafield" is the variable (for VAT number) in the VM 1.1.5 and latest.
In virtuemartpdfoutput.php file the code to modify is in line 313:
Original code:
New code:
and in line 414
Original code:
New code:
Excuse me for my bad english.
this article has obsolete, was a solution for VM 1.1.0, but I have the new solution.
There are modify the tmpl.invoice.php, tmpl.deliverynote.php, and virtuemartpdfoutput.php files.
This files are in the path: "..plugins\phocapdf\virtuemart\"
In tmpl.invoice.php and tmpl.deliverynote.php files you have to modify the same lines in both files, the line is the 166:
Original code:
Code: Select all
if ($a['extra_field_1'] != '') {
$o .= '<span class="extrafield">'.$a['l_extra_field_1'] . ': '.$a['extra_field_1']. '</span><br />';
}
Code: Select all
if ($a['vm_extrafield'] != '') {
$o .= '<span class="extrafield">'.$a['l_vm_extrafield'] . ': '.$a['vm_extrafield']. '</span><br />';
}
In virtuemartpdfoutput.php file the code to modify is in line 313:
Original code:
Code: Select all
$var = array('extra_field' => 'extra_field_1');
$dbuf1 = PhocaPDFVirtueMartHelper::dbQ('dbuf', $var);
Code: Select all
$var = array('extra_field' => 'vm_extrafield');
$dbuf1 = PhocaPDFVirtueMartHelper::dbQ('dbuf', $var);
Original code:
Code: Select all
$a['l_extra_field_1'] = '';
if (isset($dbuf1->title)) {$a['l_extra_field_1'] = $dbuf1->title;}
Code: Select all
$a['l_vm_extrafield'] = '';
if (isset($dbuf1->title_)) {$a['l_vm_extrafield'] = $dbuf1->title;}