This commit is contained in:
liedekef 2007-01-04 14:58:06 +00:00
parent 589ddce2e2
commit 7d30337159
2 changed files with 21 additions and 9 deletions

View File

@ -308,8 +308,14 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$pdf->SetFont('Arial','B',12); $pdf->SetFont('Arial','B',12);
$client = new Societe($this->db); $client = new Societe($this->db);
/*
* if a delivery address is used, use that, else use the client address
*/
if ($commande->adresse_livraison_id>0) {
$client->fetch_adresse_livraison($commande->adresse_livraison_id);
} else {
$client->fetch($delivery->socid); $client->fetch($delivery->socid);
$delivery->client = $client; }
$pdf->SetXY(102,42); $pdf->SetXY(102,42);
$pdf->MultiCell(96,5, $delivery->client->nom); $pdf->MultiCell(96,5, $delivery->client->nom);
$pdf->SetFont('Arial','B',11); $pdf->SetFont('Arial','B',11);

View File

@ -729,10 +729,16 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$pdf->SetFont('Arial','',8); $pdf->SetFont('Arial','',8);
$pdf->SetXY(102,$posy-5); $pdf->SetXY(102,$posy-5);
$pdf->MultiCell(80,5, $langs->transnoentities("BillTo").":"); $pdf->MultiCell(80,5, $langs->transnoentities("DeliveryAddress").":");
//
$client = new Societe($this->db); /*
* if a delivery address is used, use that, else use the client address
*/
if ($commande->adresse_livraison_id>0) {
$client->fetch_adresse_livraison($commande->adresse_livraison_id);
} else {
$client->fetch($delivery->socid); $client->fetch($delivery->socid);
}
$delivery->client = $client; $delivery->client = $client;
// //