diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 1f5e8493d7b..82aacf2d8a0 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -167,13 +167,15 @@ class box_actions extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { + function showBox($head = null, $contents = null, $nooutput=0) + { global $langs, $conf; 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; $contents=$this->info_box_contents; @@ -183,8 +185,8 @@ class box_actions extends ModeleBoxes $bcx[1] = 'class="box_impair"'; if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo")) { - print '
trans("ActionsToDo").'">'; - print ''; + $out.= '
trans("ActionsToDo").'">'; + $out.= '
'; for ($line=0, $n=$nblines; $line < $n; $line++) { if (isset($contents[$line])) @@ -202,40 +204,45 @@ class box_actions extends ModeleBoxes $urlsoc=$contents[$line][3]['url']; $dateligne=$contents[$line][4]['text']; $percentage=$contents[$line][5]['text']; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + $out.= ''; + $out.= ''; + $out.= ''; + $out.= ''; + $out.= ''; + $out.= ''; + $out.= ''; } } - print '
'; - print img_object("",$logo); - print ''.$label.''.img_object("",$logosoc)." ".$nomsoc.''.$dateligne.''.$percentage.'
'; + $out.= img_object("",$logo); + $out.= ''.$label.''.img_object("",$logosoc)." ".$nomsoc.''.$dateligne.''.$percentage.'
'; + $out.= ''; } - print '
'; + $out.= ''; if ($actioncejour) { - print ''; + $out.= ''; } else { - print ''; + $out.= ''; } } + + if ($nooutput) return $out; + else print $out; + + return ''; } } diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index f7e09d33583..34666507488 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -455,10 +455,11 @@ class box_activity extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index 88adb744ceb..e99a0b30387 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -135,11 +135,12 @@ class box_bookmarks extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 24c940fb9ea..307dcc7cbfd 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -157,11 +157,12 @@ class box_clients extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 6eb5006182c..7653206333d 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -176,11 +176,12 @@ class box_commandes extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @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); } } diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 178851466be..a6b8e2744a6 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -169,11 +169,12 @@ class box_comptes extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index a1fc2768ba1..45963af9bb1 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -83,7 +83,7 @@ class box_contacts extends ModeleBoxes $societestatic=new Societe($db); $line = 0; - while ($line < $num) + while ($line < $num) { $objp = $db->fetch_object($result); $datec=$db->jdate($objp->datec); @@ -100,7 +100,7 @@ class box_contacts extends ModeleBoxes $contactstatic->address = $objp->address; $contactstatic->zip = $objp->zip; $contactstatic->town = $objp->town; - + $societestatic->id = $objp->fk_soc; $societestatic->name = $objp->socname; $societestatic->name_alias = $objp->name_alias; @@ -108,7 +108,7 @@ class box_contacts extends ModeleBoxes $societestatic->code_fournisseur = $objp->code_fournisseur; $societestatic->client = $objp->client; $societestatic->fournisseur = $objp->fournisseur; - + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => $contactstatic->getNomUrl(1), @@ -131,7 +131,7 @@ class box_contacts extends ModeleBoxes 'text' => $contactstatic->getLibStatut(3), 'asis'=>1, ); - + $line++; } @@ -163,11 +163,12 @@ class box_contacts extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 665bff4c6da..40cc8885f90 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -55,14 +55,14 @@ class box_contracts extends ModeleBoxes $this->max=$max; include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; - + $this->info_box_head = array('text' => $langs->trans("BoxTitleLastContracts",$max)); if ($user->rights->contrat->lire) { $contractstatic=new Contrat($db); $thirdpartytmp=new Societe($db); - + $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.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; @@ -83,8 +83,8 @@ class box_contracts extends ModeleBoxes $line = 0; $langs->load("contracts"); - - while ($line < $num) + + while ($line < $num) { $objp = $db->fetch_object($resql); $datec=$db->jdate($objp->datec); @@ -99,7 +99,7 @@ class box_contracts extends ModeleBoxes $thirdpartytmp->name = $objp->name; $thirdpartytmp->id = $objp->socid; - + // 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")); } @@ -157,11 +157,12 @@ class box_contracts extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @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); } } diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index f1db35e1614..dbe71a6ca41 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -184,11 +184,12 @@ class box_external_rss extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @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); } } diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 7b5a01d6bca..22a90929a0b 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -180,11 +180,12 @@ class box_factures extends ModeleBoxes * * @param array $head Array with properties of box title * @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) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 88b64947f05..b43d9cfc47b 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -189,11 +189,12 @@ class box_factures_fourn extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 27441f22ea5..b3ca0fec031 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -186,11 +186,12 @@ class box_factures_fourn_imp extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index bcc26f60e4c..67c4d4dbfcc 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -182,11 +182,12 @@ class box_factures_imp extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index decf5e564f0..d57a2a991df 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -144,11 +144,12 @@ class box_ficheinter extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index e3e6061d803..ed3680af455 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -139,11 +139,12 @@ class box_fournisseurs extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @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); } } diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 579df4762a0..56aa9097ac2 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -81,7 +81,7 @@ class box_goodcustomers extends ModeleBoxes 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.= " 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"; @@ -127,7 +127,7 @@ class box_goodcustomers extends ModeleBoxes 'td' => 'align="right"', 'text' => $nbfact.( $nbimpaye != 0 ? ' ('.$nbimpaye.')':'') ); - + $this->info_box_contents[$line][] = array( 'td' => 'align="right" width="18"', '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 $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 3848960e5e9..1b54d917d05 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -171,7 +171,7 @@ class box_graph_invoices_permonth extends ModeleBoxes if (! $mesg) { $langs->load("bills"); - + $px2->SetData($data2); unset($data2); $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 $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 0931d2d05df..c7856d619f6 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -170,7 +170,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes if (! $mesg) { $langs->load("bills"); - + $px2->SetData($data2); unset($data2); $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 $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 4f86dcd0b8b..4a0f0a7d5b1 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -90,7 +90,7 @@ class box_graph_orders_permonth extends ModeleBoxes if ($user->rights->commande->lire) { $langs->load("orders"); - + $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; $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 $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 6df7d81766c..2ab14bb4502 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -89,7 +89,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes if ($user->rights->fournisseur->commande->lire) { $langs->load("orders"); - + $param_year='DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; $param_shownb='DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; $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 $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 46ddccc2a1d..48168eadb53 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -390,11 +390,12 @@ class box_graph_product_distribution extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 8ef7b25969f..0ae61938ce7 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -264,11 +264,12 @@ class box_graph_propales_permonth extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 9c166aac866..d5d8f1243f5 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -169,11 +169,12 @@ class box_members extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index c8ef1b5f558..5cce3254bfb 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -192,11 +192,12 @@ class box_produits extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 5a718b79696..4d79abd156b 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -199,11 +199,12 @@ class box_produits_alerte_stock extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 7d819ec0d2b..8733f3ed8ce 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -173,11 +173,12 @@ class box_project extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index c14cf07a51c..b0a1e4a3798 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -166,11 +166,12 @@ class box_propales extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @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); } } diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 3895a27a9f1..40adb98b405 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -167,11 +167,12 @@ class box_prospect extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 802dee8474f..b45bde124a3 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -64,7 +64,7 @@ class box_services_contracts extends ModeleBoxes $contractstatic=new Contrat($db); $contratlignestatic=new ContratLigne($db); $thirdpartytmp = new Societe($db); - + $sql = "SELECT s.nom as name, s.rowid as socid,"; $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,"; @@ -103,14 +103,14 @@ class box_services_contracts extends ModeleBoxes $contratlignestatic->type=$objp->type; $contratlignestatic->product_id=$objp->product_id; $contratlignestatic->product_ref=$objp->product_ref; - + $contractstatic->statut=$objp->contract_status; $contractstatic->id=$objp->rowid; $contractstatic->ref=$objp->ref; - + $thirdpartytmp->name = $objp->name; $thirdpartytmp->id = $objp->socid; - + // Multilangs 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), 'asis' => 1 ); - + $this->info_box_contents[$i][] = array('td' => 'align="left"', 'text' => $contractstatic->getNomUrl(1), 'asis' => 1 @@ -175,11 +175,12 @@ class box_services_contracts extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - function showBox($head = null, $contents = null) - { - parent::showBox($this->info_box_head, $this->info_box_contents); + function showBox($head = null, $contents = null, $nooutput=0) + { + parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 296ef56af8a..1e39b286ee9 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -118,7 +118,7 @@ class box_services_expired extends ModeleBoxes $i++; } - if ($num==0) + if ($num==0) { $langs->load("contracts"); $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoExpiredServices")); @@ -147,11 +147,13 @@ class box_services_expired extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string + * @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); } } diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 84521bf4ee0..26061de5bf8 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -171,11 +171,13 @@ class box_supplier_orders extends ModeleBoxes * * @param array $head Array with properties of box title * @param array $contents Array with properties of box lines - * @return void - */ - function showBox($head = null, $contents = null) + * @param int $nooutput No print, only return string + * @param int $nooutput No print, only return string + * @return void + */ + 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); } } diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index d314af73cd1..29dd9390597 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -91,11 +91,11 @@ class box_task extends ModeleBoxes $sql.= $db->plimit($max, 0); $result = $db->query($sql); - if ($result) + if ($result) { $num = $db->num_rows($result); $i = 0; - while ($i < $num) + while ($i < $num) { $objp = $db->fetch_object($result); $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 $contents Array with properties of box lines + * @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); } }