From 1d083853a3a481873a1f43a03215c8e18a4b7476 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 14 Dec 2009 18:59:42 +0000 Subject: [PATCH] Fix: bad alias of table --- doc/install/README-FR | 4 ++-- htdocs/compta/index.php | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/install/README-FR b/doc/install/README-FR index be656dd0541..f3a839de008 100644 --- a/doc/install/README-FR +++ b/doc/install/README-FR @@ -4,8 +4,8 @@ Documentation utilisateur -------------------------------- * Pour une prise en main et installation rapide, consulter le fichier -README-FR à la racine. +README-FR à la racine. * Une documentation utilisateur francophone plus consistente est disponible en -ligne sur le site Web de Dolibarr à l'adresse: +ligne sur le site Web de Dolibarr à l'adresse: http://www.dolibarr.fr diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 602ed5d5148..96130be2f4a 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -668,13 +668,13 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman $sql.= ", ".MAIN_DB_PREFIX."commande as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_source = c.rowid AND el.sourcetype = 'commande'"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture AS f ON el.fk_target = f.rowid AND el.targettype = 'facture'"; - $sql.= " WHERE p.fk_soc = s.rowid"; - $sql.= " AND p.entity = ".$conf->entity; + $sql.= " WHERE c.fk_soc = s.rowid"; + $sql.= " AND c.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND p.fk_soc = ".$socid; - $sql.= " AND p.fk_statut = 3"; - $sql.= " AND p.facture = 0"; - $sql.= " GROUP BY s.nom, s.rowid, p.rowid, p.ref, p.facture, p.fk_statut, p.total_ht, p.total_ttc"; + if ($socid) $sql.= " AND c.fk_soc = ".$socid; + $sql.= " AND c.fk_statut = 3"; + $sql.= " AND c.facture = 0"; + $sql.= " GROUP BY s.nom, s.rowid, c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.total_ttc"; $resql = $db->query($sql); if ( $resql )