dolibarr-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-cvs] dolibarr/htdocs/compta facture.php facture.clas...


From: Regis Houssin
Subject: [Dolibarr-cvs] dolibarr/htdocs/compta facture.php facture.clas...
Date: Tue, 20 Jun 2006 09:56:54 +0000

CVSROOT:        /cvsroot/dolibarr
Module name:    dolibarr
Changes by:     Regis Houssin <hregis>  06/06/20 09:56:54

Modified files:
        htdocs/compta  : facture.php 
        htdocs         : facture.class.php 

Log message:
        ajout possibilité de mettre une ref client

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/compta/facture.php?cvsroot=dolibarr&r1=1.334&r2=1.335
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/facture.class.php?cvsroot=dolibarr&r1=1.199&r2=1.200

Patches:

Index: facture.class.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/facture.class.php,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -b -r1.199 -r1.200
--- facture.class.php   19 Jun 2006 20:37:53 -0000      1.199
+++ facture.class.php   20 Jun 2006 09:56:54 -0000      1.200
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- * $Id: facture.class.php,v 1.199 2006/06/19 20:37:53 eldy Exp $
+ * $Id: facture.class.php,v 1.200 2006/06/20 09:56:54 hregis Exp $
  * $Source: /cvsroot/dolibarr/dolibarr/htdocs/facture.class.php,v $
  */
 
@@ -28,7 +28,7 @@
         \file       htdocs/facture.class.php
         \ingroup    facture
         \brief      Fichier de la classe des factures clients
-        \version    $Revision: 1.199 $
+        \version    $Revision: 1.200 $
 */
 
 require_once(DOL_DOCUMENT_ROOT ."/commonobject.class.php");
@@ -114,6 +114,7 @@
                // Nettoyage paramètres
                $this->note=trim($this->note);
                $this->note_public=trim($this->note_public);
+               $this->ref_client=trim($this->ref_client);
                if (! $this->remise) $this->remise = 0 ;
                if (! $this->mode_reglement_id) $this->mode_reglement_id = 0;
 
@@ -161,6 +162,7 @@
                $sql.= ' datef,';
                $sql.= ' note,';
                $sql.= ' note_public,';
+         $sql.= ' ref_client,';
                $sql.= ' fk_user_author, fk_projet,';
                $sql.= ' fk_cond_reglement, fk_mode_reglement, 
date_lim_reglement, ref_client) ';
                $sql.= " VALUES (";
@@ -168,6 +170,7 @@
                $sql.= ",'".$this->remise_percent."', 
".$this->db->idate($this->date);
                $sql.= ",".($this->note?"'".addslashes($this->note)."'":"null");
                $sql.= 
",".($this->note_public?"'".addslashes($this->note_public)."'":"null");
+               $sql.= 
",".($this->ref_client?"'".addslashes($this->ref_client)."'":"null");
                $sql.= ",".$user->id;
                $sql.= ",".($this->projetid?$this->projetid:"null");
                $sql.= ','.$this->cond_reglement_id;
@@ -504,7 +507,7 @@
                if (empty($ref_client))
                        $sql .= ' SET ref_client = NULL';
                else
-                       $sql .= ' SET ref_client = \''.$ref_client.'\'';
+                       $sql .= ' SET ref_client = 
\''.addslashes($ref_client).'\'';
                $sql .= ' WHERE rowid = '.$this->id;
                if ($this->db->query($sql))
                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]