/[dolibarr]/dolibarr/htdocs/includes/modules/facture/pdf_crabe.modules.php
ViewVC logotype

Diff of /dolibarr/htdocs/includes/modules/facture/pdf_crabe.modules.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by eldy, Fri Aug 26 19:22:51 2005 UTC revision 1.59 by eldy, Thu Sep 1 19:27:06 2005 UTC
# Line 80  class pdf_crabe extends ModelePDFFacture Line 80  class pdf_crabe extends ModelePDFFacture
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    
# Line 171  class pdf_crabe extends ModelePDFFacture Line 171  class pdf_crabe extends ModelePDFFacture
171                          if ($libelleproduitservice) $libelleproduitservice.="\n";                          if ($libelleproduitservice) $libelleproduitservice.="\n";
172                          $libelleproduitservice.=$fac->lignes[$i]->desc;                          $libelleproduitservice.=$fac->lignes[$i]->desc;
173                      }                      }
                     $pdf->SetXY ($this->posxdesc-1, $curY);  
174                                            
175                      if ($fac->lignes[$i]->produit_id)                      if ($fac->lignes[$i]->produit_id)
176                      {                      {
# Line 187  class pdf_crabe extends ModelePDFFacture Line 186  class pdf_crabe extends ModelePDFFacture
186                          // Affichage durée si il y en a une                          // Affichage durée si il y en a une
187                          $libelleproduitservice.="\n(".$langs->trans("From")." ".dolibarr_print_date($fac->lignes[$i]->date_start)." ".$langs->trans("to")." ".dolibarr_print_date($fac->lignes[$i]->date_end).")";                          $libelleproduitservice.="\n(".$langs->trans("From")." ".dolibarr_print_date($fac->lignes[$i]->date_start)." ".$langs->trans("to")." ".dolibarr_print_date($fac->lignes[$i]->date_end).")";
188                      }                      }
189                      $pdf->MultiCell(108, 5, $libelleproduitservice, 0, 'J');  
190                        $pdf->SetXY ($this->posxdesc-1, $curY);
191                        $pdf->MultiCell(108, 3, $libelleproduitservice, 0, 'J');
192    
193                      $nexY = $pdf->GetY();                      $nexY = $pdf->GetY();
194    
# Line 205  class pdf_crabe extends ModelePDFFacture Line 206  class pdf_crabe extends ModelePDFFacture
206    
207                      // Remise sur ligne                      // Remise sur ligne
208                      $pdf->SetXY ($this->posxdiscount, $curY);                      $pdf->SetXY ($this->posxdiscount, $curY);
209                      if ($fac->lignes[$i]->remise_percent) {                      if ($fac->lignes[$i]->remise_percent)
210                                            {
211                          $pdf->MultiCell(14, 5, $fac->lignes[$i]->remise_percent."%", 0, 'R');                          $pdf->MultiCell(14, 5, $fac->lignes[$i]->remise_percent."%", 0, 'R');
212                      }                      }
213    
214                      // Total HT ligne                      // Total HT ligne
215                      $pdf->SetXY ($this->postotalht, $curY);                      $pdf->SetXY ($this->postotalht, $curY);
216                      $total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);                      $total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);
217                      $pdf->MultiCell(26, 5, $total, 0, 'R', 0);                      $pdf->MultiCell(23, 5, $total, 0, 'R', 0);
218    
219                      // Collecte des totaux par valeur de tva                      // Collecte des totaux par valeur de tva
220                      // dans le tableau tva["taux"]=total_tva                      // dans le tableau tva["taux"]=total_tva
# Line 220  class pdf_crabe extends ModelePDFFacture Line 222  class pdf_crabe extends ModelePDFFacture
222                                          if ($fac->remise_percent) $tvaligne-=($tvaligne*$fac->remise_percent)/100;                                          if ($fac->remise_percent) $tvaligne-=($tvaligne*$fac->remise_percent)/100;
223                                          $this->tva[ (string)$fac->lignes[$i]->tva_taux ] += $tvaligne;                                          $this->tva[ (string)$fac->lignes[$i]->tva_taux ] += $tvaligne;
224    
225                        $nexY+=2;    // Passe espace entre les lignes
226    
227                      if ($nexY > 200 && $i < $nblignes - 1)                      if ($nexY > 200 && $i < $nblignes - 1)
228                      {                      {
229                          $this->_tableau($pdf, $tab_top, $tab_height, $nexY);                          $this->_tableau($pdf, $tab_top, $tab_height, $nexY);
# Line 599  class pdf_crabe extends ModelePDFFacture Line 603  class pdf_crabe extends ModelePDFFacture
603    
604          $pdf->SetFont('Arial','',10);          $pdf->SetFont('Arial','',10);
605    
606          $pdf->SetXY (10, $tab_top+2);          $pdf->SetXY ($this->posxdesc-1, $tab_top+2);
607          $pdf->MultiCell(40,2, $langs->trans("Designation"),'','L');          $pdf->MultiCell(108,2, $langs->trans("Designation"),'','L');
608    
609          $pdf->line(120, $tab_top, 120, $tab_top + $tab_height);          $pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
610          $pdf->SetXY (120, $tab_top+2);          $pdf->SetXY ($this->posxtva-1, $tab_top+2);
611          $pdf->MultiCell(12,2, $langs->trans("VAT"),'','C');          $pdf->MultiCell(12,2, $langs->trans("VAT"),'','C');
612    
613          $pdf->line(132, $tab_top, 132, $tab_top + $tab_height);          $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
614          $pdf->SetXY (132, $tab_top+2);          $pdf->SetXY ($this->posxup-1, $tab_top+2);
615          $pdf->MultiCell(18,2, $langs->trans("PriceUHT"),'','C');          $pdf->MultiCell(18,2, $langs->trans("PriceUHT"),'','C');
616    
617          $pdf->line(150, $tab_top, 150, $tab_top + $tab_height);          $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
618          $pdf->SetXY (150, $tab_top+2);          $pdf->SetXY ($this->posxqty-1, $tab_top+2);
619          $pdf->MultiCell(12,2, $langs->trans("Qty"),'','C');          $pdf->MultiCell(11,2, $langs->trans("Qty"),'','C');
620    
621          $pdf->line(162, $tab_top, 162, $tab_top + $tab_height);          $pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
622          $pdf->SetXY (162, $tab_top+2);          $pdf->SetXY ($this->posxdiscount-1, $tab_top+2);
623          $pdf->MultiCell(15,2, $langs->trans("Discount"),'','C');          $pdf->MultiCell(16,2, $langs->trans("Discount"),'','C');
624    
625          $pdf->line(177, $tab_top, 177, $tab_top + $tab_height);          $pdf->line($this->postotalht-1, $tab_top, $this->postotalht-1, $tab_top + $tab_height);
626          $pdf->SetXY (177, $tab_top+2);          $pdf->SetXY ($this->postotalht-1, $tab_top+2);
627          $pdf->MultiCell(23,2, $langs->trans("TotalHT"),'','C');          $pdf->MultiCell(23,2, $langs->trans("TotalHT"),'','C');
628    
629      }      }

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26