Hello,
How can I add 2 lines in the company details in the invoice “sponge”
I want to add:
- Company registration code
- Manager name (which is set in the company settings)
here: https://i.imgur.com/yINNHLE.png
Thanks in advance!
Regards,
Rumen
Hello,
How can I add 2 lines in the company details in the invoice “sponge”
I want to add:
here: https://i.imgur.com/yINNHLE.png
Thanks in advance!
Regards,
Rumen
You probably can configure this somewhere (setup PDF has some options) but in our case we have for Japanese invoices a different format than for international invoices. So we hard coded the company details in the PHP file.
Look in the PDF template file probably located in:
/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
in our case we implemented this in pdf_crabe.modules.php but it should be similar
search around line 2071 for
// Show sender information
$pdf->SetXY($posx + 2, $posy);
$pdf->SetFont('', '', $default_font_size - 1);
($object->thirdparty->country_code == "JP") {
// Show sender address information, phone number, email and website.
// the standard output is an english address, but we require here japanese characters and format.
$html = "your postal code";
$html .= "\n";
$html .= "street";
$html .= "\n";
$html .= "\n";
$html .= "phone";
$html .= "\n";
$html .= "email:";
$html .= "\n";
$html .= "website";
} else {
// Show sender address information,vat id phone number, email and website.
$html = "street";
$html .= "\n";
$html .= "postal code city province";
$html .= "\n";
$html .= "Country";
$html .= "\n";
$html .= "\n";
$html .= "vat id: ";
$html .= "\n";
$html .= "phone:";
$html .= "\n";
$html .= "email: ";
$html .= "\n";
$html .= "web: https//www.com";
}
// $pdf->MultiCell($widthrecbox-2, 4, $carac_emetteur, 0, 'L');
$pdf->MultiCell($widthrecbox - 2, 4, $html, 0, 'L');
// If BILLING contact defined on invoice, we use it
$usecontact = false;
So in my case when we invoice to a Japanese customer the first address is picked up, when we invoice to any other country in the world we pick up the second address.
Thank you very much! I will have a look. In Bulgaria is good to have the company registration number which could be the same as the VAT tax number which simply have a prefix BG in front, but can be different as well, so it is good to have it as a different line and also the name of the responsible person for the payments (usually the manager) for both sides sender and receiver. So we need to implement it somehow.
I will see it now.