Fix: Customer code was not visible

This commit is contained in:
Laurent Destailleur 2010-07-29 16:43:40 +00:00
parent 5e19987567
commit 48262f2d41
2 changed files with 26 additions and 9 deletions

View File

@ -110,6 +110,8 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
}
}
$object->fetch_client();
$nblignes = sizeof($object->lignes);
$objectref = dol_sanitizeFileName($object->ref);
@ -380,8 +382,6 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
* Adresse Client
*/
$object->fetch_client();
// If SHIPPING contact defined on invoice, we use it
$usecontact=false;
$arrayidcontact=$object->commande->getIdContact('external','SHIPPING');
@ -419,9 +419,17 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('Arial','B',12);
$pdf->Text(11, 88, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_valid,"day",false,$outputlangs,true));
$pdf->Text(11, 88, $outputlangs->transnoentities("Date")." : " . dol_print_date(($object->date_delivery?$object->date_delivery:$date->valid),"day",false,$outputlangs,true));
$pdf->Text(11, 94, $outputlangs->transnoentities("DeliveryOrder")." ".$outputlangs->convToOutputCharset($object->ref));
if ($object->client->code_client)
{
$posy+=7;
$pdf->SetXY(102,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(96, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
}
$pdf->SetFont('Arial','B',9);
// Add list of linked orders

View File

@ -132,6 +132,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
}
$object->fetch_client();
$nblignes = sizeof($object->lignes);
$objectref = dol_sanitizeFileName($object->ref);
@ -509,7 +511,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
{
if (is_readable($logo))
{
$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);
$pdf->Image($logo, $this->marge_gauche, $posy, 0, 22);
}
else
{
@ -521,18 +523,19 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
else $pdf->MultiCell(100, 4, $this->emetteur->nom, 0, 'L');
$pdf->SetFont('Arial','B',13);
$pdf->SetFont('Arial','B',12);
$pdf->SetXY(100,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DeliveryOrder")." ".$outputlangs->convToOutputCharset($object->ref), '' , 'R');
$pdf->SetFont('Arial','',12);
$posy+=6;
$posy+=5;
$pdf->SetXY(100,$posy);
$pdf->SetTextColor(0,0,60);
if ($object->date_valid)
{
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_valid,"%d %b %Y",false,$outputlangs,true), '', 'R');
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date(($object->date_delivery?$object->date_delivery:$date->valid),"%d %b %Y",false,$outputlangs,true), '', 'R');
}
else
{
@ -541,6 +544,14 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetTextColor(0,0,60);
}
if ($object->client->code_client)
{
$posy+=5;
$pdf->SetXY(100,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
}
$pdf->SetTextColor(0,0,60);
// Add list of linked orders
@ -612,8 +623,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Cadre client destinataire
$pdf->rect(100, $posy, 100, $hautcadre);
$object->fetch_client();
// If SHIPPING contact defined on invoice, we use it
$usecontact=false;
$arrayidcontact=$object->commande->getIdContact('external','SHIPPING');