From e2ab844514ae20d0047b6c5ce229b0c17ac4f4eb Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sun, 17 Aug 2003 14:49:16 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20lien=20sur=20les=20noms=20de=20soci=E9t?= =?UTF-8?q?=E9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/index.php3 | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/index.php3 b/htdocs/compta/index.php3 index 76b425f82b1..8bee0c2be82 100644 --- a/htdocs/compta/index.php3 +++ b/htdocs/compta/index.php3 @@ -32,22 +32,9 @@ if ($user->societe_id > 0) llxHeader(); -$db = new Db(); - -function valeur($sql) { - global $db; - if ( $db->query($sql) ) { - if ( $db->num_rows() ) { - $valeur = $db->result(0,0); - } - $db->free(); - } - return $valeur; -} /* * */ -$db = new Db(); if ($action == 'add_bookmark') @@ -130,7 +117,7 @@ if ($user->societe_id == 0) $num = $db->num_rows(); if ($num) { - print ""; + print "
"; print ""; print ""; print "\n"; @@ -158,7 +145,7 @@ if ($user->societe_id == 0) * Factures impayées */ -$sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut > 0"; +$sql = "SELECT f.facnumber, f.rowid, s.nom, s.idp FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.paye = 0 AND f.fk_statut > 0"; if ($socidp) { $sql .= " AND f.fk_soc = $socidp"; @@ -179,7 +166,8 @@ if ( $db->query($sql) ) { $obj = $db->fetch_object( $i); $var=!$var; - print '"; + print ''; + print ''; $i++; } print "
Charges à payer
'.$obj->facnumber."".$obj->nom."
'.$obj->facnumber.''.$obj->nom.'

"; @@ -261,7 +249,7 @@ if ( $result ) { * Factures brouillons */ -$sql = "SELECT f.facnumber, f.rowid, s.nom FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.fk_statut = 0"; +$sql = "SELECT f.facnumber, f.rowid, s.nom, s.idp FROM llx_facture as f, llx_societe as s WHERE s.idp = f.fk_soc AND f.fk_statut = 0"; if ( $db->query($sql) ) { @@ -278,7 +266,8 @@ if ( $db->query($sql) ) { $obj = $db->fetch_object( $i); $var=!$var; - print ''.$obj->facnumber."".$obj->nom.""; + print ''.$obj->facnumber.''; + print ''.$obj->nom.''; $i++; }