Fix box activity
This commit is contained in:
parent
60493d0a47
commit
f9442c1092
@ -83,17 +83,17 @@ class box_activity extends ModeleBoxes
|
|||||||
$cachetime = 3600;
|
$cachetime = 3600;
|
||||||
$fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache';
|
$fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache';
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
$nbofyears=2;
|
$nbofperiod=3;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofyears=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
if (! empty($conf->global->MAIN_BOX_ACTIVITY_DURATION)) $nbofperiod=$conf->global->MAIN_BOX_ACTIVITY_DURATION;
|
||||||
$textHead = $langs->trans("Activity").' - '.$langs->trans("LastXMonthRolling", $nbofyears*12);
|
$textHead = $langs->trans("Activity").' - '.$langs->trans("LastXMonthRolling", $nbofperiod);
|
||||||
$this->info_box_head = array(
|
$this->info_box_head = array(
|
||||||
'text' => $textHead,
|
'text' => $textHead,
|
||||||
'limit'=> dol_strlen($textHead),
|
'limit'=> dol_strlen($textHead),
|
||||||
);
|
);
|
||||||
|
|
||||||
// compute the year limit to show
|
// compute the year limit to show
|
||||||
$tmpdate= dol_time_plus_duree(dol_now(), -1*$nbofyears, "y");
|
$tmpdate= dol_time_plus_duree(dol_now(), -1*$nbofperiod, "m");
|
||||||
|
|
||||||
$cumuldata = array();
|
$cumuldata = array();
|
||||||
|
|
||||||
@ -103,6 +103,7 @@ class box_activity extends ModeleBoxes
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
$facturestatic=new Facture($db);
|
$facturestatic=new Facture($db);
|
||||||
|
|
||||||
|
// part 1
|
||||||
$cachedir = DOL_DATA_ROOT.'/facture/temp';
|
$cachedir = DOL_DATA_ROOT.'/facture/temp';
|
||||||
$filename = '/boxactivity-invoice'.$fileid;
|
$filename = '/boxactivity-invoice'.$fileid;
|
||||||
|
|
||||||
@ -189,6 +190,7 @@ class box_activity extends ModeleBoxes
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// part 2
|
||||||
$cachedir = DOL_DATA_ROOT.'/facture/temp';
|
$cachedir = DOL_DATA_ROOT.'/facture/temp';
|
||||||
$filename = '/boxactivity-invoice2'.$fileid;
|
$filename = '/boxactivity-invoice2'.$fileid;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user