From fc0be43f5f8e4d4ccb90077bddcd7501c6825220 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Mar 2015 22:40:41 +0100 Subject: [PATCH] Fix: beautify search box --- htdocs/product/stats/commande.php | 8 +++++--- htdocs/product/stats/commande_fournisseur.php | 8 +++++--- htdocs/product/stats/facture.php | 4 +++- htdocs/product/stats/facture_fournisseur.php | 4 +++- htdocs/product/stats/propal.php | 4 +++- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 2ae1dcd1582..49a443938ab 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -141,9 +141,9 @@ if ($id > 0 || ! empty($ref)) $sql.= " AND d.fk_commande = c.rowid"; $sql.= " AND d.fk_product =".$product->id; if (! empty($search_month)) - $sql.= ' AND MONTH(f.datef) IN (' . $search_month . ')'; + $sql.= ' AND MONTH(c.date_commande) IN (' . $search_month . ')'; if (! empty($search_year)) - $sql.= ' AND YEAR(f.datef) IN (' . $search_year . ')'; + $sql.= ' AND YEAR(c.date_commande) IN (' . $search_year . ')'; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND c.fk_soc = ".$socid; $sql.= " ORDER BY $sortfield $sortorder "; @@ -189,12 +189,14 @@ if ($id > 0 || ! empty($ref)) print_barre_liste($langs->trans("CustomersOrders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,$totalrecords,''); print '
'; - print $langs->trans('Period').'('.$langs->trans("DateInvoice") .') '; + print $langs->trans('Period').' ('.$langs->trans("OrderDate") .') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); + print '
'; print ''; print ''; print '
'; + print '
'; $i = 0; print ''; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 3141b3266e9..8cbdea41495 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -150,9 +150,9 @@ if ($id > 0 || ! empty($ref)) { $sql .= " AND d.fk_commande = c.rowid"; $sql .= " AND d.fk_product =" . $product->id; if (! empty($search_month)) - $sql .= ' AND MONTH(f.datef) IN (' . $search_month . ')'; + $sql .= ' AND MONTH(c.date_commande) IN (' . $search_month . ')'; if (! empty($search_year)) - $sql .= ' AND YEAR(f.datef) IN (' . $search_year . ')'; + $sql .= ' AND YEAR(c.date_commande) IN (' . $search_year . ')'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . $user->id; if ($socid) @@ -199,12 +199,14 @@ if ($id > 0 || ! empty($ref)) { print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, ''); print '
'; - print $langs->trans('Period') . '(' . $langs->trans("DateInvoice") . ') '; + print $langs->trans('Period') . ' (' . $langs->trans("OrderDate") . ') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); + print '
'; print ''; print ''; print '
'; + print '
'; $i = 0; print '
'; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index b59bc008f17..2ae8164b0f9 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -190,12 +190,14 @@ if ($id > 0 || ! empty($ref)) print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&id=".$product->id,$sortfield,$sortorder,'',$num,$totalrecords,''); print '
'; - print $langs->trans('Period').'('.$langs->trans("DateInvoice") .') '; + print $langs->trans('Period').' ('.$langs->trans("DateInvoice") .') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); + print '
'; print ''; print ''; print '
'; + print '
'; $i = 0; print '
'; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 0feb415cc43..2e8e84621ba 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -191,12 +191,14 @@ if ($id > 0 || ! empty($ref)) print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, ''); print '
'; - print $langs->trans('Period') . '(' . $langs->trans("DateInvoice") . ') '; + print $langs->trans('Period') . ' (' . $langs->trans("DateInvoice") . ') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); + print '
'; print ''; print ''; print '
'; + print '
'; $i = 0; print '
'; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 50d7c952b6d..10fd8247204 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -192,12 +192,14 @@ if ($id > 0 || ! empty($ref)) print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, ''); print '
'; - print $langs->trans('Period') . '(' . $langs->trans("DateInvoice") . ') '; + print $langs->trans('Period') . ' (' . $langs->trans("DatePropal") . ') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); + print '
'; print ''; print ''; print '
'; + print '
'; $i = 0; print '
';