Skip to content
Snippets Groups Projects
Commit 5753a99d authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #1882 pb with contacts in printed page

parent ee2a1260
No related branches found
No related tags found
No related merge requests found
...@@ -342,6 +342,24 @@ class PrintControler extends PrintFunctions ...@@ -342,6 +342,24 @@ class PrintControler extends PrintFunctions
$pdf->MultiCell(182,5,utf8_decode($contactInfos),1, 'C', false); $pdf->MultiCell(182,5,utf8_decode($contactInfos),1, 'C', false);
} }
//UNIQUE INTERNAL CONTACT
if ($this->array_print[$cpt]['user_lastname'] <> '') {
//BREAK A LINE
$pdf->SetY($pdf->GetY()+4);
//BREAK A LINE
$pdf->SetY($pdf->GetY()+4);
$pdf->SetFont('Arial','B',11);
//CONTACT
$pdf->Cell(182,5,utf8_decode(_PRINT_CONTACT),0,1, 'C', false);
$pdf->SetFont('Arial','',11);
$pdf->MultiCell(182,5,utf8_decode($this->array_print[$cpt]['user_firstname'] . " " . $this->array_print[$cpt]['user_lastname']),1, 'C', false);
}
/**********************************************************************/ /**********************************************************************/
//MULTI CONTACT //MULTI CONTACT
if ($this->array_print[$cpt]['retrieve_multi_contacts'] <> '') { if ($this->array_print[$cpt]['retrieve_multi_contacts'] <> '') {
...@@ -604,14 +622,14 @@ class PrintFunctions ...@@ -604,14 +622,14 @@ class PrintFunctions
foreach($this->object_print as $line_name => $line_value) { foreach($this->object_print as $line_name => $line_value) {
$return = false; $return = false;
$res_id = $line_value->res_id; $res_id = $line_value->res_id;
$queryContacts = str_replace('##res_id##', $res_id, $queryContacts); $queryContacts_tmp = str_replace('##res_id##', $res_id, $queryContacts);
$db->query($queryContacts); $db->query($queryContacts_tmp);
//$db->show(); //$db->show();
while($result = $db->fetch_object()) { while($result = $db->fetch_object()) {
$return .= "Contact : " . $this->getContactInfos($result->contact_id, $result->address_id); $return .= "Contact : " . $this->getContactInfos($result->contact_id, $result->address_id);
} }
$queryUsers = str_replace('##res_id##', $res_id, $queryUsers); $queryUsers_tmp = str_replace('##res_id##', $res_id, $queryUsers);
$db->query($queryUsers); $db->query($queryUsers_tmp);
//$db->show(); //$db->show();
while($result = $db->fetch_object()) { while($result = $db->fetch_object()) {
$return .= "Utilisateur : " . $this->getUserInfo($result->user_id) . "\r\n"; $return .= "Utilisateur : " . $this->getUserInfo($result->user_id) . "\r\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment