Merge remote-tracking branch 'upstream/develop' into escpos

This commit is contained in:
Frédéric FRANCE 2019-11-04 18:52:29 +01:00
commit 6ad983bb7b
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
110 changed files with 450 additions and 315 deletions

View File

@ -164,7 +164,7 @@ foreach ($files as $filetmp) {
if (filetype($file)=="file") { if (filetype($file)=="file") {
$md5=md5_file($file); $md5=md5_file($file);
$checksumconcat[]=$md5; $checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n"); fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
} }
} }
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");
@ -207,7 +207,7 @@ foreach ($files as $filetmp) {
if (filetype($file)=="file") { if (filetype($file)=="file") {
$md5=md5_file($file); $md5=md5_file($file);
$checksumconcat[]=$md5; $checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n"); fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
} }
} }
fputs($fp, ' </dir>'."\n"); fputs($fp, ' </dir>'."\n");

View File

@ -129,8 +129,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='AccountingAccount'; $objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read; $permissiontoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete; $permissiontodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output; $uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -112,8 +112,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
// Mass actions // Mass actions
$objectclass='ExpenseReport'; $objectclass='ExpenseReport';
$objectlabel='ExpenseReport'; $objectlabel='ExpenseReport';
$permtoread = $user->rights->expensereport->read; $permissiontoread = $user->rights->expensereport->read;
$permtodelete = $user->rights->expensereport->delete; $permissiontodelete = $user->rights->expensereport->delete;
$uploaddir = $conf->expensereport->dir_output; $uploaddir = $conf->expensereport->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

View File

@ -133,8 +133,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='AccountingAccount'; $objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read; $permissiontoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete; $permissiontodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output; $uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -232,8 +232,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Adherent'; $objectclass='Adherent';
$objectlabel='Members'; $objectlabel='Members';
$permtoread = $user->rights->adherent->lire; $permissiontoread = $user->rights->adherent->lire;
$permtodelete = $user->rights->adherent->supprimer; $permissiontodelete = $user->rights->adherent->supprimer;
$uploaddir = $conf->adherent->dir_output; $uploaddir = $conf->adherent->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -156,8 +156,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='EmailCollector'; $objectclass='EmailCollector';
$objectlabel='EmailCollector'; $objectlabel='EmailCollector';
$permtoread = $user->rights->emailcollector->read; $permissiontoread = $user->rights->emailcollector->read;
$permtodelete = $user->rights->emailcollector->delete; $permissiontodelete = $user->rights->emailcollector->delete;
$uploaddir = $conf->emailcollector->dir_output; $uploaddir = $conf->emailcollector->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -148,8 +148,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='EmailSenderProfile'; $objectclass='EmailSenderProfile';
$objectlabel='EmailSenderProfile'; $objectlabel='EmailSenderProfile';
$permtoread = $user->admin; $permissiontoread = $user->admin;
$permtodelete = $user->admin; $permissiontodelete = $user->admin;
$uploaddir = $conf->admin->dir_output.'/senderprofiles'; $uploaddir = $conf->admin->dir_output.'/senderprofiles';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -46,7 +46,7 @@ llxHeader();
print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup'); print load_fiche_titre($langs->trans("FileCheckDolibarr"), '', 'title_setup');
print $langs->trans("FileCheckDesc").'<br><br>'; print '<span class="opacitymedium">'.$langs->trans("FileCheckDesc").'</span><br><br>';
// Version // Version
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
@ -239,6 +239,7 @@ if (! $error && $xml)
$out.='<tr class="liste_titre">'; $out.='<tr class="liste_titre">';
$out.='<td>#</td>'; $out.='<td>#</td>';
$out.='<td>' . $langs->trans("Filename") . '</td>'; $out.='<td>' . $langs->trans("Filename") . '</td>';
$out.='<td class="right">' . $langs->trans("ExpectedSize") . '</td>';
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>'; $out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>';
$out.='</tr>'."\n"; $out.='</tr>'."\n";
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); $tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
@ -251,6 +252,9 @@ if (! $error && $xml)
$out.='<tr class="oddeven">'; $out.='<tr class="oddeven">';
$out.='<td>'.$i.'</td>' . "\n"; $out.='<td>'.$i.'</td>' . "\n";
$out.='<td>'.$file['filename'].'</td>' . "\n"; $out.='<td>'.$file['filename'].'</td>' . "\n";
$out.='<td class="right">';
if (! empty($file['expectedsize'])) $out.=dol_print_size($file['expectedsize']);
$out.='</td>' . "\n";
$out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n"; $out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n";
$out.="</tr>\n"; $out.="</tr>\n";
} }
@ -275,7 +279,8 @@ if (! $error && $xml)
$out.='<td>' . $langs->trans("Filename") . '</td>'; $out.='<td>' . $langs->trans("Filename") . '</td>';
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>'; $out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>';
$out.='<td class="center">' . $langs->trans("CurrentChecksum") . '</td>'; $out.='<td class="center">' . $langs->trans("CurrentChecksum") . '</td>';
$out.='<td class="right">' . $langs->trans("Size") . '</td>'; $out.='<td class="right">' . $langs->trans("ExpectedSize") . '</td>';
$out.='<td class="right">' . $langs->trans("CurrentSize") . '</td>';
$out.='<td class="right">' . $langs->trans("DateModification") . '</td>'; $out.='<td class="right">' . $langs->trans("DateModification") . '</td>';
$out.='</tr>'."\n"; $out.='</tr>'."\n";
$tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename');
@ -290,6 +295,9 @@ if (! $error && $xml)
$out.='<td>'.$file['filename'].'</td>' . "\n"; $out.='<td>'.$file['filename'].'</td>' . "\n";
$out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n"; $out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n";
$out.='<td class="center">'.$file['md5'].'</td>' . "\n"; $out.='<td class="center">'.$file['md5'].'</td>' . "\n";
$out.='<td class="right">';
if ($file['expectedsize']) $out.=dol_print_size($file['expectedsize']);
$out.='</td>' . "\n";
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
$totalsize += $size; $totalsize += $size;
$out.='<td class="right">'.dol_print_size($size).'</td>' . "\n"; $out.='<td class="right">'.dol_print_size($size).'</td>' . "\n";
@ -301,6 +309,7 @@ if (! $error && $xml)
$out.='<td>'.$langs->trans("Total").'</td>' . "\n"; $out.='<td>'.$langs->trans("Total").'</td>' . "\n";
$out.='<td class="center"></td>' . "\n"; $out.='<td class="center"></td>' . "\n";
$out.='<td class="center"></td>' . "\n"; $out.='<td class="center"></td>' . "\n";
$out.='<td class="center"></td>' . "\n";
$out.='<td class="right">'.dol_print_size($totalsize).'</td>' . "\n"; $out.='<td class="right">'.dol_print_size($totalsize).'</td>' . "\n";
$out.='<td class="right"></td>' . "\n"; $out.='<td class="right"></td>' . "\n";
$out.="</tr>\n"; $out.="</tr>\n";

View File

@ -40,7 +40,7 @@ llxHeader();
print load_fiche_titre($langs->trans("AvailableModules"), '', 'title_setup'); print load_fiche_titre($langs->trans("AvailableModules"), '', 'title_setup');
print $langs->trans("ToActivateModule").'<br>'; print '<span class="opacitymedium">'.$langs->trans("ToActivateModule").'</span><br>';
print "<br>\n"; print "<br>\n";
$modules = array(); $modules = array();

View File

@ -49,7 +49,7 @@ $form = new Form($db);
print load_fiche_titre($langs->trans("TriggersAvailable"), '', 'title_setup'); print load_fiche_titre($langs->trans("TriggersAvailable"), '', 'title_setup');
print $langs->trans("TriggersDesc")."<br>"; print '<span class="opacitymedium">'.$langs->trans("TriggersDesc")."</span><br>";
print "<br>\n"; print "<br>\n";
@ -60,8 +60,8 @@ $param = ''; $align = '';
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">'; print '<table class="noborder">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n"; print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n"; print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n"; print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print '</tr>'; print '</tr>';
@ -69,7 +69,7 @@ print '</tr>';
foreach ($triggers as $trigger) foreach ($triggers as $trigger)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>'; print '<td class="tdtop" width="32">'.$trigger['picto'].'</td>';
print '<td class="tdtop">'.$trigger['file'].'</td>'; print '<td class="tdtop">'.$trigger['file'].'</td>';
print '<td valign="top" align="center">'.$trigger['status'].'</td>'; print '<td valign="top" align="center">'.$trigger['status'].'</td>';
print '<td class="tdtop">'; print '<td class="tdtop">';

View File

@ -152,8 +152,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Asset'; $objectclass='Asset';
$objectlabel='Asset'; $objectlabel='Asset';
$permtoread = $user->rights->asset->read; $permissiontoread = $user->rights->asset->read;
$permtodelete = $user->rights->asset->delete; $permissiontodelete = $user->rights->asset->delete;
$uploaddir = $conf->asset->dir_output; $uploaddir = $conf->asset->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -72,14 +72,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
// Security check - Protection if external user // Security check - Protection if external user
//if ($user->socid > 0) access_forbidden(); //if ($user->socid > 0) access_forbidden();
//if ($user->socid > 0) $socid = $user->socid; //if ($user->socid > 0) $socid = $user->socid;
//$isdraft = (($object->statut == BillOfMaterials::STATUS_DRAFT) ? 1 : 0); //$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); //$result = restrictedArea($user, 'bom', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
$permissionnote=$user->rights->bom->write; // Used by the include of actions_setnotes.inc.php $permissionnote=$user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink=$user->rights->bom->write; // Used by the include of actions_dellink.inc.php $permissiondellink=$user->rights->bom->write; // Used by the include of actions_dellink.inc.php
$permissionedit=$user->rights->bom->write; // Used by the include of actions_lineupdown.inc.php $permissionedit=$user->rights->bom->write; // Used by the include of actions_lineupdown.inc.php
$permissiontoadd=$user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php $permissiontoadd=$user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php
$permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0); $permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
/* /*
@ -457,7 +457,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{ {
$langs->load("projects"); $langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' '; $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->bom->write) if ($permissiontoadd)
{ {
if ($action != 'classify') if ($action != 'classify')
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
@ -532,7 +532,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
if (! empty($object->lines) || ($object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{ {
print '<table id="tablelines" class="noborder noshadow" width="100%">'; print '<table id="tablelines" class="noborder noshadow" width="100%">';
} }
@ -555,7 +555,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
} }
if (! empty($object->lines) || ($object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{ {
print '</table>'; print '</table>';
} }
@ -565,8 +565,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Buttons for actions // Buttons for actions
if ($action != 'presend' && $action != 'editline') { if ($action != 'presend' && $action != 'editline') {
print '<div class="tabsAction">'."\n"; print '<div class="tabsAction">'."\n";
$parameters=array(); $parameters=array();
@ -584,7 +584,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Modify // Modify
if ($user->rights->bom->write) if ($permissiontoadd)
{ {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n";
} }
@ -619,7 +619,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Clone // Clone
if ($user->rights->bom->write) if ($permissiontoadd)
{ {
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&object=bom">' . $langs->trans("ToClone") . '</a>'; print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&object=bom">' . $langs->trans("ToClone") . '</a>';
} }
@ -638,7 +638,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
*/ */
if ($user->rights->bom->delete) if ($permissiontodelete)
{ {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n"; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n";
} }

View File

@ -1,6 +1,5 @@
<?php <?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) ---Put here your own copyright and developer email---
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -114,6 +113,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
$object->fields = dol_sort_array($object->fields, 'position'); $object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position');
$permissiontoread = $user->rights->bom->read;
$permissiontoadd = $user->rights->bom->write;
$permissiontodelete = $user->rights->bom->delete;
/* /*
@ -151,13 +153,68 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='BOM'; $objectclass='BOM';
$objectlabel='BillOfMaterials'; $objectlabel='BillOfMaterials';
$permtoread = $user->rights->bom->read; $permissiontoread = $user->rights->bom->read;
$permtodelete = $user->rights->bom->delete; $permissiontodelete = $user->rights->bom->delete;
$uploaddir = $conf->bom->dir_output; $uploaddir = $conf->bom->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
// Validate records
if (! $error && $massaction == 'disable' && $permissiontoadd)
{
$objecttmp=new $objectclass($db);
if (! $error)
{
$db->begin();
$nbok = 0;
foreach($toselect as $toselectid)
{
$result=$objecttmp->fetch($toselectid);
if ($result > 0)
{
if ($objecttmp->status != $objecttmp::STATUS_VALIDATED)
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidatedToBeDisabled", $objecttmp->ref), null, 'errors');
$error++;
break;
}
// Can be 'cancel()' or 'close()'
$result = $objecttmp->cancel($user);
if ($result < 0)
{
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
$error++;
break;
}
else $nbok++;
}
else
{
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
$error++;
break;
}
}
if (! $error)
{
if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
$db->commit();
}
else
{
$db->rollback();
}
//var_dump($listofobjectthirdparties);exit;
}
}
}
/* /*
* View * View
@ -303,7 +360,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// List of mass actions available // List of mass actions available
$arrayofmassactions = array( $arrayofmassactions = array(
//'presend'=>$langs->trans("SendByMail"), //'presend'=>$langs->trans("SendByMail"),
//'builddoc'=>$langs->trans("PDFMerge"), 'disable'=>$langs->trans("Disable"),
); );
if ($user->rights->bom->delete) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); if ($user->rights->bom->delete) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions=array(); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions=array();
@ -539,6 +596,7 @@ print '</div>'."\n";
print '</form>'."\n"; print '</form>'."\n";
if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
{ {
$hidegeneratedfilelistifempty=1; $hidegeneratedfilelistifempty=1;

View File

@ -91,7 +91,7 @@ class BOM extends CommonObject
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',),
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',),
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,), 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,),
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'), 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1:(finished IS NULL or finished <> 0)', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'),
'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth75imp'), 'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth75imp'),
'efficiency' => array('type'=>'real', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>-1, 'default'=>1, 'position'=>100, 'notnull'=>0, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLoss'), 'efficiency' => array('type'=>'real', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>-1, 'default'=>1, 'position'=>100, 'notnull'=>0, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLoss'),
'duration' => array('type'=>'real', 'label'=>'EstimatedDuration', 'enabled'=>1, 'visible'=>-1, 'position'=>101, 'notnull'=>-1, 'css'=>'maxwidth50imp', 'help'=>'EstimatedDurationDesc'), 'duration' => array('type'=>'real', 'label'=>'EstimatedDuration', 'enabled'=>1, 'visible'=>-1, 'position'=>101, 'notnull'=>-1, 'css'=>'maxwidth50imp', 'help'=>'EstimatedDurationDesc'),

View File

@ -90,7 +90,7 @@ function bomPrepareHead($object)
if (!empty($object->note_public)) $nbNote++; if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -102,7 +102,7 @@ function bomPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/bom/bom_document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;

View File

@ -102,8 +102,8 @@ if (empty($reshook))
// Mass actions // Mass actions
/*$objectclass='MyObject'; /*$objectclass='MyObject';
$objectlabel='MyObject'; $objectlabel='MyObject';
$permtoread = $user->rights->mymodule->read; $permissiontoread = $user->rights->mymodule->read;
$permtodelete = $user->rights->mymodule->delete; $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output; $uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/ */

View File

@ -241,9 +241,9 @@ if (empty($reshook))
{ {
$objectclass='Propal'; $objectclass='Propal';
$objectlabel='Proposals'; $objectlabel='Proposals';
$permtoread = $user->rights->propal->lire; $permissiontoread = $user->rights->propal->lire;
$permtodelete = $user->rights->propal->supprimer; $permissiontodelete = $user->rights->propal->supprimer;
$permtoclose = $user->rights->propal->cloturer; $permissiontoclose = $user->rights->propal->cloturer;
$uploaddir = $conf->propal->multidir_output[$conf->entity]; $uploaddir = $conf->propal->multidir_output[$conf->entity];
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -220,8 +220,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Commande'; $objectclass='Commande';
$objectlabel='Orders'; $objectlabel='Orders';
$permtoread = $user->rights->commande->lire; $permissiontoread = $user->rights->commande->lire;
$permtodelete = $user->rights->commande->supprimer; $permissiontodelete = $user->rights->commande->supprimer;
$uploaddir = $conf->commande->multidir_output[$conf->entity]; $uploaddir = $conf->commande->multidir_output[$conf->entity];
$trigger_name='ORDER_SENTBYMAIL'; $trigger_name='ORDER_SENTBYMAIL';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

View File

@ -209,8 +209,8 @@ if (empty($reshook))
{ {
$objectclass='Account'; $objectclass='Account';
$objectlabel='BankTransaction'; $objectlabel='BankTransaction';
$permtoread = $user->rights->banque->lire; $permissiontoread = $user->rights->banque->lire;
$permtodelete = $user->rights->banque->supprimer; $permissiontodelete = $user->rights->banque->supprimer;
$uploaddir = $conf->bank->dir_output; $uploaddir = $conf->bank->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -168,8 +168,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='CashControl'; $objectclass='CashControl';
$objectlabel='CashControl'; $objectlabel='CashControl';
$permtoread = ($user->rights->cashdesk->use || $user->rights->takepos->use); $permissiontoread = ($user->rights->cashdesk->use || $user->rights->takepos->use);
$permtodelete = ($user->rights->cashdesk->use || $user->rights->takepos->use); $permissiontodelete = ($user->rights->cashdesk->use || $user->rights->takepos->use);
//$uploaddir = ''; //$uploaddir = '';
//include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; //include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

View File

@ -146,8 +146,8 @@ if (empty($reshook))
// Mass actions // Mass actions
/*$objectclass='MyObject'; /*$objectclass='MyObject';
$objectlabel='MyObject'; $objectlabel='MyObject';
$permtoread = $user->rights->mymodule->read; $permissiontoread = $user->rights->mymodule->read;
$permtodelete = $user->rights->mymodule->delete; $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output; $uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/ include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/

View File

@ -191,8 +191,8 @@ if (empty($reshook))
// Mass actions // Mass actions
/*$objectclass='MyObject'; /*$objectclass='MyObject';
$objectlabel='MyObject'; $objectlabel='MyObject';
$permtoread = $user->rights->mymodule->read; $permissiontoread = $user->rights->mymodule->read;
$permtodelete = $user->rights->mymodule->delete; $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output; $uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/ include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/
} }

View File

@ -265,9 +265,9 @@ if (empty($reshook))
{ {
$objectclass='Facture'; $objectclass='Facture';
$objectlabel='Invoices'; $objectlabel='Invoices';
$permtoread = $user->rights->facture->lire; $permissiontoread = $user->rights->facture->lire;
$permtocreate = $user->rights->facture->creer; $permissiontoadd = $user->rights->facture->creer;
$permtodelete = $user->rights->facture->supprimer; $permissiontodelete = $user->rights->facture->supprimer;
$uploaddir = $conf->facture->dir_output; $uploaddir = $conf->facture->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -254,8 +254,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Contact'; $objectclass='Contact';
$objectlabel='Contact'; $objectlabel='Contact';
$permtoread = $user->rights->societe->lire; $permissiontoread = $user->rights->societe->lire;
$permtodelete = $user->rights->societe->supprimer; $permissiontodelete = $user->rights->societe->supprimer;
$uploaddir = $conf->societe->dir_output; $uploaddir = $conf->societe->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -1875,8 +1875,8 @@ class Contrat extends CommonObject
/** /**
* Return label of a contract status * Return label of a contract status
* *
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto, 7=Same than 6 with fixed length
* @return string Label * @return string Label
*/ */
public function getLibStatut($mode) public function getLibStatut($mode)
{ {
@ -1888,7 +1888,7 @@ class Contrat extends CommonObject
* Renvoi label of a given contrat status * Renvoi label of a given contrat status
* *
* @param int $status Id status * @param int $status Id status
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto, 7=Same than 6 with fixed length
* @return string Label * @return string Label
*/ */
public function LibStatut($status, $mode) public function LibStatut($status, $mode)
@ -1921,13 +1921,13 @@ class Contrat extends CommonObject
$text.=': &nbsp; &nbsp; '; $text.=': &nbsp; &nbsp; ';
$text.='</span>'; $text.='</span>';
} }
$text.=($mode == 7?'<span class="nowrap">':''); $text.=($mode == 7?'<span class="nowraponall">':'');
$text.=($mode != 7 || $this->nbofserviceswait > 0) ? ($this->nbofserviceswait.ContratLigne::LibStatut(0, 3, -1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesopened || $this->nbofservicesexpired || $this->nbofservicesclosed)?' &nbsp; ':'') : ''; $text.=($mode != 7 || $this->nbofserviceswait > 0) ? ($this->nbofserviceswait.ContratLigne::LibStatut(0, 3, -1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesopened || $this->nbofservicesexpired || $this->nbofservicesclosed)?' &nbsp; ':'') : '';
$text.=($mode == 7?'</span><span class="nowrap">':''); $text.=($mode == 7?'</span><span class="nowraponall">':'');
$text.=($mode != 7 || $this->nbofservicesopened > 0) ? ($this->nbofservicesopened.ContratLigne::LibStatut(4, 3, 0, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesexpired || $this->nbofservicesclosed)?' &nbsp; ':'') : ''; $text.=($mode != 7 || $this->nbofservicesopened > 0) ? ($this->nbofservicesopened.ContratLigne::LibStatut(4, 3, 0, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesexpired || $this->nbofservicesclosed)?' &nbsp; ':'') : '';
$text.=($mode == 7?'</span><span class="nowrap">':''); $text.=($mode == 7?'</span><span class="nowraponall">':'');
$text.=($mode != 7 || $this->nbofservicesexpired > 0) ? ($this->nbofservicesexpired.ContratLigne::LibStatut(4, 3, 1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesclosed)?' &nbsp; ':'') : ''; $text.=($mode != 7 || $this->nbofservicesexpired > 0) ? ($this->nbofservicesexpired.ContratLigne::LibStatut(4, 3, 1, 'class="marginleft2"')).(($mode != 7 || $this->nbofservicesclosed)?' &nbsp; ':'') : '';
$text.=($mode == 7?'</span><span class="nowrap">':''); $text.=($mode == 7?'</span><span class="nowraponall">':'');
$text.=($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="marginleft2"')) : ''; $text.=($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="marginleft2"')) : '';
$text.=($mode == 7?'</span>':''); $text.=($mode == 7?'</span>':'');
return $text; return $text;

View File

@ -188,8 +188,8 @@ if (empty($reshook))
{ {
$objectclass='Contrat'; $objectclass='Contrat';
$objectlabel='Contracts'; $objectlabel='Contracts';
$permtoread = $user->rights->contrat->lire; $permissiontoread = $user->rights->contrat->lire;
$permtodelete = $user->rights->contrat->supprimer; $permissiontodelete = $user->rights->contrat->supprimer;
$uploaddir = $conf->contrat->dir_output; $uploaddir = $conf->contrat->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }
@ -591,10 +591,10 @@ if (! empty($arrayfields['lower_planned_end_date']['checked'])) {
print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center ');
} }
if (! empty($arrayfields['status']['checked'])) { if (! empty($arrayfields['status']['checked'])) {
print_liste_field_titre($staticcontratligne->LibStatut(0, 3), '', '', '', '', 'width="16"'); print_liste_field_titre($staticcontratligne->LibStatut(0, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0), '', '', '', '', 'width="16"'); print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1), '', '', '', '', 'width="16"'); print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(5, 3), '', '', '', '', 'width="16"'); print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";

View File

@ -30,7 +30,7 @@
// $objectclass and $objectlabel must be defined // $objectclass and $objectlabel must be defined
// $parameters, $object, $action must be defined for the hook. // $parameters, $object, $action must be defined for the hook.
// $permtoread, $permtocreate and $permtodelete may be defined // $permissiontoread, $permissiontoadd, $permissiontodelete, $permissiontoclose may be defined
// $uploaddir may be defined (example to $conf->projet->dir_output."/";) // $uploaddir may be defined (example to $conf->projet->dir_output."/";)
// $toselect may be defined // $toselect may be defined
// $diroutputmassaction may be defined // $diroutputmassaction may be defined
@ -43,6 +43,11 @@ if (empty($objectclass) || empty($uploaddir))
exit; exit;
} }
// For backward compatibility
if (! empty($permtoread) && empty($permissiontoread)) $permissiontoread = $permtoread;
if (! empty($permtocreate) && empty($permissiontoadd)) $permissiontoadd = $permtocreate;
if (! empty($permtodelete) && empty($permissiontodelete)) $permissiontoread = $permtodelete;
// Mass actions. Controls on number of lines checked. // Mass actions. Controls on number of lines checked.
$maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS); $maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS);
@ -924,7 +929,7 @@ if (!$error && $massaction == 'cancelorders')
} }
if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search')) if (! $error && $massaction == "builddoc" && $permissiontoread && ! GETPOST('button_search'))
{ {
if (empty($diroutputmassaction)) if (empty($diroutputmassaction))
{ {
@ -1105,7 +1110,7 @@ if ($action == 'remove_file')
} }
// Validate records // Validate records
if (! $error && $massaction == 'validate' && $permtocreate) if (! $error && $massaction == 'validate' && $permissiontoadd)
{ {
$objecttmp=new $objectclass($db); $objecttmp=new $objectclass($db);
@ -1170,8 +1175,9 @@ if (! $error && $massaction == 'validate' && $permtocreate)
//var_dump($listofobjectthirdparties);exit; //var_dump($listofobjectthirdparties);exit;
} }
} }
// Closed records // Closed records
if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissiontoclose) {
$db->begin(); $db->begin();
$objecttmp = new $objectclass($db); $objecttmp = new $objectclass($db);
@ -1206,7 +1212,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo
} }
} }
// Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before)
if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete)
{ {
$db->begin(); $db->begin();
@ -1272,7 +1278,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm ==
// Generate document foreach object according to model linked to object // Generate document foreach object according to model linked to object
// @TODO : propose model selection // @TODO : propose model selection
if (! $error && $massaction == 'generate_doc' && $permtoread) if (! $error && $massaction == 'generate_doc' && $permissiontoread)
{ {
$db->begin(); $db->begin();

View File

@ -133,7 +133,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($amount, 0, $langs, 0, -1, -1, $conf->currency), 'text' => price($amount, 0, $langs, 0, -1, -1, $conf->currency),
); );

View File

@ -173,7 +173,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb; $totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array( $this->info_box_contents[$line][3] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency), 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
); );
$this->info_box_contents[$line][4] = array( $this->info_box_contents[$line][4] = array(
@ -255,7 +255,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb; $totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array( $this->info_box_contents[$line][3] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency), 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
); );
$this->info_box_contents[$line][4] = array( $this->info_box_contents[$line][4] = array(
@ -339,7 +339,7 @@ class box_activity extends ModeleBoxes
); );
$this->info_box_contents[$line][3] = array( $this->info_box_contents[$line][3] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency) 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency)
); );
@ -421,7 +421,7 @@ class box_activity extends ModeleBoxes
); );
$totalnb += $data[$j]->nb; $totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array( $this->info_box_contents[$line][3] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency), 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
); );
$this->info_box_contents[$line][4] = array( $this->info_box_contents[$line][4] = array(

View File

@ -116,7 +116,7 @@ class box_boms extends ModeleBoxes
$productstatic->ref = $objp->product_ref; $productstatic->ref = $objp->product_ref;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $bomstatic->getNomUrl(1), 'text' => $bomstatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );

View File

@ -135,7 +135,7 @@ class box_commandes extends ModeleBoxes
$societestatic->logo = $objp->logo; $societestatic->logo = $objp->logo;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $commandestatic->getNomUrl(1), 'text' => $commandestatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );
@ -147,7 +147,7 @@ class box_commandes extends ModeleBoxes
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
); );

View File

@ -154,7 +154,7 @@ class box_comptes extends ModeleBoxes
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="liste_total right"', 'td' => 'class="liste_total right nowraponall"',
'text' => price($solde, 0, $langs, 0, -1, -1, $key) 'text' => price($solde, 0, $langs, 0, -1, -1, $key)
); );
$line++; $line++;

View File

@ -136,13 +136,13 @@ class box_contacts extends ModeleBoxes
$societestatic->fournisseur = $objp->fournisseur; $societestatic->fournisseur = $objp->fournisseur;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $contactstatic->getNomUrl(1), 'text' => $contactstatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => ($objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : ''), 'text' => ($objp->fk_soc > 0 ? $societestatic->getNomUrl(1) : ''),
'asis' => 1, 'asis' => 1,
); );
@ -164,7 +164,8 @@ class box_contacts extends ModeleBoxes
if ($num==0) if ($num==0)
$this->info_box_contents[$line][0] = array( $this->info_box_contents[$line][0] = array(
'td' => 'class="center"', 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedContacts"), 'text'=> '<span class="opacitymedium">'.$langs->trans("NoRecordedContacts").'</span>',
'asis'=> 1
); );
$this->db->free($result); $this->db->free($result);

View File

@ -136,7 +136,7 @@ class box_contracts extends ModeleBoxes
// 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")); }
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $contractstatic->getNomUrl(1), 'text' => $contractstatic->getNomUrl(1),
'text2'=> $late, 'text2'=> $late,
'asis'=>1 'asis'=>1

View File

@ -145,13 +145,13 @@ class box_factures_fourn_imp extends ModeleBoxes
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, '', 40), 'text' => $thirdpartytmp->getNomUrl(1, '', 40),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
); );

View File

@ -150,20 +150,20 @@ class box_factures_imp extends ModeleBoxes
} }
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $facturestatic->getNomUrl(1), 'text' => $facturestatic->getNomUrl(1),
'text2'=> $late, 'text2'=> $late,
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $societestatic->getNomUrl(1, '', 44), 'text' => $societestatic->getNomUrl(1, '', 44),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="nowrap right"', 'td' => 'class="nowraponall right"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
); );

View File

@ -120,13 +120,13 @@ class box_ficheinter extends ModeleBoxes
$companystatic->email = $objp->semail; $companystatic->email = $objp->semail;
$this->info_box_contents[$i][] = array( $this->info_box_contents[$i][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $ficheinterstatic->getNomUrl(1), 'text' => $ficheinterstatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$i][] = array( $this->info_box_contents[$i][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $companystatic->getNomUrl(1), 'text' => $companystatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );

View File

@ -140,7 +140,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Ticket // Ticket
$this->info_box_contents[$i][0] = array( $this->info_box_contents[$i][0] = array(
'td' => 'class="left"', 'td' => 'class="nowraponall"',
'text' => $ticket->getNomUrl(1), 'text' => $ticket->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );
@ -148,7 +148,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Subject // Subject
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="nowrap"',
'text' => $objp->subject, // Some event have no ref 'text' => $objp->subject, // Some event have no ref
'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id, 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id,
); );
@ -156,7 +156,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Customer // Customer
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="tdoverflowmax150 maxwidth300onsmartphone"',
'text' => $link, 'text' => $link,
'asis' => 1, 'asis' => 1,
); );
@ -172,7 +172,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Statut // Statut
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="right"', 'td' => 'class="right nowraponall"',
'text' => $ticket->getLibStatut(3) 'text' => $ticket->getLibStatut(3)
); );
$r++; $r++;

View File

@ -141,7 +141,7 @@ class box_last_ticket extends ModeleBoxes
// Ticket // Ticket
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="nowraponall"',
'text' => $ticket->getNomUrl(1), 'text' => $ticket->getNomUrl(1),
'asis' => 1 'asis' => 1
); );
@ -149,7 +149,7 @@ class box_last_ticket extends ModeleBoxes
// Subject // Subject
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => '',
'text' => $objp->subject, // Some event have no ref 'text' => $objp->subject, // Some event have no ref
'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id, 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id,
); );
@ -157,7 +157,7 @@ class box_last_ticket extends ModeleBoxes
// Customer // Customer
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => '',
'text' => $link, 'text' => $link,
'asis' => 1, 'asis' => 1,
); );
@ -172,7 +172,7 @@ class box_last_ticket extends ModeleBoxes
// Statut // Statut
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="right"', 'td' => 'class="right nowraponall"',
'text' => $ticket->getLibStatut(3), 'text' => $ticket->getLibStatut(3),
); );
$r++; $r++;

View File

@ -78,11 +78,11 @@ class box_lastlogin extends ModeleBoxes
$line=0; $line=0;
$this->info_box_contents[$line][0] = array( $this->info_box_contents[$line][0] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $langs->trans("User"), 'text' => $langs->trans("User"),
); );
$this->info_box_contents[$line][1] = array( $this->info_box_contents[$line][1] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $user->getNomUrl(-1), 'text' => $user->getNomUrl(-1),
'asis' => 1 'asis' => 1
); );

View File

@ -124,13 +124,13 @@ class box_members extends ModeleBoxes
} }
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $memberstatic->getNomUrl(1), 'text' => $memberstatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $memberstatic->company, 'text' => $memberstatic->company,
'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid, 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid,
); );

View File

@ -116,7 +116,7 @@ class box_mos extends ModeleBoxes
$productstatic->ref = $objp->product_ref; $productstatic->ref = $objp->product_ref;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $mostatic->getNomUrl(1), 'text' => $mostatic->getNomUrl(1),
'asis' => 1, 'asis' => 1,
); );

View File

@ -123,7 +123,7 @@ class box_project extends ModeleBoxes
); );
$this->info_box_contents[$i][] = array( $this->info_box_contents[$i][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth200onsmartphone"',
'text' => $objp->title, 'text' => $objp->title,
); );

View File

@ -128,7 +128,7 @@ class box_propales extends ModeleBoxes
} }
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $propalstatic->getNomUrl(1), 'text' => $propalstatic->getNomUrl(1),
'text2'=> $late, 'text2'=> $late,
'asis' => 1, 'asis' => 1,

View File

@ -133,7 +133,7 @@ class box_services_expired extends ModeleBoxes
if (($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late=img_warning($langs->trans("Late")); if (($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late=img_warning($langs->trans("Late"));
$this->info_box_contents[$i][] = array( $this->info_box_contents[$i][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $contract->getNomUrl(1), 'text' => $contract->getNomUrl(1),
'asis' => 1 'asis' => 1
); );
@ -145,7 +145,7 @@ class box_services_expired extends ModeleBoxes
); );
$this->info_box_contents[$i][] = array( $this->info_box_contents[$i][] = array(
'td' => 'class="center"', 'td' => 'class="center nowraponall"',
'text' => dol_print_date($dateline, 'day'), 'text' => dol_print_date($dateline, 'day'),
'text2'=> $late, 'text2'=> $late,
); );

View File

@ -124,19 +124,19 @@ class box_supplier_orders extends ModeleBoxes
$thirdpartytmp->logo = $objp->logo; $thirdpartytmp->logo = $objp->logo;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $supplierorderstatic->getNomUrl(1), 'text' => $supplierorderstatic->getNomUrl(1),
'asis' => 1 'asis' => 1
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, 'supplier'), 'text' => $thirdpartytmp->getNomUrl(1, 'supplier'),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="right nowrap"', 'td' => 'class="right nowraponall"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
); );

View File

@ -130,19 +130,19 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$thirdpartytmp->logo = $objp->logo; $thirdpartytmp->logo = $objp->logo;
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="nowraponall"',
'text' => $supplierorderstatic->getNomUrl(1), 'text' => $supplierorderstatic->getNomUrl(1),
'asis' => 1 'asis' => 1
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => '', 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, 'supplier'), 'text' => $thirdpartytmp->getNomUrl(1, 'supplier'),
'asis' => 1, 'asis' => 1,
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="right nowrap"', 'td' => 'class="right nowraponall"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
); );

View File

@ -667,21 +667,27 @@ class FormFile
{ {
$submodulepart = $modulepart; $submodulepart = $modulepart;
// For normalized standard modules // modulepart = 'nameofmodule' or 'nameofmodule:nameofsubmodule'
$file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php', 0); $tmp=explode(':', $modulepart);
if (! empty($tmp[1])) {
$modulepart=$tmp[0];
$submodulepart=$tmp[1];
}
// For normalized standard modules
$file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
if (file_exists($file)) if (file_exists($file))
{ {
$res=include_once $file; $res=include_once $file;
} }
// For normalized external modules. modulepart = 'nameofmodule' or 'nameofmodule:nameofsubmodule' // For normalized external modules.
else else
{ {
$tmp=explode(':', $modulepart); $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
if (! empty($tmp[2])) $submodulepart=$tmp[2];
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
$res=include_once $file; $res=include_once $file;
} }
$class='ModelePDF'.ucfirst($submodulepart); $class='ModelePDF'.ucfirst($submodulepart);
if (class_exists($class)) if (class_exists($class))
{ {
$modellist=call_user_func($class.'::liste_modeles', $this->db); $modellist=call_user_func($class.'::liste_modeles', $this->db);
@ -1465,7 +1471,7 @@ class FormFile
* @param string $param Parameters on sort links * @param string $param Parameters on sort links
* @param int $forcedownload Force to open dialog box "Save As" when clicking on file * @param int $forcedownload Force to open dialog box "Save As" when clicking on file
* @param string $relativepath Relative path of docs (autodefined if not provided) * @param string $relativepath Relative path of docs (autodefined if not provided)
* @param int $permtodelete Permission to delete * @param int $permissiontodelete Permission to delete
* @param int $useinecm Change output for use in ecm module * @param int $useinecm Change output for use in ecm module
* @param int $textifempty Text to show if filearray is empty * @param int $textifempty Text to show if filearray is empty
* @param int $maxlength Maximum length of file name shown * @param int $maxlength Maximum length of file name shown
@ -1474,7 +1480,7 @@ class FormFile
* @return int <0 if KO, nb of files shown if OK * @return int <0 if KO, nb of files shown if OK
* @see list_of_documents() * @see list_of_documents()
*/ */
public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permtodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0) public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permissiontodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0)
{ {
// phpcs:enable // phpcs:enable
global $user, $conf, $langs, $form; global $user, $conf, $langs, $form;
@ -1697,7 +1703,7 @@ class FormFile
//if ($forcedownload) print '&attachment=1'; //if ($forcedownload) print '&attachment=1';
//print '&file='.urlencode($relativefile).'">'; //print '&file='.urlencode($relativefile).'">';
//print img_view().'</a> &nbsp; '; //print img_view().'</a> &nbsp; ';
//if ($permtodelete) print '<a href="'.$url.'?id='.$object->id.'&section='.$_REQUEST["section"].'&action=delete&urlfile='.urlencode($file['name']).'">'.img_delete().'</a>'; //if ($permissiontodelete) print '<a href="'.$url.'?id='.$object->id.'&section='.$_REQUEST["section"].'&action=delete&urlfile='.urlencode($file['name']).'">'.img_delete().'</a>';
//else print '&nbsp;'; //else print '&nbsp;';
print "</td></tr>\n"; print "</td></tr>\n";
} }
@ -1752,13 +1758,13 @@ class FormFile
* Show array with linked files * Show array with linked files
* *
* @param Object $object Object * @param Object $object Object
* @param int $permtodelete Deletion is allowed * @param int $permissiontodelete Deletion is allowed
* @param string $action Action * @param string $action Action
* @param string $selected ??? * @param string $selected ???
* @param string $param More param to add into URL * @param string $param More param to add into URL
* @return int Number of links * @return int Number of links
*/ */
public function listOfLinks($object, $permtodelete = 1, $action = null, $selected = null, $param = '') public function listOfLinks($object, $permissiontodelete = 1, $action = null, $selected = null, $param = '')
{ {
global $user, $conf, $langs, $user; global $user, $conf, $langs, $user;
global $sortfield, $sortorder; global $sortfield, $sortorder;
@ -1872,7 +1878,7 @@ class FormFile
print '<td class="center"></td>'; print '<td class="center"></td>';
print '<td class="right">'; print '<td class="right">';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink reposition" >' . img_edit() . '</a>'; // id= is included into $param print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink reposition" >' . img_edit() . '</a>'; // id= is included into $param
if ($permtodelete) { if ($permissiontodelete) {
print ' &nbsp; <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param print ' &nbsp; <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param
} else { } else {
print '&nbsp;'; print '&nbsp;';

View File

@ -343,7 +343,7 @@ class Interfaces
} }
// We set info of modules // We set info of modules
$triggers[$j]['picto'] = $objMod->picto?img_object('', $objMod->picto):img_object('', 'generic'); $triggers[$j]['picto'] = $objMod->picto?img_object('', $objMod->picto, 'class="valignmiddle pictomodule "'):img_object('', 'generic', 'class="valignmiddle pictomodule "');
$triggers[$j]['file'] = $files[$key]; $triggers[$j]['file'] = $files[$key];
$triggers[$j]['fullpath'] = $fullpath[$key]; $triggers[$j]['fullpath'] = $fullpath[$key];
$triggers[$j]['relpath'] = $relpath[$key]; $triggers[$j]['relpath'] = $relpath[$key];

View File

@ -663,7 +663,7 @@ function security_prepare_head()
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php"; $head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights"); $head[$h][1] = $langs->trans("DefaultRights");
if ($nbPerms > 0) $head[$h][1].= ' <span class="badge">'.$nbPerms.'</span>'; if ($nbPerms > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbPerms.'</span>';
$head[$h][2] = 'default'; $head[$h][2] = 'default';
$h++; $h++;

View File

@ -473,7 +473,7 @@ function actions_prepare_head($object)
$listofresourcelinked = $resource->getElementResources($object->element, $object->id); $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
$nbResources=(is_array($listofresourcelinked)?count($listofresourcelinked):0); $nbResources=(is_array($listofresourcelinked)?count($listofresourcelinked):0);
$head[$h][1] = $langs->trans("Resources"); $head[$h][1] = $langs->trans("Resources");
if ($nbResources > 0) $head[$h][1].= ' <span class="badge">'.($nbResources).'</span>'; if ($nbResources > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbResources).'</span>';
$head[$h][2] = 'resources'; $head[$h][2] = 'resources';
$h++; $h++;
} }

View File

@ -102,7 +102,7 @@ function asset_prepare_head(Asset $object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
@ -111,7 +111,7 @@ function asset_prepare_head(Asset $object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;

View File

@ -84,7 +84,7 @@ function bank_prepare_head(Account $object)
$head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$object->id; $head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$object->id;
$head[$h][1] = $langs->trans("AccountStatements"); $head[$h][1] = $langs->trans("AccountStatements");
if (($nbReceipts) > 0) $head[$h][1].= ' <span class="badge">'.($nbReceipts).'</span>'; if (($nbReceipts) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbReceipts).'</span>';
$head[$h][2] = 'statement'; $head[$h][2] = 'statement';
$h++; $h++;
} }
@ -97,7 +97,7 @@ function bank_prepare_head(Account $object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT . "/compta/bank/document.php?account=" . $object->id; $head[$h][0] = DOL_URL_ROOT . "/compta/bank/document.php?account=" . $object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;
@ -186,7 +186,7 @@ function various_payment_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/various_payment/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/bank/various_payment/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -69,7 +69,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][1] = $langs->trans('ContactsAddresses');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -79,7 +79,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id;
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][1] = $langs->trans("ContactsAddresses"); $head[$h][1] = $langs->trans("ContactsAddresses");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -136,7 +136,7 @@ function societe_prepare_head(Societe $object)
else { else {
dol_print_error($db); dol_print_error($db);
} }
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'project'; $head[$h][2] = 'project';
$h++; $h++;
} }
@ -229,7 +229,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT .'/societe/paymentmodes.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT .'/societe/paymentmodes.php?socid='.$object->id;
$head[$h][1] = $title; $head[$h][1] = $title;
if ($foundonexternalonlinesystem) $head[$h][1].= ' <span class="badge">...</span>'; if ($foundonexternalonlinesystem) $head[$h][1].= ' <span class="badge">...</span>';
elseif ($nbBankAccount > 0) $head[$h][1].= ' <span class="badge">'.$nbBankAccount.'</span>'; elseif ($nbBankAccount > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbBankAccount.'</span>';
$head[$h][2] = 'rib'; $head[$h][2] = 'rib';
$h++; $h++;
} }
@ -257,7 +257,7 @@ function societe_prepare_head(Societe $object)
else { else {
dol_print_error($db); dol_print_error($db);
} }
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'website'; $head[$h][2] = 'website';
$h++; $h++;
} }
@ -295,7 +295,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Notifications"); $head[$h][1] = $langs->trans("Notifications");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'notify'; $head[$h][2] = 'notify';
$h++; $h++;
} }
@ -306,7 +306,7 @@ function societe_prepare_head(Societe $object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
@ -319,7 +319,7 @@ function societe_prepare_head(Societe $object)
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;
} }

View File

@ -78,7 +78,7 @@ function contact_prepare_head(Contact $object)
$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
$head[$tab][0] = DOL_URL_ROOT.'/contact/note.php?id='.$object->id; $head[$tab][0] = DOL_URL_ROOT.'/contact/note.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Note"); $head[$tab][1] = $langs->trans("Note");
if($nbNote > 0) $head[$tab][1].= ' <span class="badge">'.$nbNote.'</span>'; if($nbNote > 0) $head[$tab][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$tab][2] = 'note'; $head[$tab][2] = 'note';
$tab++; $tab++;
} }
@ -90,7 +90,7 @@ function contact_prepare_head(Contact $object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/contact/document.php?id='.$object->id; $head[$tab][0] = DOL_URL_ROOT.'/contact/document.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Documents"); $head[$tab][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$tab][2] = 'documents'; $head[$tab][2] = 'documents';
$tab++; $tab++;

View File

@ -45,7 +45,7 @@ function contract_prepare_head(Contrat $object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans("ContactsAddresses"); $head[$h][1] = $langs->trans("ContactsAddresses");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -63,7 +63,7 @@ function contract_prepare_head(Contrat $object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -75,7 +75,7 @@ function contract_prepare_head(Contrat $object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -85,7 +85,7 @@ function donation_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
@ -94,7 +94,7 @@ function donation_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;

View File

@ -43,7 +43,7 @@ function emailing_prepare_head(Mailing $object)
{ {
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id;
$head[$h][1] = $langs->trans("MailRecipients"); $head[$h][1] = $langs->trans("MailRecipients");
if ($object->nbemail > 0) $head[$h][1].= ' <span class="badge">'.$object->nbemail.'</span>'; if ($object->nbemail > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$object->nbemail.'</span>';
$head[$h][2] = 'targets'; $head[$h][2] = 'targets';
$h++; $h++;
} }

View File

@ -52,7 +52,7 @@ function expensereport_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/expensereport/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/expensereport/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
@ -63,7 +63,7 @@ function expensereport_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }

View File

@ -51,7 +51,7 @@ function fichinter_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('InterventionContact'); $head[$h][1] = $langs->trans('InterventionContact');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -83,7 +83,7 @@ function fichinter_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=fichinter&element_id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=fichinter&element_id='.$object->id;
$head[$h][1] = $langs->trans("Resources"); $head[$h][1] = $langs->trans("Resources");
if ($nbResource > 0) $head[$h][1].= ' <span class="badge">'.$nbResource.'</span>'; if ($nbResource > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbResource.'</span>';
$head[$h][2] = 'resource'; $head[$h][2] = 'resource';
$h++; $h++;
} }
@ -95,7 +95,7 @@ function fichinter_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -107,7 +107,7 @@ function fichinter_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -3072,13 +3072,14 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre
{ {
$filename = $path.$file['name']; $filename = $path.$file['name'];
$file_list['insignature'][] = $filename; $file_list['insignature'][] = $filename;
$expectedsize = (empty($file['size']) ? '' : $file['size']);
$expectedmd5 = (string) $file; $expectedmd5 = (string) $file;
//if (preg_match('#'.$exclude.'#', $filename)) continue; //if (preg_match('#'.$exclude.'#', $filename)) continue;
if (!file_exists($pathref.'/'.$filename)) if (!file_exists($pathref.'/'.$filename))
{ {
$file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5); $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize);
} }
else else
{ {
@ -3090,7 +3091,7 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre
} }
else else
{ {
if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'md5'=>(string) $md5_local); if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize, 'md5'=>(string) $md5_local);
$checksumconcat[] = $md5_local; $checksumconcat[] = $md5_local;
} }
} }

View File

@ -48,7 +48,7 @@ function facturefourn_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/contact.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/contact.php?facid='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][1] = $langs->trans('ContactsAddresses');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -66,7 +66,7 @@ function facturefourn_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -78,7 +78,7 @@ function facturefourn_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
@ -116,7 +116,7 @@ function ordersupplier_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/contact.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][1] = $langs->trans('ContactsAddresses');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -143,7 +143,7 @@ function ordersupplier_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -155,7 +155,7 @@ function ordersupplier_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -47,7 +47,7 @@ function holiday_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -50,7 +50,7 @@ function facture_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][1] = $langs->trans('ContactsAddresses');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -71,7 +71,7 @@ function facture_prepare_head($object)
else dol_print_error($db); else dol_print_error($db);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id;
$head[$h][1] = $langs->trans('StandingOrders'); $head[$h][1] = $langs->trans('StandingOrders');
if ($nbStandingOrders > 0) $head[$h][1].= ' <span class="badge">'.$nbStandingOrders.'</span>'; if ($nbStandingOrders > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbStandingOrders.'</span>';
$head[$h][2] = 'standingorders'; $head[$h][2] = 'standingorders';
$h++; $h++;
} }
@ -89,7 +89,7 @@ function facture_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -101,7 +101,7 @@ function facture_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -59,7 +59,7 @@ function loan_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id; $head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Documents"); $head[$tab][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$tab][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$tab][2] = 'documents'; $head[$tab][2] = 'documents';
$tab++; $tab++;
@ -68,7 +68,7 @@ function loan_prepare_head($object)
$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
$head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id; $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
$head[$tab][1] = $langs->trans("Notes"); $head[$tab][1] = $langs->trans("Notes");
if($nbNote > 0) $head[$tab][1].= ' <span class="badge">'.$nbNote.'</span>'; if($nbNote > 0) $head[$tab][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$tab][2] = 'note'; $head[$tab][2] = 'note';
$tab++; $tab++;
} }

View File

@ -59,7 +59,7 @@ function member_prepare_head(Adherent $object)
$head[$h][0] = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$object->id;
$head[$h][1] = $langs->trans("Subscriptions"); $head[$h][1] = $langs->trans("Subscriptions");
$head[$h][2] = 'subscription'; $head[$h][2] = 'subscription';
if ($nbSubscription > 0) $head[$h][1].= ' <span class="badge">'.$nbSubscription.'</span>'; if ($nbSubscription > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbSubscription.'</span>';
$h++; $h++;
} }
@ -76,7 +76,7 @@ function member_prepare_head(Adherent $object)
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note"); $head[$h][1] = $langs->trans("Note");
$head[$h][2] = 'note'; $head[$h][2] = 'note';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$h++; $h++;
// Attachments // Attachments
@ -87,7 +87,7 @@ function member_prepare_head(Adherent $object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;

View File

@ -53,7 +53,7 @@ function commande_prepare_head(Commande $object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][1] = $langs->trans('ContactsAddresses');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -67,7 +67,7 @@ function commande_prepare_head(Commande $object)
if ($conf->expedition_bon->enabled) $text.=$langs->trans("Shipments"); if ($conf->expedition_bon->enabled) $text.=$langs->trans("Shipments");
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text.='/'; if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text.='/';
if ($conf->livraison_bon->enabled) $text.=$langs->trans("Receivings"); if ($conf->livraison_bon->enabled) $text.=$langs->trans("Receivings");
if ($nbShipments > 0 || $nbReceiption > 0) $text.= ' <span class="badge">'.($nbShipments?$nbShipments:0); if ($nbShipments > 0 || $nbReceiption > 0) $text.= '<span class="badge marginleftonlyshort">'.($nbShipments?$nbShipments:0);
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.='/'; if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.='/';
if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.= ($nbReceiption?$nbReceiption:0); if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.= ($nbReceiption?$nbReceiption:0);
if ($nbShipments > 0 || $nbReceiption > 0) $text.= '</span>'; if ($nbShipments > 0 || $nbReceiption > 0) $text.= '</span>';
@ -89,7 +89,7 @@ function commande_prepare_head(Commande $object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -101,7 +101,7 @@ function commande_prepare_head(Commande $object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -82,7 +82,7 @@ function product_prepare_head($object)
$head[$h][1] = $langs->trans('AssociatedProducts'); $head[$h][1] = $langs->trans('AssociatedProducts');
$nbFatherAndChild = $object->hasFatherOrChild(); $nbFatherAndChild = $object->hasFatherOrChild();
if ($nbFatherAndChild > 0) $head[$h][1].= ' <span class="badge">'.$nbFatherAndChild.'</span>'; if ($nbFatherAndChild > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbFatherAndChild.'</span>';
$head[$h][2] = 'subproduct'; $head[$h][2] = 'subproduct';
$h++; $h++;
} }
@ -110,7 +110,7 @@ function product_prepare_head($object)
$head[$h][1] = $langs->trans('ProductCombinations'); $head[$h][1] = $langs->trans('ProductCombinations');
$head[$h][2] = 'combinations'; $head[$h][2] = 'combinations';
$nbVariant = $prodcomb->countNbOfCombinationForFkProductParent($object->id); $nbVariant = $prodcomb->countNbOfCombinationForFkProductParent($object->id);
if ($nbVariant > 0) $head[$h][1].= ' <span class="badge">'.$nbVariant.'</span>'; if ($nbVariant > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbVariant.'</span>';
} }
$h++; $h++;
@ -160,7 +160,7 @@ function product_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/product/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/product/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -179,7 +179,7 @@ function product_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
@ -228,7 +228,7 @@ function productlot_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT."/product/stock/productlot_document.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/product/stock/productlot_document.php?id=".$object->id;
$head[$h][1] = $langs->trans("Documents"); $head[$h][1] = $langs->trans("Documents");
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;

View File

@ -48,7 +48,7 @@ function project_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans("ProjectContact"); $head[$h][1] = $langs->trans("ProjectContact");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
@ -61,7 +61,7 @@ function project_prepare_head($object)
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
$taskstatic=new Task($db); $taskstatic=new Task($db);
$nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0)); $nbTasks=count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0));
if ($nbTasks > 0) $head[$h][1].= ' <span class="badge">'.($nbTasks).'</span>'; if ($nbTasks > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbTasks).'</span>';
$head[$h][2] = 'tasks'; $head[$h][2] = 'tasks';
$h++; $h++;
@ -82,7 +82,7 @@ function project_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id;
$head[$h][1] = $langs->trans("TimeSpent"); $head[$h][1] = $langs->trans("TimeSpent");
if ($nbTimeSpent > 0) $head[$h][1].= ' <span class="badge">...</span>'; if ($nbTimeSpent > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">...</span>';
$head[$h][2] = 'timespent'; $head[$h][2] = 'timespent';
$h++; $h++;
} }
@ -123,7 +123,7 @@ function project_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;
@ -133,7 +133,7 @@ function project_prepare_head($object)
$nbComments = $object->getNbComments(); $nbComments = $object->getNbComments();
$head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$object->id;
$head[$h][1] = $langs->trans("CommentLink"); $head[$h][1] = $langs->trans("CommentLink");
if ($nbComments > 0) $head[$h][1].= ' <span class="badge">'.$nbComments.'</span>'; if ($nbComments > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbComments.'</span>';
$head[$h][2] = 'project_comment'; $head[$h][2] = 'project_comment';
$h++; $h++;
} }
@ -174,7 +174,7 @@ function task_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans("TaskRessourceLinks"); $head[$h][1] = $langs->trans("TaskRessourceLinks");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'task_contact'; $head[$h][2] = 'task_contact';
$h++; $h++;
@ -195,7 +195,7 @@ function task_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans("TimeSpent"); $head[$h][1] = $langs->trans("TimeSpent");
if ($nbTimeSpent > 0) $head[$h][1].= ' <span class="badge">...</span>'; if ($nbTimeSpent > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">...</span>';
$head[$h][2] = 'task_time'; $head[$h][2] = 'task_time';
$h++; $h++;
@ -212,7 +212,7 @@ function task_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'task_notes'; $head[$h][2] = 'task_notes';
$h++; $h++;
} }
@ -224,7 +224,7 @@ function task_prepare_head($object)
$nbFiles = count(dol_dir_list($filesdir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbFiles = count(dol_dir_list($filesdir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'task_document'; $head[$h][2] = 'task_document';
$h++; $h++;
@ -234,7 +234,7 @@ function task_prepare_head($object)
$nbComments = $object->getNbComments(); $nbComments = $object->getNbComments();
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$head[$h][1] = $langs->trans("CommentLink"); $head[$h][1] = $langs->trans("CommentLink");
if ($nbComments > 0) $head[$h][1].= ' <span class="badge">'.$nbComments.'</span>'; if ($nbComments > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbComments.'</span>';
$head[$h][2] = 'task_comment'; $head[$h][2] = 'task_comment';
$h++; $h++;
} }
@ -1857,7 +1857,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
$i = 0; $i = 0;
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($title.' <span class="badge">'.$num.'</span>', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); print_liste_field_titre($title.'<span class="badge marginleftonlyshort">'.$num.'</span>', $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{ {

View File

@ -60,7 +60,7 @@ function propal_prepare_head($object)
$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id;
$head[$h][1] = $langs->trans('ContactsAddresses'); $head[$h][1] = $langs->trans('ContactsAddresses');
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -78,7 +78,7 @@ function propal_prepare_head($object)
if(!empty($object->note_public)) $nbNote++; if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes'); $head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;
} }
@ -90,7 +90,7 @@ function propal_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id); $nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>'; if (($nbFiles+$nbLinks) > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.($nbFiles+$nbLinks).'</span>';
$head[$h][2] = 'document'; $head[$h][2] = 'document';
$h++; $h++;

View File

@ -60,7 +60,7 @@ function reception_prepare_head(Reception $object)
$nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external')); $nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external'));
$head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id;
$head[$h][1] = $langs->trans("ContactsAddresses"); $head[$h][1] = $langs->trans("ContactsAddresses");
if ($nbContact > 0) $head[$h][1].= ' <span class="badge">'.$nbContact.'</span>'; if ($nbContact > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
$head[$h][2] = 'contact'; $head[$h][2] = 'contact';
$h++; $h++;
} }
@ -70,7 +70,7 @@ function reception_prepare_head(Reception $object)
if (!empty($object->note_public)) $nbNote++; if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id;
$head[$h][1] = $langs->trans("Notes"); $head[$h][1] = $langs->trans("Notes");
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>'; if ($nbNote > 0) $head[$h][1].= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
$head[$h][2] = 'note'; $head[$h][2] = 'note';
$h++; $h++;

View File

@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
/** /**
* Class to build documents using ODF templates generator * Class to build documents using ODF templates generator
*/ */
class doc_generic_bom_odt extends ModelePDFBoms class doc_generic_bom_odt extends ModelePDFBom
{ {
/** /**
* Issuer * Issuer

View File

@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
/** /**
* Parent class for boms models * Parent class for boms models
*/ */
abstract class ModelePDFBoms extends CommonDocGenerator abstract class ModelePDFBom extends CommonDocGenerator
{ {
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

View File

@ -62,7 +62,7 @@ class modMrp extends DolibarrModules
// Used only if file README.md and README-LL.md not found. // Used only if file README.md and README-LL.md not found.
$this->descriptionlong = "Module to Manage Manufacturing Orders (MO)"; $this->descriptionlong = "Module to Manage Manufacturing Orders (MO)";
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = 'dolibarr'; $this->version = 'experimental';
// Url to the file with your last numberversion of this module // Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt'; //$this->url_last_version = 'http://www.example.com/versionmodule.txt';

View File

@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
/** /**
* Class to build documents using ODF templates generator * Class to build documents using ODF templates generator
*/ */
class doc_generic_mo_odt extends ModelePDFMos class doc_generic_mo_odt extends ModelePDFMo
{ {
/** /**
* Issuer * Issuer

View File

@ -23,10 +23,10 @@
*/ */
/** /**
* \file htdocs/core/modules/mrp/modules_mrp.php * \file htdocs/core/modules/mrp/modules_mo.php
* \ingroup bom * \ingroup mrp
* \brief File that contains parent class for mos models * \brief File that contains parent class for MOs models
* and parent class for mos numbering models * and parent class for MOs numbering models
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
/** /**
* Parent class for mos models * Parent class for mos models
*/ */
abstract class ModelePDFMos extends CommonDocGenerator abstract class ModelePDFMo extends CommonDocGenerator
{ {
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

View File

@ -178,12 +178,12 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='CronJob'; $objectclass='CronJob';
$objectlabel='CronJob'; $objectlabel='CronJob';
$permtoread = $user->rights->cron->read; $permissiontoread = $user->rights->cron->read;
$permtocreate = $user->rights->cron->create?$user->rights->cron->create:$user->rights->cron->write; $permissiontoadd = $user->rights->cron->create?$user->rights->cron->create:$user->rights->cron->write;
$permtodelete = $user->rights->cron->delete; $permissiontodelete = $user->rights->cron->delete;
$uploaddir = $conf->cron->dir_output; $uploaddir = $conf->cron->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
if ($permtocreate) if ($permissiontoadd)
{ {
$tmpcron = new Cronjob($db); $tmpcron = new Cronjob($db);
foreach($toselect as $id) foreach($toselect as $id)

View File

@ -165,9 +165,9 @@ if (empty($reshook))
{ {
$objectclass = 'Expedition'; $objectclass = 'Expedition';
$objectlabel = 'Sendings'; $objectlabel = 'Sendings';
$permtoread = $user->rights->expedition->lire; $permissiontoread = $user->rights->expedition->lire;
$permtocreate = $user->rights->expedition->creer; $permissiontoadd = $user->rights->expedition->creer;
$permtodelete = $user->rights->expedition->supprimer; $permissiontodelete = $user->rights->expedition->supprimer;
$uploaddir = $conf->expedition->dir_output . '/sending'; $uploaddir = $conf->expedition->dir_output . '/sending';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -195,8 +195,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='ExpenseReport'; $objectclass='ExpenseReport';
$objectlabel='ExpenseReport'; $objectlabel='ExpenseReport';
$permtoread = $user->rights->expensereport->lire; $permissiontoread = $user->rights->expensereport->lire;
$permtodelete = $user->rights->expensereport->supprimer; $permissiontodelete = $user->rights->expensereport->supprimer;
$uploaddir = $conf->expensereport->dir_output; $uploaddir = $conf->expensereport->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

View File

@ -160,8 +160,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Fichinter'; $objectclass='Fichinter';
$objectlabel='Interventions'; $objectlabel='Interventions';
$permtoread = $user->rights->ficheinter->lire; $permissiontoread = $user->rights->ficheinter->lire;
$permtodelete = $user->rights->ficheinter->supprimer; $permissiontodelete = $user->rights->ficheinter->supprimer;
$uploaddir = $conf->ficheinter->dir_output; $uploaddir = $conf->ficheinter->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -223,8 +223,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='CommandeFournisseur'; $objectclass='CommandeFournisseur';
$objectlabel='SupplierOrders'; $objectlabel='SupplierOrders';
$permtoread = $user->rights->fournisseur->commande->lire; $permissiontoread = $user->rights->fournisseur->commande->lire;
$permtodelete = $user->rights->fournisseur->commande->supprimer; $permissiontodelete = $user->rights->fournisseur->commande->supprimer;
$uploaddir = $conf->fournisseur->commande->dir_output; $uploaddir = $conf->fournisseur->commande->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

View File

@ -241,9 +241,9 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='FactureFournisseur'; $objectclass='FactureFournisseur';
$objectlabel='SupplierInvoices'; $objectlabel='SupplierInvoices';
$permtoread = $user->rights->fournisseur->facture->lire; $permissiontoread = $user->rights->fournisseur->facture->lire;
$permtocreate = $user->rights->fournisseur->facture->creer; $permissiontoadd = $user->rights->fournisseur->facture->creer;
$permtodelete = $user->rights->fournisseur->facture->supprimer; $permissiontodelete = $user->rights->fournisseur->facture->supprimer;
$uploaddir = $conf->fournisseur->facture->dir_output; $uploaddir = $conf->fournisseur->facture->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -95,8 +95,8 @@ if (empty($reshook))
/* /*
$objectclass='Skeleton'; $objectclass='Skeleton';
$objectlabel='Skeleton'; $objectlabel='Skeleton';
$permtoread = $user->rights->skeleton->read; $permissiontoread = $user->rights->skeleton->read;
$permtodelete = $user->rights->skeleton->delete; $permissiontodelete = $user->rights->skeleton->delete;
$uploaddir = $conf->skeleton->dir_output; $uploaddir = $conf->skeleton->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/ */

View File

@ -196,8 +196,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Holiday'; $objectclass='Holiday';
$objectlabel='Holiday'; $objectlabel='Holiday';
$permtoread = $user->rights->holiday->read; $permissiontoread = $user->rights->holiday->read;
$permtodelete = $user->rights->holiday->delete; $permissiontodelete = $user->rights->holiday->delete;
$uploaddir = $conf->holiday->dir_output; $uploaddir = $conf->holiday->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -110,8 +110,8 @@ if (empty($reshook))
// Mass actions // Mass actions
/*$objectclass='MyObject'; /*$objectclass='MyObject';
$objectlabel='MyObject'; $objectlabel='MyObject';
$permtoread = $user->rights->mymodule->read; $permissiontoread = $user->rights->mymodule->read;
$permtodelete = $user->rights->mymodule->delete; $permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output; $uploaddir = $conf->mymodule->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/ */

View File

@ -1796,6 +1796,8 @@ FixTZ=TimeZone fix
FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced) FillFixTZOnlyIfRequired=Example: +2 (fill only if problem experienced)
ExpectedChecksum=Expected Checksum ExpectedChecksum=Expected Checksum
CurrentChecksum=Current Checksum CurrentChecksum=Current Checksum
ExpectedSize=Expected size
CurrentSize=Current size
ForcedConstants=Required constant values ForcedConstants=Required constant values
MailToSendProposal=Customer proposals MailToSendProposal=Customer proposals
MailToSendOrder=Sales orders MailToSendOrder=Sales orders

View File

@ -12,7 +12,7 @@ BOMsSetup=Setup of module BOM
ListOfBOMs=List of bills of material - BOM ListOfBOMs=List of bills of material - BOM
ListOfManufacturingOrders=List of Manufacturing Orders ListOfManufacturingOrders=List of Manufacturing Orders
NewBOM=New bill of material NewBOM=New bill of material
ProductBOMHelp=Product to create with this BOM ProductBOMHelp=Product to create with this BOM.<br>Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
BOMsNumberingModules=BOM numbering templates BOMsNumberingModules=BOM numbering templates
BOMsModelModule=BOM document templates BOMsModelModule=BOM document templates
MOsNumberingModules=MO numbering templates MOsNumberingModules=MO numbering templates

View File

@ -120,8 +120,8 @@ if (empty($reshook))
if ((string) $type == '1') { $objectlabel='Services'; } if ((string) $type == '1') { $objectlabel='Services'; }
if ((string) $type == '0') { $objectlabel='Products'; } if ((string) $type == '0') { $objectlabel='Products'; }
$permtoread = $user->rights->produit->lire; $permissiontoread = $user->rights->produit->lire;
$permtodelete = $user->rights->produit->supprimer; $permissiontodelete = $user->rights->produit->supprimer;
$uploaddir = $conf->product->dir_output; $uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
*/ */

View File

@ -102,14 +102,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
// Security check - Protection if external user // Security check - Protection if external user
//if ($user->socid > 0) access_forbidden(); //if ($user->socid > 0) access_forbidden();
//if ($user->socid > 0) $socid = $user->socid; //if ($user->socid > 0) $socid = $user->socid;
//$isdraft = (($object->statut == MyObject::STATUS_DRAFT) ? 1 : 0); //$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); //$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
$permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php $permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php $permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php
$permissionedit = $user->rights->mymodule->myobject->write; // Used by the include of actions_lineupdown.inc.php $permissionedit = $user->rights->mymodule->myobject->write; // Used by the include of actions_lineupdown.inc.php
$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php
$permissiontodelete = $user->rights->mymodule->myobject->delete || ($permissiontoadd && $object->status == 0); $permissiontodelete = $user->rights->mymodule->myobject->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
@ -404,7 +404,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline') if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{ {
print '<table id="tablelines" class="noborder noshadow" width="100%">'; print '<table id="tablelines" class="noborder noshadow" width="100%">';
} }
@ -427,7 +427,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
} }
if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline') if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{ {
print '</table>'; print '</table>';
} }
@ -457,9 +457,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Modify // Modify
if (! empty($user->rights->mymodule->myobject->write)) if ($permissiontoadd)
{ {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
} }
else else
{ {
@ -467,13 +467,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Clone // Clone
if (! empty($user->rights->mymodule->myobject->write)) if ($permissiontoadd)
{ {
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->socid . '&amp;action=clone&amp;object=order">' . $langs->trans("ToClone") . '</a>'."\n"; print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&object=myobject">' . $langs->trans("ToClone") . '</a>'."\n";
} }
/* /*
if ($user->rights->mymodule->myobject->write) if ($permissiontoadd)
{ {
if ($object->status == 1) if ($object->status == 1)
{ {
@ -487,7 +487,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/ */
// Delete (need delete permission, or if draft, just need create/modify permission) // Delete (need delete permission, or if draft, just need create/modify permission)
if (! empty($user->rights->mymodule->myobject->delete) || (! empty($object->fields['status']) && $object->status == $object::STATUS_DRAFT && ! empty($user->rights->mymodule->myobject->write))) if ($permissiontodelete)
{ {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n"; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n";
} }

View File

@ -153,9 +153,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
$object->fields = dol_sort_array($object->fields, 'position'); $object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position');
$permtoread = $user->rights->mymodule->myobject->read; $permissiontoread = $user->rights->mymodule->myobject->read;
$permtowrite = $user->rights->mymodule->myobject->write; $permissiontoadd = $user->rights->mymodule->myobject->write;
$permtodelete = $user->rights->mymodule->myobject->delete; $permissiontodelete = $user->rights->mymodule->myobject->delete;
/* /*
@ -347,7 +347,7 @@ $arrayofmassactions = array(
//'builddoc'=>$langs->trans("PDFMerge"), //'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"), //'presend'=>$langs->trans("SendByMail"),
); );
if ($permtodelete) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete"); if ($permissiontodelete) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('', $arrayofmassactions); $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
@ -361,7 +361,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/mymodule/myobject_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permtowrite); $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/mymodule/myobject_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit);
@ -594,8 +594,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
$urlsource.=str_replace('&amp;', '&', $param); $urlsource.=str_replace('&amp;', '&', $param);
$filedir=$diroutputmassaction; $filedir=$diroutputmassaction;
$genallowed=$permtoread; $genallowed=$permissiontoread;
$delallowed=$permtowrite; $delallowed=$permissiontoadd;
print $formfile->showdocuments('massfilesarea_mymodule', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); print $formfile->showdocuments('massfilesarea_mymodule', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
} }

View File

@ -90,14 +90,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
// Security check - Protection if external user // Security check - Protection if external user
//if ($user->socid > 0) access_forbidden(); //if ($user->socid > 0) access_forbidden();
//if ($user->socid > 0) $socid = $user->socid; //if ($user->socid > 0) $socid = $user->socid;
//$isdraft = (($object->statut == Mo::STATUS_DRAFT) ? 1 : 0); //$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
//$result = restrictedArea($user, 'mrp', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); //$result = restrictedArea($user, 'mrp', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
$permissionnote=$user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php $permissionnote=$user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink=$user->rights->mrp->write; // Used by the include of actions_dellink.inc.php $permissiondellink=$user->rights->mrp->write; // Used by the include of actions_dellink.inc.php
$permissionedit=$user->rights->mrp->write; // Used by the include of actions_lineupdown.inc.php $permissionedit=$user->rights->mrp->write; // Used by the include of actions_lineupdown.inc.php
$permissiontoadd=$user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php $permissiontoadd=$user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php
$permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && $object->status == 0); $permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
/* /*
@ -132,6 +132,12 @@ if (empty($reshook))
// Actions when printing a doc from card // Actions when printing a doc from card
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
// Actions to send emails
$trigger_name='MO_SENTBYMAIL';
$autocopy='MAIN_MAIL_AUTOCOPY_MO_TO';
$trackid='mo'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
// Action to move up and down lines of object // Action to move up and down lines of object
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
@ -143,12 +149,6 @@ if (empty($reshook))
{ {
$object->setProject(GETPOST('projectid', 'int')); $object->setProject(GETPOST('projectid', 'int'));
} }
// Actions to send emails
$trigger_name='MO_SENTBYMAIL';
$autocopy='MAIN_MAIL_AUTOCOPY_MO_TO';
$trackid='mo'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
} }
@ -159,6 +159,7 @@ if (empty($reshook))
*/ */
$form=new Form($db); $form=new Form($db);
$formfile=new FormFile($db);
$formproject=new FormProjets($db); $formproject=new FormProjets($db);
llxHeader('', $langs->trans('Mo'), ''); llxHeader('', $langs->trans('Mo'), '');
@ -299,6 +300,46 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{ {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
} }
// Confirmation of validation
if ($action == 'validate')
{
// We check that object has a temporary ref
$ref = substr($object->ref, 1, 4);
if ($ref == 'PROV') {
$object->fetch_product();
$numref = $object->getNextNumRef($object->thirdparty);
} else {
$numref = $object->ref;
}
$text = $langs->trans('ConfirmValidateMo', $numref);
/*if (! empty($conf->notification->enabled))
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
$text .= '<br>';
$text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object);
}*/
$formquestion=array();
if (! empty($conf->bom->enabled))
{
$langs->load("mrp");
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
$formproduct = new FormProduct($db);
$forcecombo=0;
if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
$formquestion = array(
// 'text' => $langs->trans("ConfirmClone"),
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
);
}
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
}
// Clone confirmation // Clone confirmation
if ($action == 'clone') { if ($action == 'clone') {
// Create an array for form // Create an array for form
@ -332,7 +373,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{ {
$langs->load("projects"); $langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' '; $morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->mrp->write) if ($permissiontoadd)
{ {
if ($action != 'classify') if ($action != 'classify')
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
@ -366,7 +407,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="fichehalfleft">'; print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'."\n"; print '<table class="border centpercent tableforfield">'."\n";
// Common attributes // Common attributes
$keyforbreak='fk_warehouse'; $keyforbreak='fk_warehouse';
@ -407,14 +448,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline') if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{ {
print '<table id="tablelines" class="noborder noshadow" width="100%">'; print '<table id="tablelines" class="noborder noshadow" width="100%">';
} }
if (! empty($object->lines)) if (! empty($object->lines))
{ {
$object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1); $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/mrp/tpl');
} }
// Form to add new line // Form to add new line
@ -423,14 +464,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action != 'editline') if ($action != 'editline')
{ {
// Add products/services form // Add products/services form
$object->formAddObjectLine(1, $mysoc, $soc); $object->formAddObjectLine(1, $mysoc, $soc, '/mrp/tpl');
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
} }
} }
if (! empty($object->lines) && $object->status == 0 && $permissiontoadd && $action != 'selectlines' && $action != 'editline') if (! empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline'))
{ {
print '</table>'; print '</table>';
} }
@ -451,10 +492,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook)) if (empty($reshook))
{ {
// Send // Send
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n"; //print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
if ($user->rights->bom->write && $object->status == MO::STATUS_VALIDATED)
{
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=setdraft">' . $langs->trans("SetToDraft") . '</a>';
}
// Modify // Modify
if (! empty($user->rights->mrp->write)) if ($permissiontoadd)
{ {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'."\n";
} }
@ -477,13 +523,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Clone // Clone
if (! empty($user->rights->mrp->write)) if ($permissiontoadd)
{ {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->fk_soc . '&amp;action=clone&amp;object=order">' . $langs->trans("ToClone") . '</a></div>'; print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->fk_soc . '&action=clone&object=mo">' . $langs->trans("ToClone") . '</a>';
} }
// Delete (need delete permission, or if draft, just need create/modify permission) // Delete (need delete permission, or if draft, just need create/modify permission)
if (! empty($user->rights->mrp->delete) || (! empty($object->fields['status']) && $object->status == $object::STATUS_DRAFT && ! empty($user->rights->mrp->write))) if ($permissiontodelete)
{ {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n"; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'."\n";
} }
@ -507,14 +553,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<a name="builddoc"></a>'; // ancre print '<a name="builddoc"></a>'; // ancre
// Documents // Documents
/*$objref = dol_sanitizeFileName($object->ref); $objref = dol_sanitizeFileName($object->ref);
$relativepath = $comref . '/' . $comref . '.pdf'; $relativepath = $objref . '/' . $objref . '.pdf';
$filedir = $conf->mrp->dir_output . '/' . $objref; $filedir = $conf->mrp->dir_output . '/' . $objref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content $genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content
$delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card $delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('mrp', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang);
*/
// Show links to link elements // Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('mo')); $linktoelem = $form->showLinkToObjectBlock($object, null, array('mo'));

View File

@ -177,8 +177,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Mo'; $objectclass='Mo';
$objectlabel='Mo'; $objectlabel='Mo';
$permtoread = $user->rights->mrp->read; $permissiontoread = $user->rights->mrp->read;
$permtodelete = $user->rights->mrp->delete; $permissiontodelete = $user->rights->mrp->delete;
$uploaddir = $conf->mrp->dir_output; $uploaddir = $conf->mrp->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -133,8 +133,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Opensurveysondage'; $objectclass='Opensurveysondage';
$objectlabel='Opensurveysondage'; $objectlabel='Opensurveysondage';
$permtoread = $user->rights->opensurvey->read; $permissiontoread = $user->rights->opensurvey->read;
$permtodelete = $user->rights->opensurvey->write; $permissiontodelete = $user->rights->opensurvey->write;
$uploaddir = $conf->opensurvey->dir_output; $uploaddir = $conf->opensurvey->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -153,8 +153,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Inventory'; $objectclass='Inventory';
$objectlabel='Inventory'; $objectlabel='Inventory';
$permtoread = $user->rights->stock->lire; $permissiontoread = $user->rights->stock->lire;
$permtodelete = $user->rights->stock->supprimer; $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output; $uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -253,8 +253,8 @@ if (empty($reshook))
if ((string) $search_type == '1') { $objectlabel='Services'; } if ((string) $search_type == '1') { $objectlabel='Services'; }
if ((string) $search_type == '0') { $objectlabel='Products'; } if ((string) $search_type == '0') { $objectlabel='Products'; }
$permtoread = $user->rights->produit->lire; $permissiontoread = $user->rights->produit->lire;
$permtodelete = $user->rights->produit->supprimer; $permissiontodelete = $user->rights->produit->supprimer;
$uploaddir = $conf->product->dir_output; $uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -144,8 +144,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Entrepot'; $objectclass='Entrepot';
$objectlabel='Warehouse'; $objectlabel='Warehouse';
$permtoread = $user->rights->stock->lire; $permissiontoread = $user->rights->stock->lire;
$permtodelete = $user->rights->stock->supprimer; $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output; $uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -421,8 +421,8 @@ if (empty($reshook) && $action != 'remove_file')
{ {
$objectclass='MouvementStock'; $objectclass='MouvementStock';
$objectlabel='Movements'; $objectlabel='Movements';
$permtoread = $user->rights->stock->lire; $permissiontoread = $user->rights->stock->lire;
$permtodelete = $user->rights->stock->supprimer; $permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output . "/movement/"; $uploaddir = $conf->stock->dir_output . "/movement/";
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -158,8 +158,8 @@ if (empty($reshook))
{ {
$objectclass='ProductLot'; $objectclass='ProductLot';
$objectlabel='LotSerial'; $objectlabel='LotSerial';
$permtoread = $user->rights->stock->read; $permissiontoread = $user->rights->stock->read;
$permtodelete = $user->rights->stock->delete; $permissiontodelete = $user->rights->stock->delete;
$uploaddir = $conf->stock->dir_output; $uploaddir = $conf->stock->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

View File

@ -202,8 +202,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Project'; $objectclass='Project';
$objectlabel='Project'; $objectlabel='Project';
$permtoread = $user->rights->projet->lire; $permissiontoread = $user->rights->projet->lire;
$permtodelete = $user->rights->projet->supprimer; $permissiontodelete = $user->rights->projet->supprimer;
$uploaddir = $conf->projet->dir_output; $uploaddir = $conf->projet->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

View File

@ -163,8 +163,8 @@ if (empty($reshook))
// Mass actions // Mass actions
$objectclass='Task'; $objectclass='Task';
$objectlabel='Tasks'; $objectlabel='Tasks';
$permtoread = $user->rights->projet->lire; $permissiontoread = $user->rights->projet->lire;
$permtodelete = $user->rights->projet->supprimer; $permissiontodelete = $user->rights->projet->supprimer;
$uploaddir = $conf->projet->dir_output.'/tasks'; $uploaddir = $conf->projet->dir_output.'/tasks';
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
} }

Some files were not shown because too many files have changed in this diff Show More