fix deprecated

This commit is contained in:
Philippe GRAND 2020-08-08 15:12:29 +02:00
parent 0603a3ef60
commit f35893ceb4

View File

@ -722,8 +722,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
// If France, show VAT mention if not applicable // If France, show VAT mention if not applicable
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
{
$pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("VATIsNotUsedForInvoice"), 0, 'L', 0);
@ -734,8 +733,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$posxval = 52; $posxval = 52;
// Show payments conditions // Show payments conditions
if (!empty($object->cond_reglement_code) || $object->cond_reglement) if (!empty($object->cond_reglement_code) || $object->cond_reglement_id) {
{
$pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$titre = $outputlangs->transnoentities("PaymentConditions") . ':'; $titre = $outputlangs->transnoentities("PaymentConditions") . ':';
@ -743,7 +741,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetFont('', '', $default_font_size - 2); $pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $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); $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_id);
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L'); $pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
@ -751,8 +749,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
} }
// Show payment mode // Show payment mode
if (!empty($object->mode_reglement_code)) if (!empty($object->mode_reglement_code)) {
{
$pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$titre = $outputlangs->transnoentities("PaymentMode") . ':'; $titre = $outputlangs->transnoentities("PaymentMode") . ':';
@ -766,7 +763,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$posy = $pdf->GetY() + 2; $posy = $pdf->GetY() + 2;
} }
return $posy; return $posy;
} }
@ -1174,7 +1170,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetXY($posx, $posy); $pdf->SetXY($posx, $posy);
$langs->load("projects"); $langs->load("projects");
$pdf->SetTextColor(0, 0, 60); $pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->projet->ref), '', 'R'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : ".(empty($object->project->ref) ? '' : $object->project->ref), '', 'R');
} }
} }