diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 49399796549..8973a0cfaca 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -71,7 +71,11 @@ $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); + if ($_GET["ref"]) + { + $result = $product->fetch('',$_GET["ref"]); + $_GET["id"]=$product->id; + } if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("CardProduct".$product->type)); diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 81548ccea65..0fbc4bfd0a2 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -69,7 +69,11 @@ $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); + if ($_GET["ref"]) + { + $result = $product->fetch('',$_GET["ref"]); + $_GET["id"]=$product->id; + } if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("CardProduct".$product->type)); diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 377a0b83faa..ca3471078d8 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -68,7 +68,11 @@ $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); + if ($_GET["ref"]) + { + $result = $product->fetch('',$_GET["ref"]); + $_GET["id"]=$product->id; + } if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("CardProduct".$product->type)); diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 68f1ed21415..4ee57bd7b6e 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -65,7 +65,11 @@ $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); + if ($_GET["ref"]) + { + $result = $product->fetch('',$_GET["ref"]); + $_GET["id"]=$product->id; + } if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("CardProduct".$product->type)); diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 4160f50a84b..495241448f9 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -16,16 +16,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/product/stats/facture_fournisseur.php \ingroup product, service, facture \brief Page des stats des factures fournisseurs pour un produit - \version $Revision$ + \version $Id$ */ @@ -68,7 +65,11 @@ $html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); + if ($_GET["ref"]) + { + $result = $product->fetch('',$_GET["ref"]); + $_GET["id"]=$product->id; + } if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("CardProduct".$product->type)); @@ -120,7 +121,7 @@ if ($_GET["id"] || $_GET["ref"]) print ''; - $sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, f.facnumber, f.amount as amount,"; + $sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, f.facnumber, f.total_ht as total_ht,"; $sql.= " ".$db->pdate("f.datef")." as date, f.paye, f.fk_statut as statut, f.rowid as facid"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."facture_fourn_det as d"; @@ -150,7 +151,7 @@ if ($_GET["id"] || $_GET["ref"]) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.amount","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print "\n"; @@ -170,7 +171,7 @@ if ($_GET["id"] || $_GET["ref"]) print "