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") {
$md5=md5_file($file);
$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");
@ -207,7 +207,7 @@ foreach ($files as $filetmp) {
if (filetype($file)=="file") {
$md5=md5_file($file);
$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");

View File

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

View File

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

View File

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

View File

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

View File

@ -148,8 +148,8 @@ if (empty($reshook))
// Mass actions
$objectclass='EmailSenderProfile';
$objectlabel='EmailSenderProfile';
$permtoread = $user->admin;
$permtodelete = $user->admin;
$permissiontoread = $user->admin;
$permissiontodelete = $user->admin;
$uploaddir = $conf->admin->dir_output.'/senderprofiles';
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 $langs->trans("FileCheckDesc").'<br><br>';
print '<span class="opacitymedium">'.$langs->trans("FileCheckDesc").'</span><br><br>';
// Version
print '<div class="div-table-responsive-no-min">';
@ -239,6 +239,7 @@ if (! $error && $xml)
$out.='<tr class="liste_titre">';
$out.='<td>#</td>';
$out.='<td>' . $langs->trans("Filename") . '</td>';
$out.='<td class="right">' . $langs->trans("ExpectedSize") . '</td>';
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>';
$out.='</tr>'."\n";
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
@ -251,6 +252,9 @@ if (! $error && $xml)
$out.='<tr class="oddeven">';
$out.='<td>'.$i.'</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.="</tr>\n";
}
@ -275,7 +279,8 @@ if (! $error && $xml)
$out.='<td>' . $langs->trans("Filename") . '</td>';
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</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.='</tr>'."\n";
$tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename');
@ -290,6 +295,9 @@ if (! $error && $xml)
$out.='<td>'.$file['filename'].'</td>' . "\n";
$out.='<td class="center">'.$file['expectedmd5'].'</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']);
$totalsize += $size;
$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 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"></td>' . "\n";
$out.="</tr>\n";

View File

@ -40,7 +40,7 @@ llxHeader();
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";
$modules = array();

View File

@ -49,7 +49,7 @@ $form = new Form($db);
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";
@ -60,8 +60,8 @@ $param = ''; $align = '';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
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($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('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
print '</tr>';
@ -69,7 +69,7 @@ print '</tr>';
foreach ($triggers as $trigger)
{
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 valign="top" align="center">'.$trigger['status'].'</td>';
print '<td class="tdtop">';

View File

@ -152,8 +152,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Asset';
$objectlabel='Asset';
$permtoread = $user->rights->asset->read;
$permtodelete = $user->rights->asset->delete;
$permissiontoread = $user->rights->asset->read;
$permissiontodelete = $user->rights->asset->delete;
$uploaddir = $conf->asset->dir_output;
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
//if ($user->socid > 0) access_forbidden();
//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);
$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
$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
$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");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->bom->write)
if ($permissiontoadd)
{
if ($action != 'classify')
$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">';
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%">';
}
@ -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>';
}
@ -565,8 +565,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Buttons for actions
if ($action != 'presend' && $action != 'editline') {
print '<div class="tabsAction">'."\n";
$parameters=array();
@ -584,7 +584,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// 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";
}
@ -619,7 +619,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// 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>';
}
@ -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";
}

View File

@ -1,6 +1,5 @@
<?php
/* 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
* 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');
$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
$objectclass='BOM';
$objectlabel='BillOfMaterials';
$permtoread = $user->rights->bom->read;
$permtodelete = $user->rights->bom->delete;
$permissiontoread = $user->rights->bom->read;
$permissiontodelete = $user->rights->bom->delete;
$uploaddir = $conf->bom->dir_output;
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
@ -303,7 +360,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// List of mass actions available
$arrayofmassactions = array(
//'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 (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions=array();
@ -539,6 +596,7 @@ print '</div>'."\n";
print '</form>'."\n";
if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
{
$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',),
'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,),
'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'),
'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'),

View File

@ -90,7 +90,7 @@ function bomPrepareHead($object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id='.$object->id;
$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';
$h++;
}
@ -102,7 +102,7 @@ function bomPrepareHead($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_document.php?id='.$object->id;
$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';
$h++;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -254,8 +254,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Contact';
$objectlabel='Contact';
$permtoread = $user->rights->societe->lire;
$permtodelete = $user->rights->societe->supprimer;
$permissiontoread = $user->rights->societe->lire;
$permissiontodelete = $user->rights->societe->supprimer;
$uploaddir = $conf->societe->dir_output;
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
*
* @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
* @return string Label
* @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
*/
public function getLibStatut($mode)
{
@ -1888,7 +1888,7 @@ class Contrat extends CommonObject
* Renvoi label of a given contrat 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
*/
public function LibStatut($status, $mode)
@ -1921,13 +1921,13 @@ class Contrat extends CommonObject
$text.=': &nbsp; &nbsp; ';
$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?'</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?'</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?'</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?'</span>':'');
return $text;

View File

@ -188,8 +188,8 @@ if (empty($reshook))
{
$objectclass='Contrat';
$objectlabel='Contracts';
$permtoread = $user->rights->contrat->lire;
$permtodelete = $user->rights->contrat->supprimer;
$permissiontoread = $user->rights->contrat->lire;
$permissiontodelete = $user->rights->contrat->supprimer;
$uploaddir = $conf->contrat->dir_output;
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 ');
}
if (! empty($arrayfields['status']['checked'])) {
print_liste_field_titre($staticcontratligne->LibStatut(0, 3), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(5, 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, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', '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 "</tr>\n";

View File

@ -30,7 +30,7 @@
// $objectclass and $objectlabel must be defined
// $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."/";)
// $toselect may be defined
// $diroutputmassaction may be defined
@ -43,6 +43,11 @@ if (empty($objectclass) || empty($uploaddir))
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.
$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))
{
@ -1105,7 +1110,7 @@ if ($action == 'remove_file')
}
// Validate records
if (! $error && $massaction == 'validate' && $permtocreate)
if (! $error && $massaction == 'validate' && $permissiontoadd)
{
$objecttmp=new $objectclass($db);
@ -1170,8 +1175,9 @@ if (! $error && $massaction == 'validate' && $permtocreate)
//var_dump($listofobjectthirdparties);exit;
}
}
// Closed records
if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) {
if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissiontoclose) {
$db->begin();
$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)
if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete)
if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete)
{
$db->begin();
@ -1272,7 +1278,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm ==
// Generate document foreach object according to model linked to object
// @TODO : propose model selection
if (! $error && $massaction == 'generate_doc' && $permtoread)
if (! $error && $massaction == 'generate_doc' && $permissiontoread)
{
$db->begin();

View File

@ -133,7 +133,7 @@ class box_accountancy_last_manual_entries extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="nowrap right"',
'td' => 'class="nowraponall right"',
'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;
$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),
);
$this->info_box_contents[$line][4] = array(
@ -255,7 +255,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb;
$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),
);
$this->info_box_contents[$line][4] = array(
@ -339,7 +339,7 @@ class box_activity extends ModeleBoxes
);
$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)
);
@ -421,7 +421,7 @@ class box_activity extends ModeleBoxes
);
$totalnb += $data[$j]->nb;
$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),
);
$this->info_box_contents[$line][4] = array(

View File

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

View File

@ -135,7 +135,7 @@ class box_commandes extends ModeleBoxes
$societestatic->logo = $objp->logo;
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $commandestatic->getNomUrl(1),
'asis' => 1,
);
@ -147,7 +147,7 @@ class box_commandes extends ModeleBoxes
);
$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),
);

View File

@ -154,7 +154,7 @@ class box_comptes extends ModeleBoxes
);
$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)
);
$line++;

View File

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

View File

@ -145,13 +145,13 @@ class box_factures_fourn_imp extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, '', 40),
'asis' => 1,
);
$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),
);

View File

@ -150,20 +150,20 @@ class box_factures_imp extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $facturestatic->getNomUrl(1),
'text2'=> $late,
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $societestatic->getNomUrl(1, '', 44),
'asis' => 1,
);
$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),
);

View File

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

View File

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

View File

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

View File

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

View File

@ -124,13 +124,13 @@ class box_members extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $memberstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $memberstatic->company,
'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;
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $mostatic->getNomUrl(1),
'asis' => 1,
);

View File

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

View File

@ -128,7 +128,7 @@ class box_propales extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $propalstatic->getNomUrl(1),
'text2'=> $late,
'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"));
$this->info_box_contents[$i][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $contract->getNomUrl(1),
'asis' => 1
);
@ -145,7 +145,7 @@ class box_services_expired extends ModeleBoxes
);
$this->info_box_contents[$i][] = array(
'td' => 'class="center"',
'td' => 'class="center nowraponall"',
'text' => dol_print_date($dateline, 'day'),
'text2'=> $late,
);

View File

@ -124,19 +124,19 @@ class box_supplier_orders extends ModeleBoxes
$thirdpartytmp->logo = $objp->logo;
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $supplierorderstatic->getNomUrl(1),
'asis' => 1
);
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, 'supplier'),
'asis' => 1,
);
$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),
);

View File

@ -130,19 +130,19 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$thirdpartytmp->logo = $objp->logo;
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="nowraponall"',
'text' => $supplierorderstatic->getNomUrl(1),
'asis' => 1
);
$this->info_box_contents[$line][] = array(
'td' => '',
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1, 'supplier'),
'asis' => 1,
);
$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),
);

View File

@ -667,21 +667,27 @@ class FormFile
{
$submodulepart = $modulepart;
// For normalized standard modules
$file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php', 0);
// modulepart = 'nameofmodule' or 'nameofmodule:nameofsubmodule'
$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))
{
$res=include_once $file;
}
// For normalized external modules. modulepart = 'nameofmodule' or 'nameofmodule:nameofsubmodule'
// For normalized external modules.
else
{
$tmp=explode(':', $modulepart);
if (! empty($tmp[2])) $submodulepart=$tmp[2];
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$submodulepart.'.php', 0);
$res=include_once $file;
}
$class='ModelePDF'.ucfirst($submodulepart);
if (class_exists($class))
{
$modellist=call_user_func($class.'::liste_modeles', $this->db);
@ -1465,7 +1471,7 @@ class FormFile
* @param string $param Parameters on sort links
* @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 int $permtodelete Permission to delete
* @param int $permissiontodelete Permission to delete
* @param int $useinecm Change output for use in ecm module
* @param int $textifempty Text to show if filearray is empty
* @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
* @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
global $user, $conf, $langs, $form;
@ -1697,7 +1703,7 @@ class FormFile
//if ($forcedownload) print '&attachment=1';
//print '&file='.urlencode($relativefile).'">';
//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;';
print "</td></tr>\n";
}
@ -1752,13 +1758,13 @@ class FormFile
* Show array with linked files
*
* @param Object $object Object
* @param int $permtodelete Deletion is allowed
* @param int $permissiontodelete Deletion is allowed
* @param string $action Action
* @param string $selected ???
* @param string $param More param to add into URL
* @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 $sortfield, $sortorder;
@ -1872,7 +1878,7 @@ class FormFile
print '<td class="center"></td>';
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
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
} else {
print '&nbsp;';

View File

@ -343,7 +343,7 @@ class Interfaces
}
// 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]['fullpath'] = $fullpath[$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][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';
$h++;

View File

@ -473,7 +473,7 @@ function actions_prepare_head($object)
$listofresourcelinked = $resource->getElementResources($object->element, $object->id);
$nbResources=(is_array($listofresourcelinked)?count($listofresourcelinked):0);
$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';
$h++;
}

View File

@ -102,7 +102,7 @@ function asset_prepare_head(Asset $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
$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';
$h++;
@ -111,7 +111,7 @@ function asset_prepare_head(Asset $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id;
$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';
$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][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';
$h++;
}
@ -97,7 +97,7 @@ function bank_prepare_head(Account $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT . "/compta/bank/document.php?account=" . $object->id;
$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';
$h++;
@ -186,7 +186,7 @@ function various_payment_prepare_head($object)
$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][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';
$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][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';
$h++;
}
@ -79,7 +79,7 @@ function societe_prepare_head(Societe $object)
$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'));
$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';
$h++;
}
@ -136,7 +136,7 @@ function societe_prepare_head(Societe $object)
else {
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';
$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][1] = $title;
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';
$h++;
}
@ -257,7 +257,7 @@ function societe_prepare_head(Societe $object)
else {
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';
$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][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';
$h++;
}
@ -306,7 +306,7 @@ function societe_prepare_head(Societe $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
$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';
$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][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';
$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);
$head[$tab][0] = DOL_URL_ROOT.'/contact/note.php?id='.$object->id;
$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';
$tab++;
}
@ -90,7 +90,7 @@ function contact_prepare_head(Contact $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/contact/document.php?id='.$object->id;
$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';
$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'));
$head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id;
$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';
$h++;
}
@ -63,7 +63,7 @@ function contract_prepare_head(Contrat $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
$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';
$h++;
}
@ -75,7 +75,7 @@ function contract_prepare_head(Contrat $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
$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';
$h++;

View File

@ -85,7 +85,7 @@ function donation_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/don/document.php?id='.$object->id;
$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';
$h++;
@ -94,7 +94,7 @@ function donation_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/don/note.php?id='.$object->id;
$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';
$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][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';
$h++;
}

View File

@ -52,7 +52,7 @@ function expensereport_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/expensereport/document.php?id='.$object->id;
$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';
$h++;
@ -63,7 +63,7 @@ function expensereport_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id;
$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';
$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'));
$head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id;
$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';
$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][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';
$h++;
}
@ -95,7 +95,7 @@ function fichinter_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
$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';
$h++;
}
@ -107,7 +107,7 @@ function fichinter_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id;
$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';
$h++;

View File

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

View File

@ -48,7 +48,7 @@ function facturefourn_prepare_head($object)
$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][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';
$h++;
}
@ -66,7 +66,7 @@ function facturefourn_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
$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';
$h++;
}
@ -78,7 +78,7 @@ function facturefourn_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id;
$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';
$h++;
@ -116,7 +116,7 @@ function ordersupplier_prepare_head($object)
$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][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';
$h++;
}
@ -143,7 +143,7 @@ function ordersupplier_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
$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';
$h++;
}
@ -155,7 +155,7 @@ function ordersupplier_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id;
$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';
$h++;

View File

@ -47,7 +47,7 @@ function holiday_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/holiday/document.php?id='.$object->id;
$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';
$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'));
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id;
$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';
$h++;
}
@ -71,7 +71,7 @@ function facture_prepare_head($object)
else dol_print_error($db);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id;
$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';
$h++;
}
@ -89,7 +89,7 @@ function facture_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$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';
$h++;
}
@ -101,7 +101,7 @@ function facture_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id;
$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';
$h++;

View File

@ -59,7 +59,7 @@ function loan_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id;
$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';
$tab++;
@ -68,7 +68,7 @@ function loan_prepare_head($object)
$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][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';
$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][1] = $langs->trans("Subscriptions");
$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++;
}
@ -76,7 +76,7 @@ function member_prepare_head(Adherent $object)
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("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++;
// Attachments
@ -87,7 +87,7 @@ function member_prepare_head(Adherent $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
$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';
$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'));
$head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id;
$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';
$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 && $conf->livraison_bon->enabled) $text.='/';
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.= ($nbReceiption?$nbReceiption:0);
if ($nbShipments > 0 || $nbReceiption > 0) $text.= '</span>';
@ -89,7 +89,7 @@ function commande_prepare_head(Commande $object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id;
$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';
$h++;
}
@ -101,7 +101,7 @@ function commande_prepare_head(Commande $object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
$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';
$h++;

View File

@ -82,7 +82,7 @@ function product_prepare_head($object)
$head[$h][1] = $langs->trans('AssociatedProducts');
$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';
$h++;
}
@ -110,7 +110,7 @@ function product_prepare_head($object)
$head[$h][1] = $langs->trans('ProductCombinations');
$head[$h][2] = 'combinations';
$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++;
@ -160,7 +160,7 @@ function product_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/product/note.php?id='.$object->id;
$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';
$h++;
}
@ -179,7 +179,7 @@ function product_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
$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';
$h++;
@ -228,7 +228,7 @@ function productlot_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT."/product/stock/productlot_document.php?id=".$object->id;
$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';
$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'));
$head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id;
$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';
$h++;
@ -61,7 +61,7 @@ function project_prepare_head($object)
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
$taskstatic=new Task($db);
$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';
$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][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';
$h++;
}
@ -123,7 +123,7 @@ function project_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
$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';
$h++;
@ -133,7 +133,7 @@ function project_prepare_head($object)
$nbComments = $object->getNbComments();
$head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$object->id;
$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';
$h++;
}
@ -174,7 +174,7 @@ function task_prepare_head($object)
$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][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';
$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][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';
$h++;
@ -212,7 +212,7 @@ function task_prepare_head($object)
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][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';
$h++;
}
@ -224,7 +224,7 @@ function task_prepare_head($object)
$nbFiles = count(dol_dir_list($filesdir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$nbLinks=Link::count($db, $object->element, $object->id);
$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';
$h++;
@ -234,7 +234,7 @@ function task_prepare_head($object)
$nbComments = $object->getNbComments();
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/comment.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
$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';
$h++;
}
@ -1857,7 +1857,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
$i = 0;
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);
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'));
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/contact.php?id='.$object->id;
$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';
$h++;
}
@ -78,7 +78,7 @@ function propal_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
$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';
$h++;
}
@ -90,7 +90,7 @@ function propal_prepare_head($object)
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
$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';
$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'));
$head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id;
$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';
$h++;
}
@ -70,7 +70,7 @@ function reception_prepare_head(Reception $object)
if (!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id;
$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';
$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 doc_generic_bom_odt extends ModelePDFBoms
class doc_generic_bom_odt extends ModelePDFBom
{
/**
* Issuer

View File

@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
/**
* Parent class for boms models
*/
abstract class ModelePDFBoms extends CommonDocGenerator
abstract class ModelePDFBom extends CommonDocGenerator
{
// 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.
$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'
$this->version = 'dolibarr';
$this->version = 'experimental';
// Url to the file with your last numberversion of this module
//$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 doc_generic_mo_odt extends ModelePDFMos
class doc_generic_mo_odt extends ModelePDFMo
{
/**
* Issuer

View File

@ -23,10 +23,10 @@
*/
/**
* \file htdocs/core/modules/mrp/modules_mrp.php
* \ingroup bom
* \brief File that contains parent class for mos models
* and parent class for mos numbering models
* \file htdocs/core/modules/mrp/modules_mo.php
* \ingroup mrp
* \brief File that contains parent class for MOs models
* and parent class for MOs numbering models
*/
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
*/
abstract class ModelePDFMos extends CommonDocGenerator
abstract class ModelePDFMo extends CommonDocGenerator
{
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -110,8 +110,8 @@ if (empty($reshook))
// Mass actions
/*$objectclass='MyObject';
$objectlabel='MyObject';
$permtoread = $user->rights->mymodule->read;
$permtodelete = $user->rights->mymodule->delete;
$permissiontoread = $user->rights->mymodule->read;
$permissiontodelete = $user->rights->mymodule->delete;
$uploaddir = $conf->mymodule->dir_output;
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)
ExpectedChecksum=Expected Checksum
CurrentChecksum=Current Checksum
ExpectedSize=Expected size
CurrentSize=Current size
ForcedConstants=Required constant values
MailToSendProposal=Customer proposals
MailToSendOrder=Sales orders

View File

@ -12,7 +12,7 @@ BOMsSetup=Setup of module BOM
ListOfBOMs=List of bills of material - BOM
ListOfManufacturingOrders=List of Manufacturing Orders
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
BOMsModelModule=BOM document templates
MOsNumberingModules=MO numbering templates

View File

@ -120,8 +120,8 @@ if (empty($reshook))
if ((string) $type == '1') { $objectlabel='Services'; }
if ((string) $type == '0') { $objectlabel='Products'; }
$permtoread = $user->rights->produit->lire;
$permtodelete = $user->rights->produit->supprimer;
$permissiontoread = $user->rights->produit->lire;
$permissiontodelete = $user->rights->produit->supprimer;
$uploaddir = $conf->product->dir_output;
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
//if ($user->socid > 0) access_forbidden();
//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);
$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
$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
$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">';
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%">';
}
@ -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>';
}
@ -457,9 +457,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// 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
{
@ -467,13 +467,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// 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)
{
@ -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)
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";
}

View File

@ -153,9 +153,9 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
$permtoread = $user->rights->mymodule->myobject->read;
$permtowrite = $user->rights->mymodule->myobject->write;
$permtodelete = $user->rights->mymodule->myobject->delete;
$permissiontoread = $user->rights->mymodule->myobject->read;
$permissiontoadd = $user->rights->mymodule->myobject->write;
$permissiontodelete = $user->rights->mymodule->myobject->delete;
/*
@ -347,7 +347,7 @@ $arrayofmassactions = array(
//'builddoc'=>$langs->trans("PDFMerge"),
//'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();
$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="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);
@ -594,8 +594,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
$urlsource.=str_replace('&amp;', '&', $param);
$filedir=$diroutputmassaction;
$genallowed=$permtoread;
$delallowed=$permtowrite;
$genallowed=$permissiontoread;
$delallowed=$permissiontoadd;
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
//if ($user->socid > 0) access_forbidden();
//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);
$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
$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
$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
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
//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'));
}
// 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);
$formfile=new FormFile($db);
$formproject=new FormProjets($db);
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);
}
// 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
if ($action == 'clone') {
// Create an array for form
@ -332,7 +373,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$langs->load("projects");
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
if ($user->rights->mrp->write)
if ($permissiontoadd)
{
if ($action != 'classify')
$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="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'."\n";
print '<table class="border centpercent tableforfield">'."\n";
// Common attributes
$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">';
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%">';
}
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
@ -423,14 +464,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($action != 'editline')
{
// Add products/services form
$object->formAddObjectLine(1, $mysoc, $soc);
$object->formAddObjectLine(1, $mysoc, $soc, '/mrp/tpl');
$parameters = array();
$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>';
}
@ -451,10 +492,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook))
{
// 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
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";
}
@ -477,13 +523,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// 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)
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";
}
@ -507,14 +553,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<a name="builddoc"></a>'; // ancre
// Documents
/*$objref = dol_sanitizeFileName($object->ref);
$relativepath = $comref . '/' . $comref . '.pdf';
$objref = dol_sanitizeFileName($object->ref);
$relativepath = $objref . '/' . $objref . '.pdf';
$filedir = $conf->mrp->dir_output . '/' . $objref;
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$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
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
$linktoelem = $form->showLinkToObjectBlock($object, null, array('mo'));

View File

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

View File

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

View File

@ -153,8 +153,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Inventory';
$objectlabel='Inventory';
$permtoread = $user->rights->stock->lire;
$permtodelete = $user->rights->stock->supprimer;
$permissiontoread = $user->rights->stock->lire;
$permissiontodelete = $user->rights->stock->supprimer;
$uploaddir = $conf->stock->dir_output;
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 == '0') { $objectlabel='Products'; }
$permtoread = $user->rights->produit->lire;
$permtodelete = $user->rights->produit->supprimer;
$permissiontoread = $user->rights->produit->lire;
$permissiontodelete = $user->rights->produit->supprimer;
$uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}

View File

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

View File

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

View File

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

View File

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

View File

@ -163,8 +163,8 @@ if (empty($reshook))
// Mass actions
$objectclass='Task';
$objectlabel='Tasks';
$permtoread = $user->rights->projet->lire;
$permtodelete = $user->rights->projet->supprimer;
$permissiontoread = $user->rights->projet->lire;
$permissiontodelete = $user->rights->projet->supprimer;
$uploaddir = $conf->projet->dir_output.'/tasks';
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