18 |
* |
* |
19 |
* $Id$ |
* $Id$ |
20 |
* $Source$ |
* $Source$ |
|
* |
|
21 |
*/ |
*/ |
22 |
|
|
23 |
/** |
/** |
80 |
$this->posxtva=121; |
$this->posxtva=121; |
81 |
$this->posxup=133; |
$this->posxup=133; |
82 |
$this->posxqty=151; |
$this->posxqty=151; |
83 |
$this->posxdiscount=163; |
$this->posxdiscount=162; |
84 |
$this->postotalht=173; |
$this->postotalht=177; |
85 |
} |
} |
86 |
|
|
87 |
/** |
/** |
179 |
if ($libelleproduitservice) $libelleproduitservice.="\n"; |
if ($libelleproduitservice) $libelleproduitservice.="\n"; |
180 |
$libelleproduitservice.=$prop->lignes[$i]->desc; |
$libelleproduitservice.=$prop->lignes[$i]->desc; |
181 |
} |
} |
|
$pdf->SetXY ($this->posxdesc-1, $curY); |
|
182 |
|
|
183 |
if ($prop->lignes[$i]->product_id) |
if ($prop->lignes[$i]->product_id) |
184 |
{ |
{ |
196 |
// Affichage durée si il y en a une |
// Affichage durée si il y en a une |
197 |
$libelleproduitservice.="\n(".$langs->trans("From")." ".dolibarr_print_date($prop->lignes[$i]->date_start)." ".$langs->trans("to")." ".dolibarr_print_date($prop->lignes[$i]->date_end).")"; |
$libelleproduitservice.="\n(".$langs->trans("From")." ".dolibarr_print_date($prop->lignes[$i]->date_start)." ".$langs->trans("to")." ".dolibarr_print_date($prop->lignes[$i]->date_end).")"; |
198 |
} |
} |
199 |
$pdf->MultiCell(108, 5, $libelleproduitservice, 0, 'J'); |
|
200 |
|
$pdf->SetXY ($this->posxdesc-1, $curY); |
201 |
|
$pdf->MultiCell(108, 3, $libelleproduitservice, 0, 'J'); |
202 |
|
|
203 |
$nexY = $pdf->GetY(); |
$nexY = $pdf->GetY(); |
204 |
|
|
205 |
// TVA |
// TVA |
206 |
$pdf->SetXY ($this->posxtva, $curY); |
$pdf->SetXY ($this->posxtva, $curY); |
207 |
$pdf->MultiCell(10, 5, ($prop->lignes[$i]->tva_tx < 0 ? '*':'').abs($prop->lignes[$i]->tva_tx), 0, 'C'); |
$pdf->MultiCell(10, 5, ($prop->lignes[$i]->tva_tx < 0 ? '*':'').abs($prop->lignes[$i]->tva_tx), 0, 'R'); |
208 |
|
|
209 |
// Prix unitaire HT avant remise |
// Prix unitaire HT avant remise |
210 |
$pdf->SetXY ($this->posxup, $curY); |
$pdf->SetXY ($this->posxup, $curY); |
224 |
// Total HT ligne |
// Total HT ligne |
225 |
$pdf->SetXY ($this->postotalht, $curY); |
$pdf->SetXY ($this->postotalht, $curY); |
226 |
$total = price($prop->lignes[$i]->price * $prop->lignes[$i]->qty); |
$total = price($prop->lignes[$i]->price * $prop->lignes[$i]->qty); |
227 |
$pdf->MultiCell(26, 5, $total, 0, 'R', 0); |
$pdf->MultiCell(23, 5, $total, 0, 'R', 0); |
228 |
|
|
229 |
// Collecte des totaux par valeur de tva |
// Collecte des totaux par valeur de tva |
230 |
// dans le tableau tva["taux"]=total_tva |
// dans le tableau tva["taux"]=total_tva |
232 |
if ($prop->remise_percent) $tvaligne-=($tvaligne*$prop->remise_percent)/100; |
if ($prop->remise_percent) $tvaligne-=($tvaligne*$prop->remise_percent)/100; |
233 |
$this->tva[ (string)$prop->lignes[$i]->tva_tx ] += $tvaligne; |
$this->tva[ (string)$prop->lignes[$i]->tva_tx ] += $tvaligne; |
234 |
|
|
235 |
|
$nexY+=2; // Passe espace entre les lignes |
236 |
|
|
237 |
if ($nexY > 200 && $i < $nblignes - 1) |
if ($nexY > 200 && $i < $nblignes - 1) |
238 |
{ |
{ |
239 |
$this->_tableau($pdf, $tab_top, $tab_height, $nexY); |
$this->_tableau($pdf, $tab_top, $tab_height, $nexY); |
518 |
|
|
519 |
$pdf->SetFont('Arial','',10); |
$pdf->SetFont('Arial','',10); |
520 |
|
|
521 |
$pdf->SetXY (10, $tab_top+2); |
$pdf->SetXY ($this->posxdesc-1, $tab_top+2); |
522 |
$pdf->MultiCell(40,2, $langs->trans("Designation"),'','L'); |
$pdf->MultiCell(108,2, $langs->trans("Designation"),'','L'); |
523 |
|
|
524 |
$pdf->line(120, $tab_top, 120, $tab_top + $tab_height); |
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height); |
525 |
$pdf->SetXY (120, $tab_top+2); |
$pdf->SetXY ($this->posxtva-1, $tab_top+2); |
526 |
$pdf->MultiCell(12,2, $langs->trans("VAT"),'','C'); |
$pdf->MultiCell(12,2, $langs->trans("VAT"),'','C'); |
527 |
|
|
528 |
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height); |
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); |
529 |
$pdf->SetXY (132, $tab_top+2); |
$pdf->SetXY ($this->posxup-1, $tab_top+2); |
530 |
$pdf->MultiCell(18,2, $langs->trans("PriceUHT"),'','C'); |
$pdf->MultiCell(18,2, $langs->trans("PriceUHT"),'','C'); |
531 |
|
|
532 |
$pdf->line(150, $tab_top, 150, $tab_top + $tab_height); |
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); |
533 |
$pdf->SetXY (150, $tab_top+2); |
$pdf->SetXY ($this->posxqty-1, $tab_top+2); |
534 |
$pdf->MultiCell(12,2, $langs->trans("Qty"),'','C'); |
$pdf->MultiCell(11,2, $langs->trans("Qty"),'','C'); |
535 |
|
|
536 |
$pdf->line(162, $tab_top, 162, $tab_top + $tab_height); |
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); |
537 |
$pdf->SetXY (162, $tab_top+2); |
$pdf->SetXY ($this->posxdiscount-1, $tab_top+2); |
538 |
$pdf->MultiCell(15,2, $langs->trans("Discount"),'','C'); |
$pdf->MultiCell(16,2, $langs->trans("Discount"),'','C'); |
539 |
|
|
540 |
$pdf->line(177, $tab_top, 177, $tab_top + $tab_height); |
$pdf->line($this->postotalht-1, $tab_top, $this->postotalht-1, $tab_top + $tab_height); |
541 |
$pdf->SetXY (177, $tab_top+2); |
$pdf->SetXY ($this->postotalht-1, $tab_top+2); |
542 |
$pdf->MultiCell(23,2, $langs->trans("TotalHT"),'','C'); |
$pdf->MultiCell(23,2, $langs->trans("TotalHT"),'','C'); |
543 |
|
|
544 |
} |
} |
657 |
// Nom client |
// Nom client |
658 |
$pdf->SetXY(102,$posy+3); |
$pdf->SetXY(102,$posy+3); |
659 |
$pdf->SetFont('Arial','B',11); |
$pdf->SetFont('Arial','B',11); |
660 |
$pdf->MultiCell(86,4, $prop->client->nom, 0, 'L'); |
$pdf->MultiCell(106,4, $prop->client->nom, 0, 'L'); |
661 |
|
|
662 |
// Caractéristiques client |
// Caractéristiques client |
663 |
$carac_client=$prop->client->adresse; |
$carac_client=$prop->client->adresse; |