diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 38ec8204984..7d77e2c31b4 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -86,7 +86,7 @@ class box_graph_invoices_permonth extends ModeleBoxes $param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; - + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $shownb=GETPOST($param_shownb,'alpha',4); @@ -97,7 +97,7 @@ class box_graph_invoices_permonth extends ModeleBoxes $startyear=$endyear-1; $mode='customer'; $userid=0; - $WIDTH=($shownb && $showtot)?'256':'320'; + $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; $stats = new FactureStats($this->db, 0, $mode, ($userid>0?$userid:0)); diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index a6e64c10c3e..6c4c18824d6 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -85,7 +85,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; - + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $shownb=GETPOST($param_shownb,'alpha',4); @@ -96,7 +96,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $startyear=$endyear-1; $mode='supplier'; $userid=0; - $WIDTH=($shownb && $showtot)?'256':'320'; + $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; $stats = new FactureStats($this->db, 0, $mode, ($userid>0?$userid:0)); diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 67463f33637..b2456a52d76 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -86,7 +86,7 @@ class box_graph_orders_permonth extends ModeleBoxes $param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; - + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $shownb=GETPOST($param_shownb,'alpha',4); @@ -97,7 +97,7 @@ class box_graph_orders_permonth extends ModeleBoxes $startyear=$endyear-1; $mode='customer'; $userid=0; - $WIDTH=($shownb && $showtot)?'256':'320'; + $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; $stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0)); diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 52cd0d6832b..d85b0f7a09c 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -85,7 +85,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; - + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $shownb=GETPOST($param_shownb,'alpha',4); @@ -96,7 +96,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $startyear=$endyear-1; $mode='supplier'; $userid=0; - $WIDTH=($shownb && $showtot)?'256':'320'; + $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; $stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0)); diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index fab6b49d835..d7134d3339f 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -86,7 +86,7 @@ class box_graph_propales_permonth extends ModeleBoxes $param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year'; $param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb'; $param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot'; - + include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php'; $shownb=GETPOST($param_shownb,'alpha',4); @@ -97,7 +97,7 @@ class box_graph_propales_permonth extends ModeleBoxes $startyear=$endyear-1; $mode='customer'; $userid=0; - $WIDTH=($shownb && $showtot)?'256':'320'; + $WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320'; $HEIGHT='192'; $stats = new PropaleStats($this->db, 0, $mode, ($userid>0?$userid:0)); @@ -106,8 +106,8 @@ class box_graph_propales_permonth extends ModeleBoxes if ($shownb) { $data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24))); - $datatype1 = array_pad(array(), ($endyear-$startyear+1), 'bars'); - + $datatype1 = array_pad(array(), ($endyear-$startyear+1), 'bars'); + $filenamenb = $dir."/propalsnbinyear-".$year.".png"; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsnbinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsnbinyear-'.$year.'.png'; @@ -148,7 +148,7 @@ class box_graph_propales_permonth extends ModeleBoxes $data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24))); $datatype2 = array_pad(array(), ($endyear-$startyear+1), 'bars'); //$datatype2 = array('lines','bars'); - + $filenamenb = $dir."/propalsamountinyear-".$year.".png"; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$year.'.png';