From b972e32b6699e16102bd0b639b53d85a6c4dc51a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 Jun 2008 01:18:07 +0000 Subject: [PATCH] Fix: Use total_ht field --- htdocs/product/stats/commande.php | 11 ++++------- htdocs/product/stats/commande_fournisseur.php | 11 ++++------- htdocs/product/stats/contrat.php | 9 +++------ htdocs/product/stats/facture.php | 11 ++++------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 57a623d45f0..49399796549 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.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/commande.php \ingroup product, service, commande \brief Page des stats des commandes clients pour un produit - \version $Revision$ + \version $Id$ */ @@ -126,7 +123,7 @@ if ($_GET["id"] || $_GET["ref"]) print ''; - $sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, c.rowid, c.total_ht as amount, c.ref,"; + $sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,"; $sql.= " ".$db->pdate("c.date_creation")." as date, c.fk_statut as statut, c.facture, c.rowid as commandeid"; 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."commande as c, ".MAIN_DB_PREFIX."commandedet as d"; @@ -156,7 +153,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("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"c.date_creation","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print "\n"; @@ -178,7 +175,7 @@ if ($_GET["id"] || $_GET["ref"]) print "".$objp->code_client."\n"; print ""; print dolibarr_print_date($objp->date).""; - print "".price($objp->amount)."\n"; + print "".price($objp->total_ht)."\n"; print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).''; print "\n"; $i++; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index a8a94dcac4a..81548ccea65 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_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/commande_fournisseur.php \ingroup product, service, commande \brief Page des stats des commandes fournisseurs pour un produit - \version $Revision$ + \version $Id$ */ @@ -119,7 +116,7 @@ if ($_GET["id"] || $_GET["ref"]) print ""; print ''; - $sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, c.rowid, c.total_ht as amount, c.ref,"; + $sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,"; $sql.= " ".$db->pdate("c.date_creation")." as date, c.fk_statut as statut, c.rowid as commandeid"; 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."commande_fournisseur as c, ".MAIN_DB_PREFIX."commande_fournisseurdet as d"; @@ -149,7 +146,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"],"c.date_creation","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print "\n"; @@ -171,7 +168,7 @@ if ($_GET["id"] || $_GET["ref"]) print "".$objp->code_client."\n"; print ""; print dolibarr_print_date($objp->date).""; - print "".price($objp->amount)."\n"; + print "".price($objp->total_ht)."\n"; print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).''; print "\n"; $i++; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 81d45ae47b4..377a0b83faa 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.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/contrat.php \ingroup product, service, contrat \brief Page des stats des contrats pour un produit - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -152,7 +149,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("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"c.datec","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder); print "\n"; @@ -174,7 +171,7 @@ if ($_GET["id"] || $_GET["ref"]) print "".$objp->code_client."\n"; print ""; print dolibarr_print_date($objp->date).""; - print "".price($objp->amount)."\n"; + //print "".price($objp->total_ht)."\n"; print ''.$contratstatic->LibStatut($objp->statut,5).''; print "\n"; $i++; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 98e7dae4996..68f1ed21415 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.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.php \ingroup product, service, facture \brief Page des stats des factures clients pour un produit - \version $Revision$ + \version $Id$ */ @@ -120,7 +117,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 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 as f, ".MAIN_DB_PREFIX."facturedet as d"; @@ -150,7 +147,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("CustomerCode"),$_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 +167,7 @@ if ($_GET["id"] || $_GET["ref"]) print "".$objp->code_client."\n"; print ""; print dolibarr_print_date($objp->date).""; - print "".price($objp->amount)."\n"; + print "".price($objp->total_ht)."\n"; $fac=new Facture($db); print ''.$fac->LibStatut($objp->paye,$objp->statut,5).''; print "\n";