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

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

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

revision 1.15 by eldy, Sun Sep 11 16:51:42 2005 UTC revision 1.16 by eldy, Fri Nov 4 01:07:34 2005 UTC
# Line 19  Line 19 
19  *  *
20  * $Id$  * $Id$
21  * $Source$  * $Source$
 *  
22  */  */
23    
24  /**  /**
# Line 40  require_once(DOL_DOCUMENT_ROOT."/product Line 39  require_once(DOL_DOCUMENT_ROOT."/product
39    
40  class pdf_oursin extends ModelePDFFactures  class pdf_oursin extends ModelePDFFactures
41  {  {
42    var $marges=array("g"=>10,"h"=>5,"d"=>10,"b"=>15);      var $marges=array("g"=>10,"h"=>5,"d"=>10,"b"=>15);
   
43            
44    /**      
45                  \brief  Constructeur      /**
46            \brief  Constructeur
47          \param  db              handler accès base de donnée          \param  db              handler accès base de donnée
48    */      */
49    function pdf_oursin($db)      function pdf_oursin($db)
50    {      {
51      $this->db = $db;          $this->db = $db;
52      $this->description = "Modèle de facture complet (basé sur crabe, gère l'option fiscale de facturation TVA, le choix du mode de règlement à afficher, les remises, le nom du projet, la reference propal, logo...)";          $this->description = "Modèle de facture complet (basé sur crabe, gère l'option fiscale de facturation TVA, le choix du mode de règlement à afficher, les remises, le nom du projet, la reference propal, logo...)";
53      $this->option_logo = 1;                    // Affiche logo FAC_PDF_LOGO  
54      $this->option_tva = 1;                     // Gere option tva FACTURE_TVAOPTION          // Dimension page pour format A4
55      $this->option_modereg = 1;                 // Gere choix mode règlement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER          $this->page_largeur = 210;
56      $this->option_codeproduitservice = 1;      // Affiche code produit-service FACTURE_CODEPRODUITSERVICE          $this->page_hauteur = 297;
57      $this->option_tvaintra = 1;                // Affiche tva intra MAIN_INFO_TVAINTRA          $this->format = array($this->page_largeur,$this->page_hauteur);
58      $this->option_capital = 1;                 // Affiche capital MAIN_INFO_CAPITAL  
59      if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')          $this->option_logo = 1;                    // Affiche logo FAC_PDF_LOGO
60        $this->franchise=1;          $this->option_tva = 1;                     // Gere option tva FACTURE_TVAOPTION
61            $this->option_modereg = 1;                 // Gere choix mode règlement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER
62      // Recupere code pays          $this->option_codeproduitservice = 1;      // Affiche code produit-service FACTURE_CODEPRODUITSERVICE
63      $this->code_pays=substr($langs->defaultlang,-2);    // Par defaut, pays de la localisation          $this->option_tvaintra = 1;                // Affiche tva intra MAIN_INFO_TVAINTRA
64      $sql  = "SELECT code from ".MAIN_DB_PREFIX."c_pays";          $this->option_capital = 1;                 // Affiche capital MAIN_INFO_CAPITAL
65      $sql .= " WHERE rowid = ".MAIN_INFO_SOCIETE_PAYS;          if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
66      $result=$this->db->query($sql);          $this->franchise=1;
67      if ($result) {          
68          $obj = $this->db->fetch_object($result);          // Recupere code pays
69          if ($obj->code) $this->code_pays=$obj->code;          $this->code_pays=substr($langs->defaultlang,-2);    // Par defaut, pays de la localisation
70      }          $sql  = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
71      else {          $sql .= " WHERE rowid = ".MAIN_INFO_SOCIETE_PAYS;
72          dolibarr_print_error($this->db);          $result=$this->db->query($sql);
73            if ($result) {
74                $obj = $this->db->fetch_object($result);
75                if ($obj->code) $this->code_pays=$obj->code;
76            }
77            else {
78                dolibarr_print_error($this->db);
79            }
80            $this->db->free($result);
81      }      }
     $this->db->free($result);  
   }  
82    
83    
84    /**    /**

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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