Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
192510316b | ||
|
|
6f83c8c6f3 | ||
|
|
8213756c37 | ||
|
|
a254412c61 | ||
|
|
cc1a3080d0 | ||
|
|
b5f887b3e4 | ||
|
|
694357d48e | ||
|
|
c4f80b4e71 | ||
|
|
ece9f3037a | ||
|
|
400f6b244b | ||
|
|
1129222064 | ||
|
|
7cb657c991 |
@ -72,7 +72,7 @@ class DolLogsCollector extends MessagesCollector
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$uselogfile = $conf->global->DEBUGBAR_USE_LOGFILE;
|
$uselogfile = $conf->global->DEBUGBAR_USE_LOG_FILE;
|
||||||
|
|
||||||
if ($uselogfile)
|
if ($uselogfile)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -531,11 +531,11 @@ class Productbatch extends CommonObject
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_lot as pl";
|
$sql .= " FROM ".MAIN_DB_PREFIX."product_lot as pl";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pl.fk_product";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pl.fk_product";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_batch AS pb ON pl.batch = pb.batch";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_batch AS pb ON pl.batch = pb.batch";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock AS ps ON ps.rowid = pb.fk_product_stock";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock AS ps ON ps.rowid = pb.fk_product_stock AND ps.fk_product = ".((int) $fk_product);
|
||||||
$sql .= " WHERE p.entity IN (".getEntity('product').")";
|
$sql .= " WHERE p.entity IN (".getEntity('product').")";
|
||||||
$sql .= " AND pl.fk_product = ".$fk_product;
|
$sql .= " AND pl.fk_product = ".((int) $fk_product);
|
||||||
if ($fk_warehouse > 0) {
|
if ($fk_warehouse > 0) {
|
||||||
$sql .= " AND ps.fk_entrepot = ".$fk_warehouse;
|
$sql .= " AND ps.fk_entrepot = ".((int) $fk_warehouse);
|
||||||
}
|
}
|
||||||
if ($qty_min !== null) {
|
if ($qty_min !== null) {
|
||||||
$sql .= " AND pb.qty > ".$qty_min;
|
$sql .= " AND pb.qty > ".$qty_min;
|
||||||
|
|||||||
@ -620,6 +620,11 @@ $restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSI
|
|||||||
|
|
||||||
// Get if user is available or not for each day
|
// Get if user is available or not for each day
|
||||||
$isavailable = array();
|
$isavailable = array();
|
||||||
|
|
||||||
|
// Assume from Monday to Friday if conf empty or badly formed
|
||||||
|
$numstartworkingday = 1;
|
||||||
|
$numendworkingday = 5;
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
|
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
|
||||||
{
|
{
|
||||||
$tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
|
$tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
|
||||||
|
|||||||
@ -521,6 +521,11 @@ $startday = dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['
|
|||||||
|
|
||||||
// Get if user is available or not for each day
|
// Get if user is available or not for each day
|
||||||
$isavailable = array();
|
$isavailable = array();
|
||||||
|
|
||||||
|
// Assume from Monday to Friday if conf empty or badly formed
|
||||||
|
$numstartworkingday = 1;
|
||||||
|
$numendworkingday = 5;
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
|
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
|
||||||
{
|
{
|
||||||
$tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
|
$tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
|
||||||
@ -530,7 +535,6 @@ if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
|
|||||||
$numendworkingday = $tmparray[1];
|
$numendworkingday = $tmparray[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($idw = 0; $idw < 7; $idw++)
|
for ($idw = 0; $idw < 7; $idw++)
|
||||||
{
|
{
|
||||||
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
|
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
|
||||||
|
|||||||
@ -327,7 +327,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
|
|||||||
$holiday->id = $objp->rowid;
|
$holiday->id = $objp->rowid;
|
||||||
$holiday->ref = $objp->rowid;
|
$holiday->ref = $objp->rowid;
|
||||||
$holiday->fk_type = $objp->fk_type;
|
$holiday->fk_type = $objp->fk_type;
|
||||||
$nbopenedday = num_open_day($db->jdate($objp->date_debut), $db->jdate($objp->date_fin), 0, 1, $objp->halfday);
|
$nbopenedday = num_open_day($db->jdate($objp->date_debut, 'gmt'), $db->jdate($objp->date_fin, 'gmt'), 0, 1, $objp->halfday);
|
||||||
|
|
||||||
print $holiday->getNomUrl(1);
|
print $holiday->getNomUrl(1);
|
||||||
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
|
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
|
||||||
|
|||||||
@ -1905,7 +1905,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($caneditfield && (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
if ($caneditfield && (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
|
if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
|
||||||
{
|
{
|
||||||
@ -1917,7 +1917,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($caneditpassword && !$object->ldap_sid &&
|
elseif ($caneditpassword && !$object->ldap_sid &&
|
||||||
(empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
(empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("EditPassword").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("EditPassword").'</a></div>';
|
||||||
}
|
}
|
||||||
@ -1930,7 +1930,7 @@ else
|
|||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("ReinitPassword").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("ReinitPassword").'</a></div>';
|
||||||
}
|
}
|
||||||
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=password">'.$langs->trans("ReinitPassword").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=password">'.$langs->trans("ReinitPassword").'</a></div>';
|
||||||
}
|
}
|
||||||
@ -1940,7 +1940,7 @@ else
|
|||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a></div>';
|
||||||
}
|
}
|
||||||
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>';
|
if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>';
|
||||||
else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a></div>';
|
else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a></div>';
|
||||||
@ -1949,13 +1949,13 @@ else
|
|||||||
|
|
||||||
// Enable user
|
// Enable user
|
||||||
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
|
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a></div>';
|
||||||
}
|
}
|
||||||
// Disable user
|
// Disable user
|
||||||
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
|
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a></div>';
|
||||||
}
|
}
|
||||||
@ -1968,7 +1968,7 @@ else
|
|||||||
}
|
}
|
||||||
// Delete
|
// Delete
|
||||||
if ($user->id <> $id && $candisableuser &&
|
if ($user->id <> $id && $candisableuser &&
|
||||||
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
|
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
|
||||||
{
|
{
|
||||||
if ($user->admin || !$object->admin) // If user edited is admin, delete is possible on for an admin
|
if ($user->admin || !$object->admin) // If user edited is admin, delete is possible on for an admin
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user