Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
846e827e09
@ -51,6 +51,7 @@ env:
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
- php: 7.1
|
||||||
- php: nightly
|
- php: nightly
|
||||||
# FIXME
|
# FIXME
|
||||||
#- env: DB=postgresql
|
#- env: DB=postgresql
|
||||||
|
|||||||
@ -203,7 +203,7 @@ foreach ($modulesdir as $dir)
|
|||||||
}
|
}
|
||||||
ksort($arrayofnatures);
|
ksort($arrayofnatures);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define array $categ with categ with at least one qualified module
|
// Define array $categ with categ with at least one qualified module
|
||||||
if ($modulequalified > 0)
|
if ($modulequalified > 0)
|
||||||
{
|
{
|
||||||
@ -319,7 +319,7 @@ if ($mode != 'marketplace')
|
|||||||
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
|
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';
|
||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, $search_nature, 1);
|
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1);
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';
|
||||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||||
{
|
{
|
||||||
@ -398,7 +398,7 @@ if ($mode != 'marketplace')
|
|||||||
if ($search_keyword)
|
if ($search_keyword)
|
||||||
{
|
{
|
||||||
$qualified=0;
|
$qualified=0;
|
||||||
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
|
||||||
@ -417,7 +417,7 @@ if ($mode != 'marketplace')
|
|||||||
{
|
{
|
||||||
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
|
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
|
||||||
$publisher=dol_escape_htmltag($objMod->getPublisher());
|
$publisher=dol_escape_htmltag($objMod->getPublisher());
|
||||||
if ($reg[1] && $reg[1] != $publisher) continue;
|
if ($reg[1] && dol_escape_htmltag($reg[1]) != $publisher) continue;
|
||||||
if (! $reg[1] && ! empty($publisher)) continue;
|
if (! $reg[1] && ! empty($publisher)) continue;
|
||||||
}
|
}
|
||||||
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;
|
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;
|
||||||
@ -496,11 +496,12 @@ if ($mode != 'marketplace')
|
|||||||
// Help
|
// Help
|
||||||
print '<td align="center" valign="top" class="nowrap" style="width: 82px;">';
|
print '<td align="center" valign="top" class="nowrap" style="width: 82px;">';
|
||||||
$text='';
|
$text='';
|
||||||
|
|
||||||
if ($objMod->getDescLong()) $text.='<div class="titre">'.$objMod->getDesc().'</div><br>'.$objMod->getDescLong().'<br>';
|
if ($objMod->getDescLong()) $text.='<div class="titre">'.$objMod->getDesc().'</div><br>'.$objMod->getDescLong().'<br>';
|
||||||
else $text.='<div class="titre">'.$objMod->getDesc().'</div><br>';
|
else $text.='<div class="titre">'.$objMod->getDesc().'</div><br>';
|
||||||
|
|
||||||
$textexternal='';
|
$textexternal='';
|
||||||
$imginfo="info";
|
$imginfo="info";
|
||||||
if ($objMod->isCoreOrExternalModule() == 'external')
|
if ($objMod->isCoreOrExternalModule() == 'external')
|
||||||
{
|
{
|
||||||
$imginfo="info_black";
|
$imginfo="info_black";
|
||||||
@ -647,6 +648,7 @@ if ($mode != 'marketplace')
|
|||||||
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
|
||||||
$text.=$langs->trans("DetectionNotPossible");
|
$text.=$langs->trans("DetectionNotPossible");
|
||||||
|
|
||||||
|
|
||||||
print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20');
|
print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20');
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class FormFile
|
|||||||
global $conf,$langs, $hookmanager;
|
global $conf,$langs, $hookmanager;
|
||||||
$hookmanager->initHooks(array('formfile'));
|
$hookmanager->initHooks(array('formfile'));
|
||||||
|
|
||||||
|
|
||||||
if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax=0;
|
if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax=0;
|
||||||
|
|
||||||
if ((! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax) || ($useajax==2))
|
if ((! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax) || ($useajax==2))
|
||||||
@ -275,7 +275,7 @@ class FormFile
|
|||||||
if (0 !== $iconPDF) {
|
if (0 !== $iconPDF) {
|
||||||
dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
|
dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
global $langs, $conf, $user, $hookmanager;
|
global $langs, $conf, $user, $hookmanager;
|
||||||
global $form, $bc;
|
global $form, $bc;
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ class FormFile
|
|||||||
if (! empty($iconPDF)) {
|
if (! empty($iconPDF)) {
|
||||||
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
$printer=0;
|
$printer=0;
|
||||||
if (in_array($modulepart,array('facture','supplier_proposal','propal','proposal','order','commande','expedition', 'commande_fournisseur', 'expensereport'))) // The direct print feature is implemented only for such elements
|
if (in_array($modulepart,array('facture','supplier_proposal','propal','proposal','order','commande','expedition', 'commande_fournisseur', 'expensereport'))) // The direct print feature is implemented only for such elements
|
||||||
{
|
{
|
||||||
@ -559,7 +559,7 @@ class FormFile
|
|||||||
|
|
||||||
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
||||||
$out.= '<th align="center" colspan="'.(3+($addcolumforpicto?'2':'1')).'" class="formdoc liste_titre maxwidthonsmartphone">';
|
$out.= '<th align="center" colspan="'.(3+($addcolumforpicto?'2':'1')).'" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||||
|
|
||||||
// Model
|
// Model
|
||||||
if (! empty($modellist))
|
if (! empty($modellist))
|
||||||
{
|
{
|
||||||
@ -1116,10 +1116,11 @@ class FormFile
|
|||||||
$minifile=getImageFileNameForSize($file['name'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original
|
$minifile=getImageFileNameForSize($file['name'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original
|
||||||
if (! dol_is_file($file['path'].'/'.$minifile)) $minifile=getImageFileNameForSize($file['name'], '_mini', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension
|
if (! dol_is_file($file['path'].'/'.$minifile)) $minifile=getImageFileNameForSize($file['name'], '_mini', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension
|
||||||
//print $file['path'].'/'.$minifile.'<br>';
|
//print $file['path'].'/'.$minifile.'<br>';
|
||||||
|
|
||||||
$urlforhref=getAdvancedPreviewUrl($modulepart, $relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']));
|
$urlforhref=getAdvancedPreviewUrl($modulepart, $relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']));
|
||||||
if (empty($urlforhref)) $urlforhref=DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&file='.urlencode($relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']));
|
if (empty($urlforhref)) $urlforhref=DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.(!empty($object->entity)?$object->entity:$conf->entity).'&file='.urlencode($relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']));
|
||||||
print '<a href="'.$urlforhref.'" class="aphoto" target="_blank">';
|
print '<a href="'.$urlforhref.'" class="aphoto" target="_blank">';
|
||||||
print '<img border="0" height="'.$maxheightmini.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&file='.urlencode($relativepath.$minifile).'" title="">';
|
print '<img border="0" height="'.$maxheightmini.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.(!empty($object->entity)?$object->entity:$conf->entity).'&file='.urlencode($relativepath.$minifile).'" title="">';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
else print ' ';
|
else print ' ';
|
||||||
|
|||||||
@ -45,6 +45,7 @@ $ref = GETPOST('ref');
|
|||||||
$mode = (GETPOST('mode') ? GETPOST('mode') : 'byunit');
|
$mode = (GETPOST('mode') ? GETPOST('mode') : 'byunit');
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
$graphfiles=array();
|
||||||
|
|
||||||
$socid='';
|
$socid='';
|
||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
@ -58,7 +59,7 @@ $result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','',
|
|||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
||||||
@ -69,7 +70,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
llxHeader("",$langs->trans("ProductStatistics"));
|
llxHeader("",$langs->trans("ProductStatistics"));
|
||||||
|
|
||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
|
|
||||||
$helpurl='';
|
$helpurl='';
|
||||||
if ($type == '0')
|
if ($type == '0')
|
||||||
{
|
{
|
||||||
@ -89,13 +90,13 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
//$title=$langs->trans("StatisticsOfProductsOrServices");
|
//$title=$langs->trans("StatisticsOfProductsOrServices");
|
||||||
$title=$langs->trans("Statistics");
|
$title=$langs->trans("Statistics");
|
||||||
}
|
}
|
||||||
|
|
||||||
print load_fiche_titre($title, $mesg,'title_products.png');
|
print load_fiche_titre($title, $mesg,'title_products.png');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id,$ref);
|
$result = $object->fetch($id,$ref);
|
||||||
|
|
||||||
$title = $langs->trans('ProductServiceCard');
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
$shortlabel = dol_trunc($object->label,16);
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
@ -112,8 +113,8 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
|
|
||||||
llxHeader('', $title, $helpurl);
|
llxHeader('', $title, $helpurl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($result && (! empty($id) || ! empty($ref)))
|
if ($result && (! empty($id) || ! empty($ref)))
|
||||||
{
|
{
|
||||||
$head=product_prepare_head($object);
|
$head=product_prepare_head($object);
|
||||||
@ -125,19 +126,19 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', '', '', '', 0, '', '', 1);
|
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', '', '', '', 0, '', '', 1);
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
if (GETPOST('id') == 'all')
|
if (GETPOST('id') == 'all')
|
||||||
{
|
{
|
||||||
$h=0;
|
$h=0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/product/stats/card.php?id=all';
|
$head[$h][0] = DOL_URL_ROOT.'/product/stats/card.php?id=all';
|
||||||
$head[$h][1] = $langs->trans("Chart");
|
$head[$h][1] = $langs->trans("Chart");
|
||||||
$head[$h][2] = 'chart';
|
$head[$h][2] = 'chart';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$title = $langs->trans("ListProductServiceByPopularity");
|
$title = $langs->trans("ListProductServiceByPopularity");
|
||||||
if ((string) $type == '1') {
|
if ((string) $type == '1') {
|
||||||
$title = $langs->trans("ListServiceByPopularity");
|
$title = $langs->trans("ListServiceByPopularity");
|
||||||
@ -145,49 +146,49 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
if ((string) $type == '0') {
|
if ((string) $type == '0') {
|
||||||
$title = $langs->trans("ListProductByPopularity");
|
$title = $langs->trans("ListProductByPopularity");
|
||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/product/popuprop.php'.($type != ''?'?type='.$type:'');
|
$head[$h][0] = DOL_URL_ROOT.'/product/popuprop.php'.($type != ''?'?type='.$type:'');
|
||||||
$head[$h][1] = $title;
|
$head[$h][1] = $title;
|
||||||
$head[$h][2] = 'popularityprop';
|
$head[$h][2] = 'popularityprop';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
dol_fiche_head($head,'chart',$langs->trans("Statistics"));
|
dol_fiche_head($head,'chart',$langs->trans("Statistics"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($result || GETPOST('id') == 'all')
|
if ($result || GETPOST('id') == 'all')
|
||||||
{
|
{
|
||||||
if (GETPOST('id') == 'all')
|
if (GETPOST('id') == 'all')
|
||||||
{
|
{
|
||||||
// Choice of type of product
|
// Choice of type of product
|
||||||
if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
|
if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
|
||||||
|
|
||||||
if ((string) $type != '0') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=0'.($mode?'&mode='.$mode:'').'">';
|
if ((string) $type != '0') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=0'.($mode?'&mode='.$mode:'').'">';
|
||||||
else print img_picto('','tick').' ';
|
else print img_picto('','tick').' ';
|
||||||
print $langs->trans("Products");
|
print $langs->trans("Products");
|
||||||
if ((string) $type != '0') print '</a>';
|
if ((string) $type != '0') print '</a>';
|
||||||
|
|
||||||
if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
|
if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
|
||||||
else print ' / ';
|
else print ' / ';
|
||||||
|
|
||||||
if ((string) $type != '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=1'.($mode?'&mode='.$mode:'').'">';
|
if ((string) $type != '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=1'.($mode?'&mode='.$mode:'').'">';
|
||||||
else print img_picto('','tick').' ';
|
else print img_picto('','tick').' ';
|
||||||
print $langs->trans("Services");
|
print $langs->trans("Services");
|
||||||
if ((string) $type != '1') print '</a>';
|
if ((string) $type != '1') print '</a>';
|
||||||
|
|
||||||
if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
|
if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
|
||||||
else print ' / ';
|
else print ' / ';
|
||||||
|
|
||||||
if ((string) $type == '0' || (string) $type == '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).($mode?'&mode='.$mode:'').'">';
|
if ((string) $type == '0' || (string) $type == '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).($mode?'&mode='.$mode:'').'">';
|
||||||
else print img_picto('','tick').' ';
|
else print img_picto('','tick').' ';
|
||||||
print $langs->trans("ProductsAndServices");
|
print $langs->trans("ProductsAndServices");
|
||||||
if ((string) $type == '0' || (string) $type == '1') print '</a>';
|
if ((string) $type == '0' || (string) $type == '1') print '</a>';
|
||||||
|
|
||||||
if (! empty($conf->dol_use_jmobile)) print '</div></div>';
|
if (! empty($conf->dol_use_jmobile)) print '</div></div>';
|
||||||
else print '<br>';
|
else print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Choice of stats mode (byunit or bynumber)
|
// Choice of stats mode (byunit or bynumber)
|
||||||
if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
|
if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
|
||||||
|
|
||||||
@ -223,25 +224,25 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->propal->enabled) {
|
if($conf->propal->enabled) {
|
||||||
$graphfiles['propal']=array('modulepart'=>'productstats_proposals',
|
$graphfiles['propal']=array('modulepart'=>'productstats_proposals',
|
||||||
'file' => $object->id.'/propal12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
'file' => $object->id.'/propal12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
||||||
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsProposals"):$langs->transnoentitiesnoconv("NumberOfProposals")));
|
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsProposals"):$langs->transnoentitiesnoconv("NumberOfProposals")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->supplier_proposal->enabled) {
|
if($conf->supplier_proposal->enabled) {
|
||||||
$graphfiles['proposalssuppliers']=array('modulepart'=>'productstats_proposalssuppliers',
|
$graphfiles['proposalssuppliers']=array('modulepart'=>'productstats_proposalssuppliers',
|
||||||
'file' => $object->id.'/proposalssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
'file' => $object->id.'/proposalssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
||||||
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierProposals"):$langs->transnoentitiesnoconv("NumberOfSupplierProposals")));
|
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierProposals"):$langs->transnoentitiesnoconv("NumberOfSupplierProposals")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->order->enabled) {
|
if($conf->order->enabled) {
|
||||||
$graphfiles['orders']=array('modulepart'=>'productstats_orders',
|
$graphfiles['orders']=array('modulepart'=>'productstats_orders',
|
||||||
'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
||||||
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerOrders"):$langs->transnoentitiesnoconv("NumberOfCustomerOrders")));
|
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerOrders"):$langs->transnoentitiesnoconv("NumberOfCustomerOrders")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conf->fournisseur->enabled) {
|
if($conf->fournisseur->enabled) {
|
||||||
$graphfiles['orderssuppliers']=array('modulepart'=>'productstats_orderssuppliers',
|
$graphfiles['orderssuppliers']=array('modulepart'=>'productstats_orderssuppliers',
|
||||||
'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
||||||
@ -252,7 +253,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
$graphfiles['invoices']=array('modulepart'=>'productstats_invoices',
|
$graphfiles['invoices']=array('modulepart'=>'productstats_invoices',
|
||||||
'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
'file' => $object->id.'/invoices12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
||||||
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices"):$langs->transnoentitiesnoconv("NumberOfCustomerInvoices")));
|
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsCustomerInvoices"):$langs->transnoentitiesnoconv("NumberOfCustomerInvoices")));
|
||||||
|
|
||||||
$graphfiles['invoicessuppliers']=array('modulepart'=>'productstats_invoicessuppliers',
|
$graphfiles['invoicessuppliers']=array('modulepart'=>'productstats_invoicessuppliers',
|
||||||
'file' => $object->id.'/invoicessuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
'file' => $object->id.'/invoicessuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.'.png',
|
||||||
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierInvoices"):$langs->transnoentitiesnoconv("NumberOfSupplierInvoices")));
|
'label' => ($mode=='byunit'?$langs->transnoentitiesnoconv("NumberOfUnitsSupplierInvoices"):$langs->transnoentitiesnoconv("NumberOfSupplierInvoices")));
|
||||||
@ -283,10 +284,10 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
if ($key == 'proposalssuppliers') $graph_data = $object->get_nb_propalsupplier($socid,$mode,((string) $type != '' ? $type : -1));
|
if ($key == 'proposalssuppliers') $graph_data = $object->get_nb_propalsupplier($socid,$mode,((string) $type != '' ? $type : -1));
|
||||||
if ($key == 'invoicessuppliers') $graph_data = $object->get_nb_achat($socid,$mode,((string) $type != '' ? $type : -1));
|
if ($key == 'invoicessuppliers') $graph_data = $object->get_nb_achat($socid,$mode,((string) $type != '' ? $type : -1));
|
||||||
if ($key == 'orderssuppliers') $graph_data = $object->get_nb_ordersupplier($socid,$mode,((string) $type != '' ? $type : -1));
|
if ($key == 'orderssuppliers') $graph_data = $object->get_nb_ordersupplier($socid,$mode,((string) $type != '' ? $type : -1));
|
||||||
|
|
||||||
// TODO Save cachefile $graphfiles[$key]['file']
|
// TODO Save cachefile $graphfiles[$key]['file']
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($graph_data))
|
if (is_array($graph_data))
|
||||||
{
|
{
|
||||||
$px->SetData($graph_data);
|
$px->SetData($graph_data);
|
||||||
@ -387,7 +388,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
print '<div class="clear"><div class="fichecenter"><br></div></div>'."\n";
|
print '<div class="clear"><div class="fichecenter"><br></div></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('id') == 'all')
|
if (GETPOST('id') == 'all')
|
||||||
{
|
{
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user