/[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.43 by eldy, Sun Aug 14 01:24:13 2005 UTC revision 1.44 by eldy, Sat Aug 20 14:36:33 2005 UTC
# Line 18  Line 18 
18  *  *
19  * $Id$  * $Id$
20  * $Source$  * $Source$
 *  
21  */  */
22    
23  /**  /**
# Line 49  class pdf_crabe extends ModelePDFFacture Line 48  class pdf_crabe extends ModelePDFFacture
48          $this->db = $db;          $this->db = $db;
49          $this->name = "crabe";          $this->name = "crabe";
50                  $this->description = "Modèle de facture complet (Gère l'option fiscale de facturation TVA, le choix du mode de règlement à afficher, logo...)";                  $this->description = "Modèle de facture complet (Gère l'option fiscale de facturation TVA, le choix du mode de règlement à afficher, logo...)";
51            $this->format="A4";
52          $this->option_logo = 1;                    // Affiche logo FAC_PDF_LOGO          $this->option_logo = 1;                    // Affiche logo FAC_PDF_LOGO
53          $this->option_tva = 1;                     // Gere option tva FACTURE_TVAOPTION          $this->option_tva = 1;                     // Gere option tva FACTURE_TVAOPTION
54          $this->option_modereg = 1;                 // Gere choix mode règlement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER          $this->option_modereg = 1;                 // Gere choix mode règlement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER
# Line 148  class pdf_crabe extends ModelePDFFacture Line 148  class pdf_crabe extends ModelePDFFacture
148                  $nexY = $pdf->GetY();                  $nexY = $pdf->GetY();
149                  $nblignes = sizeof($fac->lignes);                  $nblignes = sizeof($fac->lignes);
150    
151                    $posxdesc=11;
152                    $posxtva=121;
153                    $posxup=133;
154                    $posxqty=151;
155                    $posxdiscount=163;
156                    $postotttc=173;
157                    
158                  // Boucle sur les lignes                  // Boucle sur les lignes
159                  for ($i = 0 ; $i < $nblignes ; $i++)                  for ($i = 0 ; $i < $nblignes ; $i++)
160                  {                  {
# Line 160  class pdf_crabe extends ModelePDFFacture Line 167  class pdf_crabe extends ModelePDFFacture
167                          if ($libelleproduitservice) $libelleproduitservice.="\n";                          if ($libelleproduitservice) $libelleproduitservice.="\n";
168                          $libelleproduitservice.=$fac->lignes[$i]->desc;                          $libelleproduitservice.=$fac->lignes[$i]->desc;
169                      }                      }
170                      $pdf->SetXY (11, $curY );                      $pdf->SetXY ($posxdesc, $curY );
171                                            
172                      if ($conf->global->FACTURE_CODEPRODUITSERVICE && $fac->lignes[$i]->produit_id)                      if ($conf->global->FACTURE_CODEPRODUITSERVICE && $fac->lignes[$i]->produit_id)
173                      {                      {
# Line 181  class pdf_crabe extends ModelePDFFacture Line 188  class pdf_crabe extends ModelePDFFacture
188                      $nexY = $pdf->GetY();                      $nexY = $pdf->GetY();
189    
190                      // TVA                      // TVA
191                      $pdf->SetXY (121, $curY);                      $pdf->SetXY ($posxtva, $curY);
192                      $pdf->MultiCell(10, 5, $fac->lignes[$i]->tva_taux, 0, 'C');                      $pdf->MultiCell(10, 5, $fac->lignes[$i]->tva_taux, 0, 'C');
193    
194                      // Prix unitaire HT avant remise                      // Prix unitaire HT avant remise
195                      $pdf->SetXY (133, $curY);                      $pdf->SetXY ($posxup, $curY);
196                      $pdf->MultiCell(17, 5, price($fac->lignes[$i]->subprice), 0, 'R', 0);                      $pdf->MultiCell(17, 5, price($fac->lignes[$i]->subprice), 0, 'R', 0);
197    
198                      // Quantité                      // Quantité
199                      $pdf->SetXY (151, $curY);                      $pdf->SetXY ($posxqty, $curY);
200                      $pdf->MultiCell(10, 5, $fac->lignes[$i]->qty, 0, 'R');                      $pdf->MultiCell(10, 5, $fac->lignes[$i]->qty, 0, 'R');
201    
202                      // Remise sur ligne                      // Remise sur ligne
203                      $pdf->SetXY (163, $curY);                      $pdf->SetXY ($posxdiscount, $curY);
204                      if ($fac->lignes[$i]->remise_percent) {                      if ($fac->lignes[$i]->remise_percent) {
205                          $pdf->MultiCell(14, 5, $fac->lignes[$i]->remise_percent."%", 0, 'R');                          $pdf->MultiCell(14, 5, $fac->lignes[$i]->remise_percent."%", 0, 'R');
206                      }                      }
207    
208                      // Total HT                      // Total TTC
209                      $pdf->SetXY (173, $curY);                      $pdf->SetXY ($postotttc, $curY);
210                      $total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);                      $total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty);
211                      $pdf->MultiCell(26, 5, $total, 0, 'R', 0);                      $pdf->MultiCell(26, 5, $total, 0, 'R', 0);
212    

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

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