Better title for some boxes
This commit is contained in:
parent
d944c3bf17
commit
15531a7ebc
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2012 Charles-François BENKE <charles.fr@benke.fr>
|
/* Copyright (C) 2012 Charles-François BENKE <charles.fr@benke.fr>
|
||||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -80,7 +80,7 @@ class box_activity extends ModeleBoxes
|
|||||||
$nbofyears=2;
|
$nbofyears=2;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
||||||
$textHead = $langs->trans("Activity").' <span class="badge">'.$nbofyears.' '.$langs->trans("DurationYears").'</span>';
|
$textHead = $langs->trans("Activity").' - '.$langs->trans("LastXMonthRolling", $nbofyears*12);
|
||||||
$this->info_box_head = array(
|
$this->info_box_head = array(
|
||||||
'text' => $textHead,
|
'text' => $textHead,
|
||||||
'limit'=> dol_strlen($textHead),
|
'limit'=> dol_strlen($textHead),
|
||||||
@ -102,7 +102,8 @@ class box_activity extends ModeleBoxes
|
|||||||
|
|
||||||
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
|
||||||
$data = array();
|
$data = array();
|
||||||
if ($refresh) {
|
if ($refresh)
|
||||||
|
{
|
||||||
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
$sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
|
||||||
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
$sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -70,18 +70,6 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
|
|
||||||
$text = $langs->trans("BoxProductDistribution",$max);
|
|
||||||
$this->info_box_head = array(
|
|
||||||
'text' => $text,
|
|
||||||
'limit'=> dol_strlen($text),
|
|
||||||
'graph'=> 1,
|
|
||||||
'sublink'=>'',
|
|
||||||
'subtext'=>$langs->trans("Filter"),
|
|
||||||
'subpicto'=>'filter.png',
|
|
||||||
'subclass'=>'linkobject',
|
|
||||||
'target'=>'none' // Set '' to get target="_blank"
|
|
||||||
);
|
|
||||||
|
|
||||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||||
$param_showinvoicenb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showinvoicenb';
|
$param_showinvoicenb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showinvoicenb';
|
||||||
$param_showpropalnb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showpropalnb';
|
$param_showpropalnb='DOLUSERCOOKIE_box_'.$this->boxcode.'_showpropalnb';
|
||||||
@ -110,6 +98,20 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
$nowarray=dol_getdate(dol_now(),true);
|
$nowarray=dol_getdate(dol_now(),true);
|
||||||
if (empty($year)) $year=$nowarray['year'];
|
if (empty($year)) $year=$nowarray['year'];
|
||||||
|
|
||||||
|
|
||||||
|
$text = $langs->trans("BoxProductDistribution",$max).' - '.$langs->trans("Year").': '.$year;
|
||||||
|
$this->info_box_head = array(
|
||||||
|
'text' => $text,
|
||||||
|
'limit'=> dol_strlen($text),
|
||||||
|
'graph'=> 1,
|
||||||
|
'sublink'=>'',
|
||||||
|
'subtext'=>$langs->trans("Filter"),
|
||||||
|
'subpicto'=>'filter.png',
|
||||||
|
'subclass'=>'linkobject',
|
||||||
|
'target'=>'none' // Set '' to get target="_blank"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$nbofgraph=0;
|
$nbofgraph=0;
|
||||||
if ($showinvoicenb) $nbofgraph++;
|
if ($showinvoicenb) $nbofgraph++;
|
||||||
if ($showpropalnb) $nbofgraph++;
|
if ($showpropalnb) $nbofgraph++;
|
||||||
|
|||||||
@ -94,3 +94,4 @@ BoxProductDistributionFor=Distribution of %s for %s
|
|||||||
ForCustomersInvoices=Customers invoices
|
ForCustomersInvoices=Customers invoices
|
||||||
ForCustomersOrders=Customers orders
|
ForCustomersOrders=Customers orders
|
||||||
ForProposals=Proposals
|
ForProposals=Proposals
|
||||||
|
LastXMonthRolling=The last %s month rolling
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user