diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 77e1144d354..911a792b974 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -582,7 +582,7 @@ class Commande extends CommonObject } if (! $remise) $remise=0; if (! $this->fk_project) $this->fk_project = 0; - + // $date_commande is deprecated $date = ($this->date_commande ? $this->date_commande : $this->date); @@ -2396,11 +2396,11 @@ class Commande extends CommonObject } /** - * \brief Renvoi le libelle d'un statut donne - * \param statut Id statut - * \param facturee Si facturee - * \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * \return string Libelle + * Renvoi le libelle d'un statut donne + * @param statut Id statut + * @param facturee Si facturee + * @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Label of status */ function LibStatut($statut,$facturee,$mode) { @@ -2477,7 +2477,7 @@ class Commande extends CommonObject $file = '/commande/fiche.php'; if ($conf->expedition->enabled && ($option == 1 || $option == 2)) $file = '/expedition/shipment.php'; - + $url = DOL_URL_ROOT.$file.'?id='.$this->id; if ($short) return $url; diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index f6917f6d872..da46f0dcf9b 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -74,7 +74,7 @@ class CommandeStats extends Stats $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from.= ", ".MAIN_DB_PREFIX."societe as s"; $this->field='total_ht'; - $this->where.= " c.fk_statut >= 3 AND c.date_commande IS NOT NULL"; + $this->where.= " c.fk_statut > 0"; } $this->where.= " AND c.fk_soc = s.rowid AND s.entity = ".$conf->entity; @@ -87,7 +87,7 @@ class CommandeStats extends Stats } /** - * \brief Renvoie le nombre de commande par mois pour une ann�e donn�e + * \brief Renvoie le nombre de commande par mois pour une annee donnee * */ function getNbByMonth($year) @@ -95,10 +95,10 @@ class CommandeStats extends Stats global $conf; global $user; - $sql = "SELECT date_format(c.date_commande,'%m') as dm, count(*) nb"; + $sql = "SELECT date_format(c.date_valid,'%m') as dm, count(*) nb"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE date_format(c.date_commande,'%Y') = ".$year; + $sql.= " WHERE date_format(c.date_valid,'%Y') = ".$year; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm','DESC'); @@ -115,7 +115,7 @@ class CommandeStats extends Stats global $conf; global $user; - $sql = "SELECT date_format(c.date_commande,'%Y') as dm, count(*), sum(c.".$this->field.")"; + $sql = "SELECT date_format(c.date_valid,'%Y') as dm, count(*), sum(c.".$this->field.")"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; @@ -134,10 +134,10 @@ class CommandeStats extends Stats global $conf; global $user; - $sql = "SELECT date_format(c.date_commande,'%m') as dm, sum(c.".$this->field.")"; + $sql = "SELECT date_format(c.date_valid,'%m') as dm, sum(c.".$this->field.")"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE date_format(c.date_commande,'%Y') = ".$year; + $sql.= " WHERE date_format(c.date_valid,'%Y') = ".$year; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm','DESC'); @@ -154,10 +154,10 @@ class CommandeStats extends Stats global $conf; global $user; - $sql = "SELECT date_format(c.date_commande,'%m') as dm, avg(c.".$this->field.")"; + $sql = "SELECT date_format(c.date_valid,'%m') as dm, avg(c.".$this->field.")"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE date_format(c.date_commande,'%Y') = ".$year; + $sql.= " WHERE date_format(c.date_valid,'%Y') = ".$year; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm','DESC'); @@ -174,7 +174,7 @@ class CommandeStats extends Stats { global $user; - $sql = "SELECT date_format(c.date_commande,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg"; + $sql = "SELECT date_format(c.date_valid,'%Y') as year, count(*) as nb, sum(c.".$this->field.") as total, avg(".$this->field.") as avg"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index bbd23cedfb5..892ecd0313f 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -95,8 +95,6 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $var=True; - $total=0; $totalinprocess=0; $dataseries=array(); @@ -107,7 +105,7 @@ if ($resql) $row = $db->fetch_row($resql); if ($row) { - if ($row[1]!=3 || $row[2]!=1) + //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) { $vals[$row[1]]=$row[0]; $totalinprocess+=$row[0]; @@ -119,19 +117,22 @@ if ($resql) $db->free($resql); print ''; - print ''; - print "\n"; - foreach (array(1,2,3,-1) as $statut) + print ''."\n"; + $var=true; + $listofstatus=array(0,1,3,3,-1); $bool=false; + foreach ($listofstatus as $status) { - $dataseries[]=array('label'=>$commandestatic->LibStatut($statut,0),'values'=>array(0=>(isset($vals[$statut])?$vals[$statut]:0))); + $dataseries[]=array('label'=>$commandestatic->LibStatut($status,$bool,0),'values'=>array(0=>(isset($vals[$status])?$vals[$status]:0))); if (! $conf->use_javascript_ajax) { $var=!$var; print ""; - print ''; - print ''; + print ''; + print ''; print "\n"; } + if ($status==3 && $bool==false) $bool=true; + else $bool=false; } if ($conf->use_javascript_ajax) { @@ -141,8 +142,8 @@ if ($resql) print ''; } //if ($totalinprocess != $total) - print ''; - print ''; + //print ''; + print ''; print "
'.$langs->trans("Statistics").'
'.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'
'.$commandestatic->LibStatut($statut,0).''.(isset($vals[$statut])?$vals[$statut]:0).''.$commandestatic->LibStatut($status,$bool,0).''.(isset($vals[$status])?$vals[$status]:0).'
'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").' ('.$langs->trans("CustomersOrders").')'.$total.'
'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; } else diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 38ec280b719..4e1c0f03c1e 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2011 Regis Houssin * @@ -61,6 +61,9 @@ if (! $sortfield) $sortfield='c.rowid'; if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; +$viewstatut=GETPOST('viewstatut'); + + /* * View @@ -74,11 +77,8 @@ $companystatic = new Societe($db); llxHeader(); -$viewstatut=$_GET['viewstatut']; - - $sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,'; -$sql.= ' c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee'; +$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ', '.MAIN_DB_PREFIX.'commande as c'; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -115,11 +115,11 @@ if ($viewstatut <> '') } if ($_GET['ordermonth'] > 0) { - $sql.= " AND date_format(c.date_commande, '%Y-%m') = '$orderyear-$ordermonth'"; + $sql.= " AND date_format(c.date_valid, '%Y-%m') = '$orderyear-$ordermonth'"; } if ($_GET['orderyear'] > 0) { - $sql.= " AND date_format(c.date_commande, '%Y') = $orderyear"; + $sql.= " AND date_format(c.date_valid, '%Y') = $orderyear"; } if ($_GET['deliverymonth'] > 0) { @@ -215,7 +215,7 @@ if ($resql) print ''; print ''; - if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_commande) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); + if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); print ''; print ''; diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 6b492d7ca2c..352f16b46f4 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -52,7 +52,7 @@ $staticcontratligne=new ContratLigne($db); * View */ -$now = gmmktime(); +$now = dol_now(); llxHeader(); @@ -81,16 +81,22 @@ if ($conf->contrat->enabled) } /* - * Legends / Status + * Statistics */ + $nb=array(); +$total=0; +$totalinprocess=0; +$dataseries=array(); +$vals=array(); + // Search by status (except expired) $sql = "SELECT count(cd.rowid), cd.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; -$sql.= " AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= ".$db->idate(dol_now('tzref')).')))'; +$sql.= " AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= '".$db->idate(dol_now('tzref'))."')))"; $sql.= " AND s.entity = ".$conf->entity; if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; @@ -100,11 +106,19 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); - $nb[$row[1]]=$row[0]; + if ($row) + { + $nb[$row[1]]=$row[0]; + if ($row[1]!=5) + { + $vals[$row[1]]=$row[0]; + $totalinprocess+=$row[0]; + } + $total+=$row[0]; + } $i++; } $db->free($resql); @@ -119,7 +133,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."contrat as c"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid"; -$sql.= " AND (cd.statut = 4 AND cd.date_fin_validite < ".$db->idate(dol_now('tzref')).')'; +$sql.= " AND (cd.statut = 4 AND cd.date_fin_validite < '".$db->idate(dol_now('tzref'))."')"; $sql.= " AND s.entity = ".$conf->entity; if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; @@ -128,36 +142,72 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $row = $db->fetch_row($resql); - $nb[$row[1].true]=$row[0]; - $i++; - } - $db->free($resql); + // 0 inactive, 4 active, 5 closed + $i = 0; + while ($i < $num) + { + $row = $db->fetch_row($resql); + if ($row) + { + $nb[$row[1].true]=$row[0]; + if ($row[1]!=5) + { + $vals[$row[1]]=$row[0]; + $totalinprocess+=$row[0]; + } + $total+=$row[0]; + } + $i++; + } + $db->free($resql); } else { dol_print_error($db); } -print ''; -print ''; -print ''; -print "\n"; + + +print '
'.$langs->trans("Status").''.$langs->trans("Nb").'
'; +print ''."\n"; +$var=true; +$listofstatus=array(0,4,4,5); $bool=false; +foreach($listofstatus as $status) +{ + $dataseries[]=array('label'=>$staticcontratligne->LibStatut($status,0,($bool?1:0)),'values'=>array(0=>($nb[$status.$bool]?$nb[$status.$bool]:0))); + if (! $conf->use_javascript_ajax) + { + $var=!$var; + print ""; + print ''; + print ''; + print "\n"; + } + if ($status==4 && $bool==false) $bool=true; + else $bool=false; +} +if ($conf->use_javascript_ajax) +{ + print ''; +} $var=true; $listofstatus=array(0,4,4,5); $bool=false; foreach($listofstatus as $status) { $var=!$var; - print ""; + print ""; print ''; print ''; if ($status==4 && $bool==false) $bool=true; else $bool=false; + print "\n"; } -print "\n"; +//if ($totalinprocess != $total) +//print ''; +print ''; print "
'.$langs->trans("Statistics").' - '.$langs->trans("Services").'
'.$staticcontratligne->LibStatut($status,0,($bool?1:0)).''.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status,3,($bool?1:0)).'
'; + $data=array('series'=>$dataseries); + dol_print_graph('stats',300,180,$data,1,'pie'); + print '
'.$staticcontratligne->LibStatut($status,0,($bool?1:0)).''.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status,3,($bool?1:0)).'
'.$langs->trans("Total").' ('.$langs->trans("ServicesRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; /** diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 25e0e3e2b52..f4097bdb844 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -116,9 +116,9 @@ if ($resql) $db->free($resql); print ''; - print ''; + print ''; print "\n"; - foreach (array(0,1,2,3,4) as $statut) + foreach (array(0,1,2,3,4,5,6) as $statut) { $dataseries[]=array('label'=>$commandestatic->LibStatut($statut,0),'values'=>array(0=>(isset($vals[$statut])?$vals[$statut]:0))); if (! $conf->use_javascript_ajax) @@ -138,8 +138,8 @@ if ($resql) print ''; } //if ($totalinprocess != $total) - print ''; - print ''; + //print ''; + print ''; print "
'.$langs->trans("Statistics").'
'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'
'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrders").')'.$total.'
'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')'.$totalinprocess.'
'.$langs->trans("Total").''.$total.'

"; } diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 7c424c2d360..edd6e6c958c 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/includes/menus/init_menu_auguria.sql b/htdocs/includes/menus/init_menu_auguria.sql index 8dd3b217e53..3f3451b20a0 100644 --- a/htdocs/includes/menus/init_menu_auguria.sql +++ b/htdocs/includes/menus/init_menu_auguria.sql @@ -163,7 +163,7 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 1710__+MAX_llx_menu__, 'accountancy', '', 1704__+MAX_llx_menu__, '/compta/paiement/rapport.php?leftmenu=customers_bills', 'Reportings', 2, 'bills', '$user->rights->facture->lire', '', 2, 1, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->facture->enabled && $conf->banque->enabled', __HANDLER__, 'left', 1714__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills', 'Statistics', 1, 'bills', '$user->rights->facture->lire', '', 2, 8, __ENTITY__); -- Accountancy - Orders to bill -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&status=3&afacturer=1', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); +insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); -- Donations insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled', __HANDLER__, 'left', 2000__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy', 'Donations', 0, 'donations', '$user->rights->don->lire', '', 2, 4, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__); diff --git a/htdocs/includes/menus/init_menu_smartphone.sql b/htdocs/includes/menus/init_menu_smartphone.sql index 2006ebb5253..8cf20414457 100755 --- a/htdocs/includes/menus/init_menu_smartphone.sql +++ b/htdocs/includes/menus/init_menu_smartphone.sql @@ -185,7 +185,7 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 1710__+MAX_llx_menu__, 'accountancy', '', 1704__+MAX_llx_menu__, '/compta/paiement/rapport.php?leftmenu=customers_bills', 'Reportings', 2, 'bills', '$user->rights->facture->lire', '', 2, 1, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->facture->enabled && $conf->banque->enabled', __HANDLER__, 'left', 1714__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills', 'Statistics', 1, 'bills', '$user->rights->facture->lire', '', 2, 8, __ENTITY__); -- Accountancy - Orders to bill -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&status=3&afacturer=1', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); +insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/commande/liste.php?leftmenu=orders&viewstatut=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__); -- Donations insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled', __HANDLER__, 'left', 2000__+MAX_llx_menu__, 'accountancy', '', 6__+MAX_llx_menu__, '/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy', 'Donations', 0, 'donations', '$user->rights->don->lire', '', 2, 4, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'accountancy', '', 2000__+MAX_llx_menu__, '/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__); diff --git a/htdocs/includes/menus/standard/eldy.lib.php b/htdocs/includes/menus/standard/eldy.lib.php index 81f94915872..edd044e2af2 100644 --- a/htdocs/includes/menus/standard/eldy.lib.php +++ b/htdocs/includes/menus/standard/eldy.lib.php @@ -900,7 +900,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) if ($conf->commande->enabled) { $langs->load("orders"); - if ($conf->facture->enabled) $newmenu->add("/commande/liste.php?leftmenu=orders&status=3&afacturer=1", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire); + if ($conf->facture->enabled) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire); // if ($leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1 ,$user->rights->commande->lire); }