Refactored & adjusted page head width
This commit is contained in:
parent
2777cf843e
commit
b53420e64e
1 changed files with 13 additions and 11 deletions
|
|
@ -1252,7 +1252,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||
|
||||
$posx = $this->page_largeur - $this->marge_droite - 100;
|
||||
$w = 110;
|
||||
|
||||
$posx = $this->page_largeur - $this->marge_droite - $w;
|
||||
$posy = $this->marge_haute;
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
|
|
@ -1275,12 +1277,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
} else {
|
||||
$pdf->SetTextColor(200, 0, 0);
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
|
||||
}
|
||||
} else {
|
||||
$text = $this->emetteur->name;
|
||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, $ltrdirection);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1288,7 +1290,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref);
|
||||
$pdf->MultiCell(100, 3, $title, '', 'R');
|
||||
$pdf->MultiCell($w, 3, $title, '', 'R');
|
||||
$posy += 1;
|
||||
|
||||
if ($object->ref_supplier) {
|
||||
|
|
@ -1296,7 +1298,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$pdf->SetFont('', 'B', $default_font_size);
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefSupplier")." : ".$outputlangs->convToOutputCharset($object->ref_supplier), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefSupplier")." : ".$outputlangs->convToOutputCharset($object->ref_supplier), '', 'R');
|
||||
$posy += 1;
|
||||
}
|
||||
|
||||
|
|
@ -1320,7 +1322,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$pdf->SetXY($posx, $posy);
|
||||
$langs->load("projects");
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1328,12 +1330,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$posy += 5;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R');
|
||||
} else {
|
||||
$posy += 5;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(255, 0, 0);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
|
|
@ -1351,7 +1353,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$posy += 4;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("SupplierCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
|
||||
}
|
||||
|
||||
// Get contact
|
||||
|
|
@ -1363,7 +1365,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$posy += 4;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->MultiCell(100, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
$pdf->MultiCell($w, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue