Fix pdf einstein automatic calculation (#33713)

* fix(pdf-einstein): let automatic calculation for pos

* removed ;
This commit is contained in:
atm-irvine 2025-04-03 17:12:28 +02:00 committed by GitHub
parent 038008dd69
commit 87b254e0fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1361,8 +1361,8 @@ class pdf_einstein extends ModelePDFCommandes
if (getDolGlobalString('PDF_SHOW_PROJECT_TITLE')) {
$object->fetch_projet();
if (!empty($object->project->ref)) {
$posy += 3;
if (!empty($object->project->title)) {
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->title) ? '' : $object->project->title), '', 'R');
@ -1373,20 +1373,20 @@ class pdf_einstein extends ModelePDFCommandes
$object->fetch_projet();
if (!empty($object->project->ref)) {
$outputlangs->load("projects");
$posy += 3;
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R');
}
}
$posy += 4;
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
if (!getDolGlobalString('MAIN_PDF_HIDE_CUSTOMER_CODE') && !empty($object->thirdparty->code_client)) {
$posy += 4;
$posy = $pdf->GetY();
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : ".$outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');