[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dolibarr-cvs] dolibarr/htdocs facture.class.php
From: |
Regis Houssin |
Subject: |
[Dolibarr-cvs] dolibarr/htdocs facture.class.php |
Date: |
Wed, 07 Jun 2006 16:25:23 +0000 |
CVSROOT: /cvsroot/dolibarr
Module name: dolibarr
Changes by: Regis Houssin <hregis> 06/06/07 16:25:23
Modified files:
htdocs : facture.class.php
Log message:
récupération de la référence de la commande associée
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/facture.class.php?cvsroot=dolibarr&r1=1.178&r2=1.179
Patches:
Index: facture.class.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/facture.class.php,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -b -r1.178 -r1.179
--- facture.class.php 7 Jun 2006 13:54:48 -0000 1.178
+++ facture.class.php 7 Jun 2006 16:25:23 -0000 1.179
@@ -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.178 2006/06/07 13:54:48 hregis Exp $
+ * $Id: facture.class.php,v 1.179 2006/06/07 16:25:23 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.178 $
+ \version $Revision: 1.179 $
*/
require_once(DOL_DOCUMENT_ROOT .'/notify.class.php');
@@ -302,8 +302,10 @@
$sql .= ', f.note, f.note_public, f.paye, f.fk_statut,
f.fk_user_author, f.model_pdf';
$sql .= ', f.fk_mode_reglement, f.ref_client, p.code as
mode_reglement_code, p.libelle as mode_reglement_libelle';
$sql .= ', f.fk_cond_reglement, c.libelle as
cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_facture';
+ $sql .= ', cf.fk_commande';
$sql .= ' FROM '.MAIN_DB_PREFIX.'cond_reglement as c,
'.MAIN_DB_PREFIX.'facture as f';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON
f.fk_mode_reglement = p.id';
+ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'co_fa as cf ON
cf.fk_facture = f.rowid';
$sql .= ' WHERE f.rowid='.$rowid.' AND c.rowid =
f.fk_cond_reglement';
if ($societe_id > 0)
{
@@ -345,6 +347,7 @@
$this->note_public =
$obj->note_public;
$this->user_author =
$obj->fk_user_author;
$this->modelpdf = $obj->model_pdf;
+ $this->commande_id =
$obj->fk_commande;
$this->lignes = array();
@@ -364,6 +367,21 @@
}
}
+ if ($this->commande_id)
+ {
+ $sql = "SELECT ref";
+ $sql.= " FROM ".MAIN_DB_PREFIX."commande";
+ $sql.= " WHERE rowid = ".$this->commande_id;
+
+ $resqlcomm = $this->db->query($sql);
+
+ if ($resqlcomm)
+ {
+ $objc = $this->db->fetch_object($resqlcomm);
+ $this->commande_ref = $objc->ref;
+ }
+ }
+
if ($this->statut == 0)
{
$this->brouillon = 1;
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/02
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/07
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/07
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php,
Regis Houssin <=
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/09
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/09
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/09
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/18
- [Dolibarr-cvs] dolibarr/htdocs facture.class.php, Regis Houssin, 2006/06/20