Standardize and update code
This commit is contained in:
parent
7fcbd0fe42
commit
b40fe8e4c9
@ -30,15 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('banks', 'categories'));
|
$langs->loadLangs(array('banks', 'categories','bills','withdrawals'));
|
||||||
|
|
||||||
if (!$user->rights->prelevement->bons->lire)
|
if (!$user->rights->prelevement->bons->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("withdrawals");
|
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -93,8 +93,8 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
|
|||||||
|
|
||||||
while ($obj = $db->fetch_object($resql))
|
while ($obj = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$langs->load("agenda");
|
// Load translation files required by the page
|
||||||
$langs->load("commercial");
|
$langs->loadLangs(array('agenda', 'commercial'));
|
||||||
|
|
||||||
$actionmod->fetch($obj->id);
|
$actionmod->fetch($obj->id);
|
||||||
|
|
||||||
|
|||||||
@ -31,21 +31,21 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
|
|||||||
*/
|
*/
|
||||||
class box_task extends ModeleBoxes
|
class box_task extends ModeleBoxes
|
||||||
{
|
{
|
||||||
var $boxcode="projet";
|
public $boxcode="projet";
|
||||||
var $boximg="object_projecttask";
|
public $boximg="object_projecttask";
|
||||||
var $boxlabel;
|
public $boxlabel;
|
||||||
//var $depends = array("projet");
|
//public $depends = array("projet");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
var $param;
|
|
||||||
var $enabled = 0; // Disabled because bugged.
|
|
||||||
|
|
||||||
var $info_box_head = array();
|
public $param;
|
||||||
var $info_box_contents = array();
|
public $enabled = 0; // Disabled because bugged.
|
||||||
|
|
||||||
|
public $info_box_head = array();
|
||||||
|
public $info_box_contents = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,8 +57,10 @@ class box_task extends ModeleBoxes
|
|||||||
function __construct($db,$param='')
|
function __construct($db,$param='')
|
||||||
{
|
{
|
||||||
global $user, $langs;
|
global $user, $langs;
|
||||||
$langs->load("boxes");
|
|
||||||
$langs->load("projects");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('boxes', 'projects'));
|
||||||
|
|
||||||
$this->boxlabel="Tasks";
|
$this->boxlabel="Tasks";
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
@ -131,7 +133,7 @@ class box_task extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add the sum à the bottom of the boxes
|
// Add the sum at the bottom of the boxes
|
||||||
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
|
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));
|
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user