/[dolibarr]/dolibarr/htdocs/fourn/fournisseur.facture.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/fourn/fournisseur.facture.class.php

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

revision 1.16 by marc_ocebo, Mon Nov 7 13:56:04 2005 UTC revision 1.17 by eldy, Tue Nov 8 00:04:29 2005 UTC
# Line 280  class FactureFournisseur Line 280  class FactureFournisseur
280                  }                  }
281          }          }
282    
283    
284          /**          /**
285           * \brief     Tag la facture comme payée complètement           *      \brief      Tag la facture comme payée complètement
286           * \param     userid        utilisateur qui modifie l'état           *      \param      user        Objet utilisateur qui modifie l'état
287       *      \return     int         <0 si ko, >0 si ok       *      \return     int         <0 si ko, >0 si ok
288           */           */
289      function set_payed($user)      function set_payed($user)
290          {          {
291                  $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn set paye = 1 WHERE rowid = '.$this->id.';';                  $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn';
292                    $sql.= ' SET paye = 1';
293                    $sql.= ' WHERE rowid = '.$this->id;
294                  $resql = $this->db->query($sql);                  $resql = $this->db->query($sql);
295                  if (! $resql)                  if (! $resql)
296                  {                  {
297                            $this->error=$this->db->error();
298                          dolibarr_print_error($this->db);                          dolibarr_print_error($this->db);
299              return -1;              return -1;
300                  }                  }
301          return 1;          return 1;
302          }          }
303    
304    
305          /**          /**
306           * \brief     Tag la facture comme validée et valide la facture           *      \brief      Tag la facture comme validée
307           * \param     userid        utilisateur qui valide la facture           *      \param      user        Objet utilisateur qui valide la facture
308         *      \return     int         <0 si ko, >0 si ok
309           */           */
310          function set_valid($user)          function set_valid($user)
311          {          {
# Line 309  class FactureFournisseur Line 315  class FactureFournisseur
315                  $resql = $this->db->query($sql);                  $resql = $this->db->query($sql);
316                  if (! $resql)                  if (! $resql)
317                  {                  {
318                            $this->error=$this->db->error();
319                          dolibarr_print_error($this->db);                          dolibarr_print_error($this->db);
320                return -1;
321                  }                  }
322            return 1;
323          }          }
324    
325    

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

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