diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php
index b19c3c7fd68..97e9a612ae1 100644
--- a/htdocs/product/stats/commande.php
+++ b/htdocs/product/stats/commande.php
@@ -118,7 +118,7 @@ if ($id > 0 || ! empty($ref))
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,";
- $sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid";
+ $sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.qty";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."commande as c";
@@ -148,6 +148,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print "\n";
@@ -170,6 +171,7 @@ if ($id > 0 || ! empty($ref))
print "
".$objp->code_client." | \n";
print "";
print dol_print_date($db->jdate($objp->date_commande))." | ";
+ print "".$objp->qty." | \n";
print "".price($objp->total_ht)." | \n";
print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).' | ';
print "\n";
diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php
index 69845b4b264..22e3e2b30ba 100644
--- a/htdocs/product/stats/commande_fournisseur.php
+++ b/htdocs/product/stats/commande_fournisseur.php
@@ -111,7 +111,7 @@ if ($id > 0 || ! empty($ref))
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,";
$sql.= " c.rowid, c.total_ht as total_ht, c.ref,";
- $sql.= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid";
+ $sql.= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.qty";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c";
@@ -141,6 +141,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print "\n";
@@ -165,6 +166,7 @@ if ($id > 0 || ! empty($ref))
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).' | ';
print "".$objp->code_client." | \n";
print ''.dol_print_date($db->jdate($objp->date_commande))." | ";
+ print "".$objp->qty." | \n";
print ''.price($objp->total_ht)." | \n";
print ''.$commandestatic->getLibStatut(4).' | ';
print "\n";
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index cac2bccc45b..dc65764defd 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -122,7 +122,7 @@ if ($id > 0 || ! empty($ref))
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,";
$sql.= " f.facnumber, f.total as total_ht,";
- $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid";
+ $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
@@ -152,6 +152,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print "\n";
@@ -174,6 +175,7 @@ if ($id > 0 || ! empty($ref))
print "".$objp->code_client." | \n";
print "";
print dol_print_date($db->jdate($objp->datef),'day')." | ";
+ print "".$objp->qty." | \n";
print "".price($objp->total_ht)." | \n";
print ''.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).' | ';
print "\n";
diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php
index 2a06c30a496..4cbeaec7e76 100644
--- a/htdocs/product/stats/facture_fournisseur.php
+++ b/htdocs/product/stats/facture_fournisseur.php
@@ -123,7 +123,7 @@ if ($id > 0 || ! empty($ref))
$sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client, f.ref, f.total_ht as total_ht,";
- $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid";
+ $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f";
@@ -153,6 +153,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print "\n";
@@ -175,6 +176,7 @@ if ($id > 0 || ! empty($ref))
print "".$objp->code_client." | \n";
print "";
print dol_print_date($db->jdate($objp->datef))." | ";
+ print "".$objp->qty." | \n";
print "".price($objp->total_ht)." | \n";
print ''.$supplierinvoicestatic->LibStatut($objp->paye,$objp->statut,5).' | ';
print "\n";
diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php
index a55673c62b0..e9a78f18b05 100644
--- a/htdocs/product/stats/propal.php
+++ b/htdocs/product/stats/propal.php
@@ -113,7 +113,7 @@ if ($id > 0 || ! empty($ref))
$sql = "SELECT DISTINCT s.nom, s.rowid as socid, p.rowid as propalid, p.ref, p.total_ht as amount,";
- $sql.= "p.datep, p.fk_statut as statut";
+ $sql.= "p.datep, p.fk_statut as statut, d.qty";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ",".MAIN_DB_PREFIX."propal as p";
@@ -141,6 +141,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DatePropal"),$_SERVER["PHP_SELF"],"p.datep","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"p.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
print "\n";
@@ -162,6 +163,7 @@ if ($id > 0 || ! empty($ref))
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).' | ';
print '';
print dol_print_date($db->jdate($objp->datep))." | ";
+ print "".$objp->qty." | \n";
print ''.price($objp->amount).' | '."\n";
print ''.$propalstatic->LibStatut($objp->statut,5).' | ';
print ''."\n";