New: Add graphical box for turnover and proposal
This commit is contained in:
parent
1b70ecdb26
commit
75214a6b70
@ -70,7 +70,7 @@ if ($mode == 'customer')
|
|||||||
}
|
}
|
||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
$title=$langs->trans("OrdersStatisticsSuppliers");
|
$title=$langs->trans("OrdersStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")";
|
||||||
$dir=$conf->fournisseur->dir_output.'/commande/temp';
|
$dir=$conf->fournisseur->dir_output.'/commande/temp';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -91,9 +91,6 @@ $fieldid = (! empty($ref)?'facnumber':'rowid');
|
|||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid);
|
$result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid);
|
||||||
|
|
||||||
// FIXME $usehm not used ?
|
|
||||||
$usehm=(! empty($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:false);
|
|
||||||
|
|
||||||
$object=new Facture($db);
|
$object=new Facture($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
|
|||||||
@ -29,7 +29,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
|||||||
class box_graph_orders_permonth extends ModeleBoxes
|
class box_graph_orders_permonth extends ModeleBoxes
|
||||||
{
|
{
|
||||||
var $boxcode="orderspermonth";
|
var $boxcode="orderspermonth";
|
||||||
var $boximg="object_bill";
|
var $boximg="object_order";
|
||||||
var $boxlabel="BoxCustomersOrdersPerMonth";
|
var $boxlabel="BoxCustomersOrdersPerMonth";
|
||||||
var $depends = array("commande");
|
var $depends = array("commande");
|
||||||
|
|
||||||
|
|||||||
225
htdocs/core/boxes/box_graph_orders_supplier_permonth.php
Normal file
225
htdocs/core/boxes/box_graph_orders_supplier_permonth.php
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/core/boxes/box_graph_orders_supplier_permonth.php
|
||||||
|
* \ingroup fournisseur
|
||||||
|
* \brief Box to show graph of orders per month
|
||||||
|
*/
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to manage the box to show last orders
|
||||||
|
*/
|
||||||
|
class box_graph_orders_supplier_permonth extends ModeleBoxes
|
||||||
|
{
|
||||||
|
var $boxcode="orderssupplierpermonth";
|
||||||
|
var $boximg="object_order";
|
||||||
|
var $boxlabel="BoxSuppliersOrdersPerMonth";
|
||||||
|
var $depends = array("fournisseur");
|
||||||
|
|
||||||
|
var $db;
|
||||||
|
|
||||||
|
var $info_box_head = array();
|
||||||
|
var $info_box_contents = array();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $param More parameters
|
||||||
|
*/
|
||||||
|
function __construct($db,$param)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$this->db=$db;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load data into info_box_contents array to show array later.
|
||||||
|
*
|
||||||
|
* @param int $max Maximum number of records to load
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function loadBox($max=5)
|
||||||
|
{
|
||||||
|
global $conf, $user, $langs, $db;
|
||||||
|
|
||||||
|
$this->max=$max;
|
||||||
|
|
||||||
|
$refreshaction='refresh_'.$this->boxcode;
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
|
$facturestatic=new Facture($db);
|
||||||
|
|
||||||
|
$text = $langs->trans("BoxSuppliersOrdersPerMonth",$max);
|
||||||
|
$this->info_box_head = array(
|
||||||
|
'text' => $text,
|
||||||
|
'limit'=> dol_strlen($text),
|
||||||
|
'graph'=> 1,
|
||||||
|
'sublink'=>$_SERVER["PHP_SELF"].'?action='.$refreshaction,
|
||||||
|
'subtext'=>$langs->trans("Refresh"),
|
||||||
|
'subpicto'=>'refresh.png',
|
||||||
|
'target'=>'none'
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($user->rights->fournisseur->commande->lire)
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php';
|
||||||
|
|
||||||
|
$shownb=(! empty($conf->global->COMMANDE_BOX_GRAPH_SHOW_NB));
|
||||||
|
$showtot=(! isset($conf->global->COMMANDE_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->COMMANDE_BOX_GRAPH_SHOW_TOT));
|
||||||
|
$nowarray=dol_getdate(dol_now(),true);
|
||||||
|
$endyear=$nowarray['year'];
|
||||||
|
$startyear=$endyear-1;
|
||||||
|
$mode='supplier';
|
||||||
|
$userid=0;
|
||||||
|
$WIDTH='256';
|
||||||
|
$HEIGHT='192';
|
||||||
|
|
||||||
|
$stats = new CommandeStats($this->db, 0, $mode, ($userid>0?$userid:0));
|
||||||
|
|
||||||
|
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
|
||||||
|
if ($shownb)
|
||||||
|
{
|
||||||
|
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||||
|
|
||||||
|
$filenamenb = $dir."/orderssuppliernbinyear-".$year.".png";
|
||||||
|
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$year.'.png';
|
||||||
|
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssuppliernbinyear-'.$year.'.png';
|
||||||
|
|
||||||
|
$px1 = new DolGraph();
|
||||||
|
$mesg = $px1->isGraphKo();
|
||||||
|
if (! $mesg)
|
||||||
|
{
|
||||||
|
$px1->SetData($data1);
|
||||||
|
unset($data1);
|
||||||
|
$px1->SetPrecisionY(0);
|
||||||
|
$i=$startyear;$legend=array();
|
||||||
|
while ($i <= $endyear)
|
||||||
|
{
|
||||||
|
$legend[]=$i;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$px1->SetLegend($legend);
|
||||||
|
$px1->SetMaxValue($px1->GetCeilMaxValue());
|
||||||
|
$px1->SetWidth($WIDTH);
|
||||||
|
$px1->SetHeight($HEIGHT);
|
||||||
|
$px1->SetYLabel($langs->trans("NumberOfOrders"));
|
||||||
|
$px1->SetShading(3);
|
||||||
|
$px1->SetHorizTickIncrement(1);
|
||||||
|
$px1->SetPrecisionY(0);
|
||||||
|
$px1->SetCssPrefix("cssboxes");
|
||||||
|
$px1->mode='depth';
|
||||||
|
$px1->SetTitle($langs->trans("NumberOfOrdersByMonth"));
|
||||||
|
|
||||||
|
$px1->draw($filenamenb,$fileurlnb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
|
||||||
|
if ($showtot)
|
||||||
|
{
|
||||||
|
$data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||||
|
|
||||||
|
$filenamenb = $dir."/orderssupplieramountinyear-".$year.".png";
|
||||||
|
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$year.'.png';
|
||||||
|
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=orderssupplieramountinyear-'.$year.'.png';
|
||||||
|
|
||||||
|
$px2 = new DolGraph();
|
||||||
|
$mesg = $px2->isGraphKo();
|
||||||
|
if (! $mesg)
|
||||||
|
{
|
||||||
|
$px2->SetData($data2);
|
||||||
|
unset($data2);
|
||||||
|
$px2->SetPrecisionY(0);
|
||||||
|
$i=$startyear;$legend=array();
|
||||||
|
while ($i <= $endyear)
|
||||||
|
{
|
||||||
|
$legend[]=$i;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$px2->SetLegend($legend);
|
||||||
|
$px2->SetMaxValue($px2->GetCeilMaxValue());
|
||||||
|
$px2->SetWidth($WIDTH);
|
||||||
|
$px2->SetHeight($HEIGHT);
|
||||||
|
$px2->SetYLabel($langs->trans("AmountOfOrdersHT"));
|
||||||
|
$px2->SetShading(3);
|
||||||
|
$px2->SetHorizTickIncrement(1);
|
||||||
|
$px2->SetPrecisionY(0);
|
||||||
|
$px2->SetCssPrefix("cssboxes");
|
||||||
|
$px2->mode='depth';
|
||||||
|
$px2->SetTitle($langs->trans("AmountOfOrdersByMonthHT"));
|
||||||
|
|
||||||
|
$px2->draw($filenamenb,$fileurlnb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $mesg)
|
||||||
|
{
|
||||||
|
if ($shownb && $showtot)
|
||||||
|
{
|
||||||
|
$stringtoshow ='<div class="fichecenter">';
|
||||||
|
$stringtoshow.='<div class="fichehalfleft">';
|
||||||
|
}
|
||||||
|
if ($shownb) $stringtoshow.=$px1->show();
|
||||||
|
if ($shownb && $showtot)
|
||||||
|
{
|
||||||
|
$stringtoshow.='</div>';
|
||||||
|
$stringtoshow.='<div class="fichehalfright">';
|
||||||
|
}
|
||||||
|
if ($showtot) $stringtoshow.=$px2->show();
|
||||||
|
if ($shownb && $showtot)
|
||||||
|
{
|
||||||
|
$stringtoshow.='</div>';
|
||||||
|
$stringtoshow.='</div>';
|
||||||
|
}
|
||||||
|
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
'maxlength'=>500,
|
||||||
|
'text' => $mesg);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||||
|
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to show box
|
||||||
|
*
|
||||||
|
* @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)
|
||||||
|
{
|
||||||
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
225
htdocs/core/boxes/box_graph_propales_permonth.php
Normal file
225
htdocs/core/boxes/box_graph_propales_permonth.php
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/core/boxes/box_graph_propales_permonth.php
|
||||||
|
* \ingroup propales
|
||||||
|
* \brief Box to show graph of proposals per month
|
||||||
|
*/
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to manage the box to show last propals
|
||||||
|
*/
|
||||||
|
class box_graph_propales_permonth extends ModeleBoxes
|
||||||
|
{
|
||||||
|
var $boxcode="propalpermonth";
|
||||||
|
var $boximg="object_propal";
|
||||||
|
var $boxlabel="BoxProposalsPerMonth";
|
||||||
|
var $depends = array("propal");
|
||||||
|
|
||||||
|
var $db;
|
||||||
|
|
||||||
|
var $info_box_head = array();
|
||||||
|
var $info_box_contents = array();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $param More parameters
|
||||||
|
*/
|
||||||
|
function __construct($db,$param)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$this->db=$db;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load data into info_box_contents array to show array later.
|
||||||
|
*
|
||||||
|
* @param int $max Maximum number of records to load
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function loadBox($max=5)
|
||||||
|
{
|
||||||
|
global $conf, $user, $langs, $db;
|
||||||
|
|
||||||
|
$this->max=$max;
|
||||||
|
|
||||||
|
$refreshaction='refresh_'.$this->boxcode;
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
|
$commandestatic=new Propal($db);
|
||||||
|
|
||||||
|
$text = $langs->trans("BoxProposalsPerMonth",$max);
|
||||||
|
$this->info_box_head = array(
|
||||||
|
'text' => $text,
|
||||||
|
'limit'=> dol_strlen($text),
|
||||||
|
'graph'=> 1,
|
||||||
|
'sublink'=>$_SERVER["PHP_SELF"].'?action='.$refreshaction,
|
||||||
|
'subtext'=>$langs->trans("Refresh"),
|
||||||
|
'subpicto'=>'refresh.png',
|
||||||
|
'target'=>'none'
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($user->rights->commande->lire)
|
||||||
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php';
|
||||||
|
|
||||||
|
$shownb=(! empty($conf->global->PROPAL_BOX_GRAPH_SHOW_NB));
|
||||||
|
$showtot=(! isset($conf->global->PROPAL_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->PROPAL_BOX_GRAPH_SHOW_TOT));
|
||||||
|
$nowarray=dol_getdate(dol_now(),true);
|
||||||
|
$endyear=$nowarray['year'];
|
||||||
|
$startyear=$endyear-1;
|
||||||
|
$mode='customer';
|
||||||
|
$userid=0;
|
||||||
|
$WIDTH='256';
|
||||||
|
$HEIGHT='192';
|
||||||
|
|
||||||
|
$stats = new PropaleStats($this->db, 0, $mode, ($userid>0?$userid:0));
|
||||||
|
|
||||||
|
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
|
||||||
|
if ($shownb)
|
||||||
|
{
|
||||||
|
$data1 = $stats->getNbByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||||
|
|
||||||
|
$filenamenb = $dir."/propalsnbinyear-".$year.".png";
|
||||||
|
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsnbinyear-'.$year.'.png';
|
||||||
|
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsnbinyear-'.$year.'.png';
|
||||||
|
|
||||||
|
$px1 = new DolGraph();
|
||||||
|
$mesg = $px1->isGraphKo();
|
||||||
|
if (! $mesg)
|
||||||
|
{
|
||||||
|
$px1->SetData($data1);
|
||||||
|
unset($data1);
|
||||||
|
$px1->SetPrecisionY(0);
|
||||||
|
$i=$startyear;$legend=array();
|
||||||
|
while ($i <= $endyear)
|
||||||
|
{
|
||||||
|
$legend[]=$i;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$px1->SetLegend($legend);
|
||||||
|
$px1->SetMaxValue($px1->GetCeilMaxValue());
|
||||||
|
$px1->SetWidth($WIDTH);
|
||||||
|
$px1->SetHeight($HEIGHT);
|
||||||
|
$px1->SetYLabel($langs->trans("NumberOfProposals"));
|
||||||
|
$px1->SetShading(3);
|
||||||
|
$px1->SetHorizTickIncrement(1);
|
||||||
|
$px1->SetPrecisionY(0);
|
||||||
|
$px1->SetCssPrefix("cssboxes");
|
||||||
|
$px1->mode='depth';
|
||||||
|
$px1->SetTitle($langs->trans("NumberOfProposalsByMonth"));
|
||||||
|
|
||||||
|
$px1->draw($filenamenb,$fileurlnb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
|
||||||
|
if ($showtot)
|
||||||
|
{
|
||||||
|
$data2 = $stats->getAmountByMonthWithPrevYear($endyear,$startyear,(GETPOST('action')==$refreshaction?-1:(3600*24)));
|
||||||
|
|
||||||
|
$filenamenb = $dir."/propalsamountinyear-".$year.".png";
|
||||||
|
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$year.'.png';
|
||||||
|
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$year.'.png';
|
||||||
|
|
||||||
|
$px2 = new DolGraph();
|
||||||
|
$mesg = $px2->isGraphKo();
|
||||||
|
if (! $mesg)
|
||||||
|
{
|
||||||
|
$px2->SetData($data2);
|
||||||
|
unset($data2);
|
||||||
|
$px2->SetPrecisionY(0);
|
||||||
|
$i=$startyear;$legend=array();
|
||||||
|
while ($i <= $endyear)
|
||||||
|
{
|
||||||
|
$legend[]=$i;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$px2->SetLegend($legend);
|
||||||
|
$px2->SetMaxValue($px2->GetCeilMaxValue());
|
||||||
|
$px2->SetWidth($WIDTH);
|
||||||
|
$px2->SetHeight($HEIGHT);
|
||||||
|
$px2->SetYLabel($langs->trans("AmountOfProposalsHT"));
|
||||||
|
$px2->SetShading(3);
|
||||||
|
$px2->SetHorizTickIncrement(1);
|
||||||
|
$px2->SetPrecisionY(0);
|
||||||
|
$px2->SetCssPrefix("cssboxes");
|
||||||
|
$px2->mode='depth';
|
||||||
|
$px2->SetTitle($langs->trans("AmountOfProposalsByMonthHT"));
|
||||||
|
|
||||||
|
$px2->draw($filenamenb,$fileurlnb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $mesg)
|
||||||
|
{
|
||||||
|
if ($shownb && $showtot)
|
||||||
|
{
|
||||||
|
$stringtoshow ='<div class="fichecenter">';
|
||||||
|
$stringtoshow.='<div class="fichehalfleft">';
|
||||||
|
}
|
||||||
|
if ($shownb) $stringtoshow.=$px1->show();
|
||||||
|
if ($shownb && $showtot)
|
||||||
|
{
|
||||||
|
$stringtoshow.='</div>';
|
||||||
|
$stringtoshow.='<div class="fichehalfright">';
|
||||||
|
}
|
||||||
|
if ($showtot) $stringtoshow.=$px2->show();
|
||||||
|
if ($shownb && $showtot)
|
||||||
|
{
|
||||||
|
$stringtoshow.='</div>';
|
||||||
|
$stringtoshow.='</div>';
|
||||||
|
}
|
||||||
|
$this->info_box_contents[0][0] = array('td' => 'align="center"','textnoformat'=>$stringtoshow);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
'maxlength'=>500,
|
||||||
|
'text' => $mesg);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||||
|
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to show box
|
||||||
|
*
|
||||||
|
* @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)
|
||||||
|
{
|
||||||
|
parent::showBox($this->info_box_head, $this->info_box_contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@ -110,10 +110,11 @@ class modFournisseur extends DolibarrModules
|
|||||||
// Boxes
|
// Boxes
|
||||||
$this->boxes = array(
|
$this->boxes = array(
|
||||||
0=>array('file'=>'box_graph_invoices_supplier_permonth.php','enabledbydefaulton'=>'Home'),
|
0=>array('file'=>'box_graph_invoices_supplier_permonth.php','enabledbydefaulton'=>'Home'),
|
||||||
1=>array('file'=>'box_fournisseurs.php','enabledbydefaulton'=>'Home'),
|
1=>array('file'=>'box_graph_orders_supplier_permonth.php','enabledbydefaulton'=>'Home'),
|
||||||
2=>array('file'=>'box_factures_fourn_imp.php','enabledbydefaulton'=>'Home'),
|
2=>array('file'=>'box_fournisseurs.php','enabledbydefaulton'=>'Home'),
|
||||||
3=>array('file'=>'box_factures_fourn.php','enabledbydefaulton'=>'Home'),
|
3=>array('file'=>'box_factures_fourn_imp.php','enabledbydefaulton'=>'Home'),
|
||||||
4=>array('file'=>'box_supplier_orders.php','enabledbydefaulton'=>'Home'),
|
4=>array('file'=>'box_factures_fourn.php','enabledbydefaulton'=>'Home'),
|
||||||
|
5=>array('file'=>'box_supplier_orders.php','enabledbydefaulton'=>'Home'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
|
|||||||
@ -101,8 +101,10 @@ class modPropale extends DolibarrModules
|
|||||||
$this->const[$r][4] = 0;
|
$this->const[$r][4] = 0;
|
||||||
|
|
||||||
// Boxes
|
// Boxes
|
||||||
$this->boxes = array();
|
$this->boxes = array(
|
||||||
$this->boxes[0][1] = "box_propales.php";
|
0=>array('file'=>'box_graph_propales_permonth.php','enabledbydefaulton'=>'Home'),
|
||||||
|
1=>array('file'=>'box_propales.php','enabledbydefaulton'=>'Home'),
|
||||||
|
);
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->rights = array();
|
$this->rights = array();
|
||||||
|
|||||||
@ -37,4 +37,5 @@ AddCustomerInvoice=Create customer invoice
|
|||||||
AddSupplierOrder=Create supplier order
|
AddSupplierOrder=Create supplier order
|
||||||
AddSupplierInvoice=Create supplier invoice
|
AddSupplierInvoice=Create supplier invoice
|
||||||
ListOfSupplierProductForSupplier=List of products and prices for supplier <b>%s</b>
|
ListOfSupplierProductForSupplier=List of products and prices for supplier <b>%s</b>
|
||||||
NoneOrBatchFileNeverRan=None or batch <b>%s</b> not ran recently
|
NoneOrBatchFileNeverRan=None or batch <b>%s</b> not ran recently
|
||||||
|
SentToSuppliers=Sent to suppliers
|
||||||
@ -38,3 +38,4 @@ AddSupplierOrder=Créer commande fournisseur
|
|||||||
AddSupplierInvoice=Créer facture fournisseur
|
AddSupplierInvoice=Créer facture fournisseur
|
||||||
ListOfSupplierProductForSupplier=Liste des produits et prix du fournisseurs <b>%s</b>
|
ListOfSupplierProductForSupplier=Liste des produits et prix du fournisseurs <b>%s</b>
|
||||||
NoneOrBatchFileNeverRan=Aucun ou traitement par lot <b>%s</b> non exécuté récemment
|
NoneOrBatchFileNeverRan=Aucun ou traitement par lot <b>%s</b> non exécuté récemment
|
||||||
|
SentToSuppliers=Envoyés aux fournisseurs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user