Fix: Use total_ht field
This commit is contained in:
parent
99e32cba8a
commit
b972e32b66
@ -16,16 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/stats/commande.php
|
\file htdocs/product/stats/commande.php
|
||||||
\ingroup product, service, commande
|
\ingroup product, service, commande
|
||||||
\brief Page des stats des commandes clients pour un produit
|
\brief Page des stats des commandes clients pour un produit
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -126,7 +123,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
$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";
|
$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 ";
|
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";
|
$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("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("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("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_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -178,7 +175,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<td>".$objp->code_client."</td>\n";
|
print "<td>".$objp->code_client."</td>\n";
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print dolibarr_print_date($objp->date)."</td>";
|
print dolibarr_print_date($objp->date)."</td>";
|
||||||
print "<td align=\"right\">".price($objp->amount)."</td>\n";
|
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||||
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -16,16 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/stats/commande_fournisseur.php
|
\file htdocs/product/stats/commande_fournisseur.php
|
||||||
\ingroup product, service, commande
|
\ingroup product, service, commande
|
||||||
\brief Page des stats des commandes fournisseurs pour un produit
|
\brief Page des stats des commandes fournisseurs pour un produit
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -119,7 +116,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
$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";
|
$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 ";
|
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";
|
$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("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("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("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_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -171,7 +168,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<td>".$objp->code_client."</td>\n";
|
print "<td>".$objp->code_client."</td>\n";
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print dolibarr_print_date($objp->date)."</td>";
|
print dolibarr_print_date($objp->date)."</td>";
|
||||||
print "<td align=\"right\">".price($objp->amount)."</td>\n";
|
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||||
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -16,16 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/stats/contrat.php
|
\file htdocs/product/stats/contrat.php
|
||||||
\ingroup product, service, contrat
|
\ingroup product, service, contrat
|
||||||
\brief Page des stats des contrats pour un produit
|
\brief Page des stats des contrats pour un produit
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
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("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("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("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_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -174,7 +171,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<td>".$objp->code_client."</td>\n";
|
print "<td>".$objp->code_client."</td>\n";
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print dolibarr_print_date($objp->date)."</td>";
|
print dolibarr_print_date($objp->date)."</td>";
|
||||||
print "<td align=\"right\">".price($objp->amount)."</td>\n";
|
//print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||||
print '<td align="right">'.$contratstatic->LibStatut($objp->statut,5).'</td>';
|
print '<td align="right">'.$contratstatic->LibStatut($objp->statut,5).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -16,16 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/stats/facture.php
|
\file htdocs/product/stats/facture.php
|
||||||
\ingroup product, service, facture
|
\ingroup product, service, facture
|
||||||
\brief Page des stats des factures clients pour un produit
|
\brief Page des stats des factures clients pour un produit
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +117,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
$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";
|
$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 ";
|
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";
|
$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("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("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("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_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -170,7 +167,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<td>".$objp->code_client."</td>\n";
|
print "<td>".$objp->code_client."</td>\n";
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print dolibarr_print_date($objp->date)."</td>";
|
print dolibarr_print_date($objp->date)."</td>";
|
||||||
print "<td align=\"right\">".price($objp->amount)."</td>\n";
|
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||||
$fac=new Facture($db);
|
$fac=new Facture($db);
|
||||||
print '<td align="right">'.$fac->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
print '<td align="right">'.$fac->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user