Ok, today I did some work wth dolibarr 3.2.0 which I upgraded during the weekend. It seems that still for some reason the code
of dol_nboflines_bis() function does not work or get executed.
The problem of overwriting the address persists in 3.2.0 for me too.
I will try to check this closer during this week, after we do some more work with dolibarr n our company.
I hope it will be better if the developers fix these two problems in version 3.2 as an update, because too much people without programming knowledge are using Dolibarr. I tried too much to apply the solutions mentioned here but was not successful.
Thanks for your effort to help solving this problem, but i have no knowledge about php programming. Therefore i dont know what to do with the codes you have written. Should i add this code into some place in azur.modules.php?
Yes, the code should be added where you see the line I showed in the previous posts. it is in doc directory in 3.2.0 and in file pdf_azur.module.php or something like that.
It is on the end of the _pagehead() function or near the end of it.
// Show recipient information
$pdf->SetFont('','', $default_font_size - 1);
//$pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4));
// Check if the company name is longer than 35 char. If yes, set the address pos to start lower.
if ( strlen ($carac_client_name) > 35 ) {
$pdf->SetXY($posx+2,$posy+12);
}
else
{
$pdf->SetXY($posx+2,$posy+8);
}
$pdf->MultiCell(100,4, $carac_client, 0, 'L');
}
}
It starts on line 1074 in htdocs/core/modules/propale/doc/pdf_azur.modules.php
Many thanks saxa,
I applied the codes as you mentioned and it worked for the recepient adress. The same fault exist also for the sender and I think we can use some codes like you sent for the sender.
Please see below the snapshot of the output of pdf_azur.modules. The sender (customer area is ok) name overwrites the sender address. I tried too much to solve it but no success. Please give some more help for this bug. I am sorry for annoying you too much.
The function dol_nboflines_bis is located in core/lib/functions.lib.php but in the file modules/propale/doc/pdf_azur.modules.php it is not included.
The pdf_azur.modules.php includes the file functions2.lib.php which has not the required function in it.
Ok this solution is not the one which works at least for me not. It seems that
on the old contacts I have I get the name of the contact overwritten, but on new companies the company name does not overwrite the address.
It seems now the company name overwrites the contacts name. This is in 3.2.2