Merge pull request #5403 from atm-florian/dev_fixwarning
Fix box PHP strict warning
This commit is contained in:
commit
03c420b34e
@ -167,13 +167,15 @@ class box_actions extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
if (! empty($conf->global->SHOW_DIALOG_HOMEPAGE))
|
$out='';
|
||||||
|
if (! empty($conf->global->SHOW_DIALOG_HOMEPAGE))
|
||||||
{
|
{
|
||||||
$actioncejour=false;
|
$actioncejour=false;
|
||||||
$contents=$this->info_box_contents;
|
$contents=$this->info_box_contents;
|
||||||
@ -183,8 +185,8 @@ class box_actions extends ModeleBoxes
|
|||||||
$bcx[1] = 'class="box_impair"';
|
$bcx[1] = 'class="box_impair"';
|
||||||
if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo"))
|
if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo"))
|
||||||
{
|
{
|
||||||
print '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
|
$out.= '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
|
||||||
print '<table width=100%>';
|
$out.= '<table width=100%>';
|
||||||
for ($line=0, $n=$nblines; $line < $n; $line++)
|
for ($line=0, $n=$nblines; $line < $n; $line++)
|
||||||
{
|
{
|
||||||
if (isset($contents[$line]))
|
if (isset($contents[$line]))
|
||||||
@ -202,40 +204,45 @@ class box_actions extends ModeleBoxes
|
|||||||
$urlsoc=$contents[$line][3]['url'];
|
$urlsoc=$contents[$line][3]['url'];
|
||||||
$dateligne=$contents[$line][4]['text'];
|
$dateligne=$contents[$line][4]['text'];
|
||||||
$percentage=$contents[$line][5]['text'];
|
$percentage=$contents[$line][5]['text'];
|
||||||
print '<tr '.$bcx[$var].'>';
|
$out.= '<tr '.$bcx[$var].'>';
|
||||||
print '<td align=center>';
|
$out.= '<td align=center>';
|
||||||
print img_object("",$logo);
|
$out.= img_object("",$logo);
|
||||||
print '</td>';
|
$out.= '</td>';
|
||||||
print '<td align=center><a href="'.$urlevent.'">'.$label.'</a></td>';
|
$out.= '<td align=center><a href="'.$urlevent.'">'.$label.'</a></td>';
|
||||||
print '<td align=center><a href="'.$urlsoc.'">'.img_object("",$logosoc)." ".$nomsoc.'</a></td>';
|
$out.= '<td align=center><a href="'.$urlsoc.'">'.img_object("",$logosoc)." ".$nomsoc.'</a></td>';
|
||||||
print '<td align=center>'.$dateligne.'</td>';
|
$out.= '<td align=center>'.$dateligne.'</td>';
|
||||||
print '<td align=center>'.$percentage.'</td>';
|
$out.= '<td align=center>'.$percentage.'</td>';
|
||||||
print '</tr>';
|
$out.= '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
$out.= '</table>';
|
||||||
|
|
||||||
}
|
}
|
||||||
print '</div>';
|
$out.= '</div>';
|
||||||
if ($actioncejour)
|
if ($actioncejour)
|
||||||
{
|
{
|
||||||
print '<script>';
|
$out.= '<script>';
|
||||||
print '$("#dialogboxaction").dialog({ autoOpen: true });';
|
$out.= '$("#dialogboxaction").dialog({ autoOpen: true });';
|
||||||
if ($conf->global->SHOW_DIALOG_HOMEPAGE > 1) // autoclose after this delay
|
if ($conf->global->SHOW_DIALOG_HOMEPAGE > 1) // autoclose after this delay
|
||||||
{
|
{
|
||||||
print 'setTimeout(function(){';
|
$out.= 'setTimeout(function(){';
|
||||||
print '$("#dialogboxaction").dialog("close");';
|
$out.= '$("#dialogboxaction").dialog("close");';
|
||||||
print '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE*1000).');';
|
$out.= '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE*1000).');';
|
||||||
}
|
}
|
||||||
print '</script>';
|
$out.= '</script>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<script>';
|
$out.= '<script>';
|
||||||
print '$("#dialogboxaction").dialog({ autoOpen: false });';
|
$out.= '$("#dialogboxaction").dialog({ autoOpen: false });';
|
||||||
print '</script>';
|
$out.= '</script>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($nooutput) return $out;
|
||||||
|
else print $out;
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -455,10 +455,11 @@ class box_activity extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,11 +135,12 @@ class box_bookmarks extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,11 +157,12 @@ class box_clients extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -176,11 +176,12 @@ class box_commandes extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -169,11 +169,12 @@ class box_comptes extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
$societestatic=new Societe($db);
|
$societestatic=new Societe($db);
|
||||||
|
|
||||||
$line = 0;
|
$line = 0;
|
||||||
while ($line < $num)
|
while ($line < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$datec=$db->jdate($objp->datec);
|
$datec=$db->jdate($objp->datec);
|
||||||
@ -100,7 +100,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
$contactstatic->address = $objp->address;
|
$contactstatic->address = $objp->address;
|
||||||
$contactstatic->zip = $objp->zip;
|
$contactstatic->zip = $objp->zip;
|
||||||
$contactstatic->town = $objp->town;
|
$contactstatic->town = $objp->town;
|
||||||
|
|
||||||
$societestatic->id = $objp->fk_soc;
|
$societestatic->id = $objp->fk_soc;
|
||||||
$societestatic->name = $objp->socname;
|
$societestatic->name = $objp->socname;
|
||||||
$societestatic->name_alias = $objp->name_alias;
|
$societestatic->name_alias = $objp->name_alias;
|
||||||
@ -108,7 +108,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
$societestatic->code_fournisseur = $objp->code_fournisseur;
|
$societestatic->code_fournisseur = $objp->code_fournisseur;
|
||||||
$societestatic->client = $objp->client;
|
$societestatic->client = $objp->client;
|
||||||
$societestatic->fournisseur = $objp->fournisseur;
|
$societestatic->fournisseur = $objp->fournisseur;
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left"',
|
'td' => 'align="left"',
|
||||||
'text' => $contactstatic->getNomUrl(1),
|
'text' => $contactstatic->getNomUrl(1),
|
||||||
@ -131,7 +131,7 @@ class box_contacts extends ModeleBoxes
|
|||||||
'text' => $contactstatic->getLibStatut(3),
|
'text' => $contactstatic->getLibStatut(3),
|
||||||
'asis'=>1,
|
'asis'=>1,
|
||||||
);
|
);
|
||||||
|
|
||||||
$line++;
|
$line++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,11 +163,12 @@ class box_contacts extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,14 +55,14 @@ class box_contracts extends ModeleBoxes
|
|||||||
$this->max=$max;
|
$this->max=$max;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastContracts",$max));
|
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastContracts",$max));
|
||||||
|
|
||||||
if ($user->rights->contrat->lire)
|
if ($user->rights->contrat->lire)
|
||||||
{
|
{
|
||||||
$contractstatic=new Contrat($db);
|
$contractstatic=new Contrat($db);
|
||||||
$thirdpartytmp=new Societe($db);
|
$thirdpartytmp=new Societe($db);
|
||||||
|
|
||||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||||
$sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture";
|
$sql.= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
|
||||||
@ -83,8 +83,8 @@ class box_contracts extends ModeleBoxes
|
|||||||
$line = 0;
|
$line = 0;
|
||||||
|
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|
||||||
while ($line < $num)
|
while ($line < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$datec=$db->jdate($objp->datec);
|
$datec=$db->jdate($objp->datec);
|
||||||
@ -99,7 +99,7 @@ class box_contracts extends ModeleBoxes
|
|||||||
|
|
||||||
$thirdpartytmp->name = $objp->name;
|
$thirdpartytmp->name = $objp->name;
|
||||||
$thirdpartytmp->id = $objp->socid;
|
$thirdpartytmp->id = $objp->socid;
|
||||||
|
|
||||||
// fin_validite is no more on contract but on services
|
// fin_validite is no more on contract but on services
|
||||||
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
|
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
|
||||||
|
|
||||||
@ -157,11 +157,12 @@ class box_contracts extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -184,11 +184,12 @@ class box_external_rss extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -180,11 +180,12 @@ class box_factures extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
* @return void
|
* @param int $nooutput No print, only return string
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,11 +189,12 @@ class box_factures_fourn extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -186,11 +186,12 @@ class box_factures_fourn_imp extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,11 +182,12 @@ class box_factures_imp extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -144,11 +144,12 @@ class box_ficheinter extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -139,11 +139,12 @@ class box_fournisseurs extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class box_goodcustomers extends ModeleBoxes
|
|||||||
|
|
||||||
if ($user->rights->societe->lire)
|
if ($user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.logo, s.code_client, s.code_fournisseur, s.client, s.fournisseur, s.tms as datem, s.status as status,";
|
$sql = "SELECT s.rowid, s.nom as name, s.logo, s.code_client, s.code_fournisseur, s.client, s.fournisseur, s.tms as datem, s.status as status,";
|
||||||
$sql.= " count(*) as nbfact, sum(". $db->ifsql('f.paye=1','1','0').") as nbfactpaye";
|
$sql.= " count(*) as nbfact, sum(". $db->ifsql('f.paye=1','1','0').") as nbfactpaye";
|
||||||
$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";
|
||||||
@ -127,7 +127,7 @@ class box_goodcustomers extends ModeleBoxes
|
|||||||
'td' => 'align="right"',
|
'td' => 'align="right"',
|
||||||
'text' => $nbfact.( $nbimpaye != 0 ? ' ('.$nbimpaye.')':'')
|
'text' => $nbfact.( $nbimpaye != 0 ? ' ('.$nbimpaye.')':'')
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="right" width="18"',
|
'td' => 'align="right" width="18"',
|
||||||
'text' => $thirdpartystatic->LibStatut($objp->status,3)
|
'text' => $thirdpartystatic->LibStatut($objp->status,3)
|
||||||
@ -158,11 +158,12 @@ class box_goodcustomers extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -171,7 +171,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$px2->SetData($data2);
|
$px2->SetData($data2);
|
||||||
unset($data2);
|
unset($data2);
|
||||||
$px2->SetPrecisionY(0);
|
$px2->SetPrecisionY(0);
|
||||||
@ -263,11 +263,12 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,7 +170,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
|||||||
if (! $mesg)
|
if (! $mesg)
|
||||||
{
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$px2->SetData($data2);
|
$px2->SetData($data2);
|
||||||
unset($data2);
|
unset($data2);
|
||||||
$px2->SetPrecisionY(0);
|
$px2->SetPrecisionY(0);
|
||||||
@ -262,11 +262,12 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class box_graph_orders_permonth extends ModeleBoxes
|
|||||||
if ($user->rights->commande->lire)
|
if ($user->rights->commande->lire)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||||
$param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
|
$param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
|
||||||
$param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
|
$param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
|
||||||
@ -263,11 +263,12 @@ class box_graph_orders_permonth extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
|||||||
if ($user->rights->fournisseur->commande->lire)
|
if ($user->rights->fournisseur->commande->lire)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
$param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
|
||||||
$param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
|
$param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
|
||||||
$param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
|
$param_showtot='DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';
|
||||||
@ -262,11 +262,12 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -390,11 +390,12 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -264,11 +264,12 @@ class box_graph_propales_permonth extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -169,11 +169,12 @@ class box_members extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -192,11 +192,12 @@ class box_produits extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -199,11 +199,12 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -173,11 +173,12 @@ class box_project extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -166,11 +166,12 @@ class box_propales extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,11 +167,12 @@ class box_prospect extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class box_services_contracts extends ModeleBoxes
|
|||||||
$contractstatic=new Contrat($db);
|
$contractstatic=new Contrat($db);
|
||||||
$contratlignestatic=new ContratLigne($db);
|
$contratlignestatic=new ContratLigne($db);
|
||||||
$thirdpartytmp = new Societe($db);
|
$thirdpartytmp = new Societe($db);
|
||||||
|
|
||||||
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
$sql = "SELECT s.nom as name, s.rowid as socid,";
|
||||||
$sql.= " c.rowid, c.ref, c.statut as contract_status,";
|
$sql.= " c.rowid, c.ref, c.statut as contract_status,";
|
||||||
$sql.= " cd.rowid as cdid, cd.tms as datem, cd.statut, cd.label, cd.description, cd.product_type as type,";
|
$sql.= " cd.rowid as cdid, cd.tms as datem, cd.statut, cd.label, cd.description, cd.product_type as type,";
|
||||||
@ -103,14 +103,14 @@ class box_services_contracts extends ModeleBoxes
|
|||||||
$contratlignestatic->type=$objp->type;
|
$contratlignestatic->type=$objp->type;
|
||||||
$contratlignestatic->product_id=$objp->product_id;
|
$contratlignestatic->product_id=$objp->product_id;
|
||||||
$contratlignestatic->product_ref=$objp->product_ref;
|
$contratlignestatic->product_ref=$objp->product_ref;
|
||||||
|
|
||||||
$contractstatic->statut=$objp->contract_status;
|
$contractstatic->statut=$objp->contract_status;
|
||||||
$contractstatic->id=$objp->rowid;
|
$contractstatic->id=$objp->rowid;
|
||||||
$contractstatic->ref=$objp->ref;
|
$contractstatic->ref=$objp->ref;
|
||||||
|
|
||||||
$thirdpartytmp->name = $objp->name;
|
$thirdpartytmp->name = $objp->name;
|
||||||
$thirdpartytmp->id = $objp->socid;
|
$thirdpartytmp->id = $objp->socid;
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
|
if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ class box_services_contracts extends ModeleBoxes
|
|||||||
'text' => $contratlignestatic->getNomUrl(1),
|
'text' => $contratlignestatic->getNomUrl(1),
|
||||||
'asis' => 1
|
'asis' => 1
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="left"',
|
$this->info_box_contents[$i][] = array('td' => 'align="left"',
|
||||||
'text' => $contractstatic->getNomUrl(1),
|
'text' => $contractstatic->getNomUrl(1),
|
||||||
'asis' => 1
|
'asis' => 1
|
||||||
@ -175,11 +175,12 @@ class box_services_contracts extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ class box_services_expired extends ModeleBoxes
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0)
|
if ($num==0)
|
||||||
{
|
{
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoExpiredServices"));
|
$this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoExpiredServices"));
|
||||||
@ -147,11 +147,12 @@ class box_services_expired extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -171,11 +171,12 @@ class box_supplier_orders extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
* @return void
|
* @param int $nooutput No print, only return string
|
||||||
*/
|
* @return void
|
||||||
function showBox($head = null, $contents = null)
|
*/
|
||||||
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,11 +91,11 @@ class box_task extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$this->info_box_contents[$i][] = array(
|
$this->info_box_contents[$i][] = array(
|
||||||
@ -137,10 +137,11 @@ class box_task extends ModeleBoxes
|
|||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
|
* @param int $nooutput No print, only return string
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head = null, $contents = null)
|
function showBox($head = null, $contents = null, $nooutput=0)
|
||||||
{
|
{
|
||||||
parent::showBox($this->info_box_head, $this->info_box_contents);
|
parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user