Qual: Uniformize pdf code
This commit is contained in:
parent
066bcbb469
commit
64d8d558a5
@ -489,7 +489,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy=$pdf->GetY()+4;
|
||||
}
|
||||
|
||||
// Show payments conditions
|
||||
$posxval=52;
|
||||
|
||||
// Show payments conditions
|
||||
if ($object->cond_reglement_code || $object->cond_reglement)
|
||||
{
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
@ -498,7 +500,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
@ -515,7 +517,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
$posy=$pdf->GetY()+1;
|
||||
@ -533,7 +535,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->MultiCell(80, 5, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
|
||||
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
|
||||
|
||||
|
||||
@ -602,6 +602,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$posy=$pdf->GetY()+4;
|
||||
}
|
||||
|
||||
$posxval=52;
|
||||
|
||||
// Show payments conditions
|
||||
if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement))
|
||||
{
|
||||
@ -611,7 +613,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
@ -629,7 +631,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
$posy=$pdf->GetY()+1;
|
||||
@ -646,7 +648,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell(80, 5, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
|
||||
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$curX = $this->posxdesc-1;
|
||||
|
||||
$showpricebeforepagebreak=1;
|
||||
|
||||
|
||||
$pdf->startTransaction();
|
||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,0,$hookmanager);
|
||||
$pageposafter=$pdf->getPage();
|
||||
@ -299,7 +299,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
{
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs, $hookmanager);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs, $hookmanager);
|
||||
$pdf->setPage($pagenb+1);
|
||||
}
|
||||
}
|
||||
@ -526,6 +526,8 @@ class pdf_azur extends ModelePDFPropales
|
||||
$posy=$pdf->GetY()+4;
|
||||
}
|
||||
|
||||
$posxval=52;
|
||||
|
||||
// Show shipping date
|
||||
if ($object->date_livraison)
|
||||
{
|
||||
@ -535,7 +537,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$titre = $outputlangs->transnoentities("DateDeliveryPlanned").':';
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(82, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$dlp=dol_print_date($object->date_livraison,"daytext",false,$outputlangs,true);
|
||||
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
|
||||
|
||||
@ -549,7 +551,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(82, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_availability=$outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset($object->availability);
|
||||
$lib_availability=str_replace('\n',"\n",$lib_availability);
|
||||
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
|
||||
@ -566,7 +568,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->MultiCell(80, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(52, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
|
||||
@ -602,7 +604,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
||||
$pdf->MultiCell(80, 5, $titre, 0, 'L');
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY(50, $posy);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
|
||||
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user