Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c3a58ae303
@ -163,7 +163,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
|
'td' => 'class="tdoverflowmax100 maxwidth150onsmartphone"',
|
||||||
'text' => $objp->label,
|
'text' => $objp->label,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -186,18 +186,13 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
/*$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="nowraponall right amount"',
|
'td' => 'class="nowraponall right amount"',
|
||||||
'text' => $price,
|
'text' => $price.' '.$price_base_type,
|
||||||
);
|
);*/
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'class="right"',
|
'td' => 'class="center nowraponall"',
|
||||||
'text' => $price_base_type,
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
|
||||||
'td' => 'class="center"',
|
|
||||||
'text' => price2num($objp->total_stock, 'MS').' / '.$objp->seuil_stock_alerte,
|
'text' => price2num($objp->total_stock, 'MS').' / '.$objp->seuil_stock_alerte,
|
||||||
'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit", $objp->seuil_stock_alerte)),
|
'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit", $objp->seuil_stock_alerte)),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -180,7 +180,7 @@ function delivery_prepare_head($object)
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||||
$upload_dir = $conf->commande->dir_output."/".dol_sanitizeFileName($tmpobject->ref);
|
$upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref);
|
||||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||||
$nbLinks = Link::count($db, $tmpobject->element, $tmpobject->id);
|
$nbLinks = Link::count($db, $tmpobject->element, $tmpobject->id);
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$tmpobject->id;
|
$head[$h][0] = DOL_URL_ROOT.'/expedition/document.php?id='.$tmpobject->id;
|
||||||
|
|||||||
@ -110,11 +110,9 @@ print '</table>';
|
|||||||
|
|
||||||
// We close div and reopen for second column
|
// We close div and reopen for second column
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="fichehalfright">';
|
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
|
||||||
print '<table class="border centpercent tableforfield">';
|
|
||||||
|
|
||||||
|
$rightpart = '';
|
||||||
$alreadyoutput = 1;
|
$alreadyoutput = 1;
|
||||||
foreach ($object->fields as $key => $val) {
|
foreach ($object->fields as $key => $val) {
|
||||||
if ($alreadyoutput) {
|
if ($alreadyoutput) {
|
||||||
@ -139,38 +137,46 @@ foreach ($object->fields as $key => $val) {
|
|||||||
|
|
||||||
$value = $object->$key;
|
$value = $object->$key;
|
||||||
|
|
||||||
print '<tr><td';
|
$rightpart .= '<tr><td';
|
||||||
print ' class="'.(empty($val['tdcss']) ? 'titlefield' : $val['tdcss']).' fieldname_'.$key;
|
$rightpart .= ' class="'.(empty($val['tdcss']) ? 'titlefield' : $val['tdcss']).' fieldname_'.$key;
|
||||||
//if ($val['notnull'] > 0) print ' fieldrequired'; // No fieldrequired inthe view output
|
//if ($val['notnull'] > 0) $rightpart .= ' fieldrequired'; // No fieldrequired inthe view output
|
||||||
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
||||||
print ' tdtop';
|
$rightpart .= ' tdtop';
|
||||||
}
|
}
|
||||||
print '">';
|
$rightpart.= '">';
|
||||||
if (!empty($val['help'])) {
|
if (!empty($val['help'])) {
|
||||||
print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
|
$rightpart .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans($val['label']);
|
$rightpart .= $langs->trans($val['label']);
|
||||||
}
|
}
|
||||||
print '</td>';
|
$rightpart .= '</td>';
|
||||||
print '<td class="valuefield fieldname_'.$key;
|
$rightpart .= '<td class="valuefield fieldname_'.$key;
|
||||||
if ($val['type'] == 'text') {
|
if ($val['type'] == 'text') {
|
||||||
print ' wordbreak';
|
$rightpart .= ' wordbreak';
|
||||||
}
|
}
|
||||||
if (!empty($val['cssview'])) {
|
if (!empty($val['cssview'])) {
|
||||||
print ' '.$val['cssview'];
|
$rightpart .= ' '.$val['cssview'];
|
||||||
}
|
}
|
||||||
print '">';
|
$rightpart .= '">';
|
||||||
if (in_array($val['type'], array('text', 'html'))) {
|
if (in_array($val['type'], array('text', 'html'))) {
|
||||||
print '<div class="longmessagecut">';
|
$rightpart .= '<div class="longmessagecut">';
|
||||||
}
|
}
|
||||||
print $object->showOutputField($val, $key, $value, '', '', '', 0);
|
$rightpart .= $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||||
//print dol_escape_htmltag($object->$key, 1, 1);
|
//$rightpart .= dol_escape_htmltag($object->$key, 1, 1);
|
||||||
if (in_array($val['type'], array('text', 'html'))) {
|
if (in_array($val['type'], array('text', 'html'))) {
|
||||||
print '</div>';
|
$rightpart .= '</div>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
$rightpart .= '</td>';
|
||||||
print '</tr>';
|
$rightpart .= '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichehalfright">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border centpercent tableforfield">';
|
||||||
|
|
||||||
|
print $rightpart;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!-- END PHP TEMPLATE commonfields_view.tpl.php -->
|
<!-- END PHP TEMPLATE commonfields_view.tpl.php -->
|
||||||
|
|||||||
@ -101,7 +101,7 @@ if ($action == 'add') {
|
|||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
|
|
||||||
if (!$conf->expedition_bon->enabled && !empty($conf->stock->enabled)) {
|
if (!$conf->expedition_bon->enabled && !empty($conf->stock->enabled)) {
|
||||||
$expedition->entrepot_id = GETPOST('entrepot_id');
|
$expedition->entrepot_id = GETPOST('entrepot_id', 'int');
|
||||||
}
|
}
|
||||||
|
|
||||||
// We loop on each line of order to complete object delivery with qty to delivery
|
// We loop on each line of order to complete object delivery with qty to delivery
|
||||||
@ -282,7 +282,7 @@ if ($action == 'create') { // Create. Seems to no be used
|
|||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
print '<input type="hidden" name="ref" value="'.$object->ref.'">';
|
print '<input type="hidden" name="ref" value="'.$object->ref.'">';
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'delivery', $langs->trans("Shipment"), -1, 'sending');
|
print dol_get_fiche_head($head, 'delivery', $langs->trans("Shipment"), -1, 'dolly');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression
|
* Confirmation de la suppression
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class Position extends CommonObject
|
|||||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
||||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
|
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
|
||||||
'fk_contrat' => array('type'=>'integer:Contrat:contrat/class/contrat.class.php', 'label'=>'fk_contrat', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>0,),
|
'fk_contrat' => array('type'=>'integer:Contrat:contrat/class/contrat.class.php', 'label'=>'fk_contrat', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>0,),
|
||||||
'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1,),
|
'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>1,),
|
||||||
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,),
|
'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'Job', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1,),
|
||||||
'date_start' => array('type'=>'date', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>51, 'notnull'=>1, 'visible'=>1,),
|
'date_start' => array('type'=>'date', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>51, 'notnull'=>1, 'visible'=>1,),
|
||||||
'date_end' => array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>1,),
|
'date_end' => array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>1,),
|
||||||
|
|||||||
@ -264,7 +264,7 @@ if (($id || $ref) && $action == 'edit') {
|
|||||||
if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
|
if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
|
||||||
print '<table>';
|
print '<table>';
|
||||||
foreach ($SkilldetRecords as $sk) {
|
foreach ($SkilldetRecords as $sk) {
|
||||||
if ($sk->rank > $MaxNumberSkill) {
|
if ($sk->rankorder > $MaxNumberSkill) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ if (($id || $ref) && $action == 'edit') {
|
|||||||
// if (!empty($val['help'])) {
|
// if (!empty($val['help'])) {
|
||||||
// print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
|
// print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
|
||||||
// } else {
|
// } else {
|
||||||
print $langs->trans($val['label']).' '.$langs->trans('rank').' '.$sk->rank;
|
print $langs->trans($val['label']).' '.$langs->trans('rank').' '.$sk->rankorder;
|
||||||
// }
|
// }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="valuefieldcreate">';
|
print '<td class="valuefieldcreate">';
|
||||||
@ -696,7 +696,7 @@ if ($action != "create" && $action != "edit") {
|
|||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($obj->rank > $MaxNumberSkill) {
|
if ($obj->rankorder > $MaxNumberSkill) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -292,7 +292,7 @@ CREATE TABLE llx_hrm_job_user(
|
|||||||
date_creation datetime NOT NULL,
|
date_creation datetime NOT NULL,
|
||||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
fk_contrat integer,
|
fk_contrat integer,
|
||||||
fk_user integer NOT NULL,
|
fk_user integer,
|
||||||
fk_job integer NOT NULL,
|
fk_job integer NOT NULL,
|
||||||
date_start date,
|
date_start date,
|
||||||
date_end date,
|
date_end date,
|
||||||
|
|||||||
@ -23,7 +23,7 @@ CREATE TABLE llx_hrm_job_user(
|
|||||||
date_creation datetime NOT NULL,
|
date_creation datetime NOT NULL,
|
||||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
fk_contrat integer,
|
fk_contrat integer,
|
||||||
fk_user integer NOT NULL,
|
fk_user integer,
|
||||||
fk_job integer NOT NULL,
|
fk_job integer NOT NULL,
|
||||||
date_start datetime,
|
date_start datetime,
|
||||||
date_end datetime,
|
date_end datetime,
|
||||||
|
|||||||
@ -2217,3 +2217,4 @@ NoDeployedModulesFoundWithThisSearchCriteria=No modules found for these search c
|
|||||||
API_DISABLE_COMPRESSION=Disable compression of API responses
|
API_DISABLE_COMPRESSION=Disable compression of API responses
|
||||||
EachTerminalHasItsOwnCounter=Each terminal use its own counter.
|
EachTerminalHasItsOwnCounter=Each terminal use its own counter.
|
||||||
FillAndSaveAccountIdAndSecret=Fill and save account ID and secret first
|
FillAndSaveAccountIdAndSecret=Fill and save account ID and secret first
|
||||||
|
PreviousHash=Previous hash
|
||||||
@ -800,9 +800,10 @@ class Task extends CommonObject
|
|||||||
* @param array $extrafields Show additional column from project or task
|
* @param array $extrafields Show additional column from project or task
|
||||||
* @param int $includebilltime Calculate also the time to bill and billed
|
* @param int $includebilltime Calculate also the time to bill and billed
|
||||||
* @param array $search_array_options Array of search
|
* @param array $search_array_options Array of search
|
||||||
|
* @param int $loadextras Fetch all Extrafields on each task
|
||||||
* @return array Array of tasks
|
* @return array Array of tasks
|
||||||
*/
|
*/
|
||||||
public function getTasksArray($usert = null, $userp = null, $projectid = 0, $socid = 0, $mode = 0, $filteronproj = '', $filteronprojstatus = '-1', $morewherefilter = '', $filteronprojuser = 0, $filterontaskuser = 0, $extrafields = array(), $includebilltime = 0, $search_array_options = array())
|
public function getTasksArray($usert = null, $userp = null, $projectid = 0, $socid = 0, $mode = 0, $filteronproj = '', $filteronprojstatus = '-1', $morewherefilter = '', $filteronprojuser = 0, $filterontaskuser = 0, $extrafields = array(), $includebilltime = 0, $search_array_options = array(), $loadextras = 0)
|
||||||
{
|
{
|
||||||
global $conf, $hookmanager;
|
global $conf, $hookmanager;
|
||||||
|
|
||||||
@ -1022,6 +1023,10 @@ class Task extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($loadextras) {
|
||||||
|
$tasks[$i]->fetch_optionals();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -80,7 +80,6 @@ if (!$action) {
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST("id", 'int');
|
$id = GETPOST("id", 'int');
|
||||||
$socid = 0;
|
|
||||||
if ($user->socid > 0) $socid = $user->socid;
|
if ($user->socid > 0) $socid = $user->socid;
|
||||||
$result = restrictedArea($user, 'ticket', $id, '');
|
$result = restrictedArea($user, 'ticket', $id, '');
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,6 @@ if ($id || $track_id || $ref) {
|
|||||||
$url_page_current = DOL_URL_ROOT.'/ticket/card.php';
|
$url_page_current = DOL_URL_ROOT.'/ticket/card.php';
|
||||||
|
|
||||||
// Security check - Protection if external user
|
// Security check - Protection if external user
|
||||||
$socid = 0;
|
|
||||||
if ($user->socid > 0) $socid = $user->socid;
|
if ($user->socid > 0) $socid = $user->socid;
|
||||||
$result = restrictedArea($user, 'ticket', $object->id);
|
$result = restrictedArea($user, 'ticket', $object->id);
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,6 @@ $permissiontoadd = $user->rights->ticket->write;
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST("id", 'int');
|
$id = GETPOST("id", 'int');
|
||||||
$socid = 0;
|
|
||||||
if ($user->socid > 0) $socid = $user->socid;
|
if ($user->socid > 0) $socid = $user->socid;
|
||||||
$result = restrictedArea($user, 'ticket', $object->id, '');
|
$result = restrictedArea($user, 'ticket', $object->id, '');
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,6 @@ $permissiontoadd = $user->rights->ticket->write;
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST("id", 'int');
|
$id = GETPOST("id", 'int');
|
||||||
$socid = 0;
|
|
||||||
if ($user->socid > 0) $socid = $user->socid;
|
if ($user->socid > 0) $socid = $user->socid;
|
||||||
$result = restrictedArea($user, 'ticket', $object->id, '');
|
$result = restrictedArea($user, 'ticket', $object->id, '');
|
||||||
|
|
||||||
|
|||||||
@ -1149,9 +1149,12 @@ class User extends CommonObject
|
|||||||
$sql .= " AND r.entity = ".((int) $conf->entity);
|
$sql .= " AND r.entity = ".((int) $conf->entity);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sql .= " AND gr.entity = ".((int) $conf->entity);
|
$sql .= " AND gr.entity = ".((int) $conf->entity); // Only groups created in current entity
|
||||||
$sql .= " AND gu.entity = ".((int) $conf->entity);
|
// The entity on the table usergroup_user should be useless and shoumd never be used because it is alreay into gr and r.
|
||||||
$sql .= " AND r.entity = ".((int) $conf->entity);
|
// but when using MULTICOMPANY_TRANSVERSE_MODE, we may insert record that make rubbish result due to duplicate record of
|
||||||
|
// other entities, so we are forced to add a filter here
|
||||||
|
$sql .= " AND gu.entity IN (0,".$conf->entity.")";
|
||||||
|
$sql .= " AND r.entity = ".((int) $conf->entity); // Only permission of modules enabled in current entity
|
||||||
}
|
}
|
||||||
$sql .= " AND gr.fk_usergroup = gu.fk_usergroup";
|
$sql .= " AND gr.fk_usergroup = gu.fk_usergroup";
|
||||||
$sql .= " AND gu.fk_user = ".((int) $this->id);
|
$sql .= " AND gu.fk_user = ".((int) $this->id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user