Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8422d3079c
@ -1860,7 +1860,7 @@ class ExtraFields
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
if (!empty($toprint)) $value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||||
} else {
|
} else {
|
||||||
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -835,12 +835,12 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td>';
|
print '<td class="nowraponall">';
|
||||||
print $projecttmp->getNomUrl(1);
|
print $projecttmp->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.$obj->title.'</td>';
|
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->title).'">'.dol_escape_htmltag($obj->title).'</td>';
|
||||||
// Date start
|
// Date start
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
|
print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>';
|
||||||
// Date end
|
// Date end
|
||||||
|
|||||||
@ -40,6 +40,24 @@ $permissiontoadd = $user->admin;
|
|||||||
if (empty($conf->hrm->enabled)) accessforbidden();
|
if (empty($conf->hrm->enabled)) accessforbidden();
|
||||||
if (empty($permissiontoread)) accessforbidden();
|
if (empty($permissiontoread)) accessforbidden();
|
||||||
|
|
||||||
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
|
if (!$sortorder) {
|
||||||
|
$sortorder = "DESC";
|
||||||
|
}
|
||||||
|
if (!$sortfield) {
|
||||||
|
$sortfield = "e.rowid";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($page) || $page == -1) {
|
||||||
|
$page = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -59,46 +77,50 @@ $title = $langs->trans('Establishments');
|
|||||||
|
|
||||||
llxHeader('', $title, '');
|
llxHeader('', $title, '');
|
||||||
|
|
||||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
|
||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
|
||||||
if (!$sortorder) {
|
|
||||||
$sortorder = "DESC";
|
|
||||||
}
|
|
||||||
if (!$sortfield) {
|
|
||||||
$sortfield = "e.rowid";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($page) || $page == -1) {
|
|
||||||
$page = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$offset = $limit * $page;
|
|
||||||
$pageprev = $page - 1;
|
|
||||||
$pagenext = $page + 1;
|
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
|
||||||
|
|
||||||
// Subheader
|
// Subheader
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
print load_fiche_titre($langs->trans("HRMSetup"), $linkback, 'title_setup');
|
print load_fiche_titre($langs->trans("HRMSetup"), $linkback, 'title_setup');
|
||||||
|
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewEstablishment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/hrm/establishment/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
|
||||||
|
|
||||||
// Configuration header
|
// Configuration header
|
||||||
$head = hrmAdminPrepareHead();
|
$head = hrmAdminPrepareHead();
|
||||||
print dol_get_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "user", 0, $newcardbutton);
|
print dol_get_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "hrm", 0, '');
|
||||||
|
|
||||||
|
$param = '';
|
||||||
|
|
||||||
$sql = "SELECT e.rowid, e.rowid as ref, e.label, e.address, e.zip, e.town, e.status";
|
$sql = "SELECT e.rowid, e.rowid as ref, e.label, e.address, e.zip, e.town, e.status";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."establishment as e";
|
$sql .= " FROM ".MAIN_DB_PREFIX."establishment as e";
|
||||||
$sql .= " WHERE e.entity IN (".getEntity('establishment').')';
|
$sql .= " WHERE e.entity IN (".getEntity('establishment').')';
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
|
$nbtotalofrecords = '';
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($resql);
|
||||||
|
|
||||||
|
if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0
|
||||||
|
$page = 0;
|
||||||
|
$offset = 0;
|
||||||
|
}
|
||||||
|
$db->free($resql);
|
||||||
|
}
|
||||||
|
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
|
|
||||||
|
$newcardbutton = dolGetButtonTitle($langs->trans('NewEstablishment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/hrm/establishment/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
|
||||||
|
|
||||||
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', 0, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder);
|
||||||
@ -139,6 +161,7 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,33 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
$res = 0;
|
require '../../main.inc.php';
|
||||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
|
||||||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
|
|
||||||
$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
|
|
||||||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
|
|
||||||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
|
|
||||||
$i--; $j--;
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
|
|
||||||
$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
|
|
||||||
$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php using relative path
|
|
||||||
if (!$res && file_exists("../../main.inc.php")) {
|
|
||||||
$res = @include "../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && file_exists("../../../main.inc.php")) {
|
|
||||||
$res = @include "../../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res) {
|
|
||||||
die("Include of main fails");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
require_once '../lib/hrm.lib.php';
|
require_once '../lib/hrm.lib.php';
|
||||||
|
|
||||||
@ -105,7 +79,7 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
|
|||||||
|
|
||||||
$head = hrmAdminPrepareHead();
|
$head = hrmAdminPrepareHead();
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'evaluationsAttributes', $langs->trans($page_name), -1, 'hrm@hrm');
|
print dol_get_fiche_head($head, 'evaluationsAttributes', $langs->trans($page_name), -1, 'hrm');
|
||||||
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -27,33 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
$res = 0;
|
require '../../main.inc.php';
|
||||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
|
||||||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
|
|
||||||
$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
|
|
||||||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
|
|
||||||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
|
|
||||||
$i--; $j--;
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
|
|
||||||
$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
|
|
||||||
$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php using relative path
|
|
||||||
if (!$res && file_exists("../../main.inc.php")) {
|
|
||||||
$res = @include "../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && file_exists("../../../main.inc.php")) {
|
|
||||||
$res = @include "../../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res) {
|
|
||||||
die("Include of main fails");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
require_once '../lib/hrm.lib.php';
|
require_once '../lib/hrm.lib.php';
|
||||||
|
|
||||||
@ -105,7 +79,7 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
|
|||||||
|
|
||||||
$head = hrmAdminPrepareHead();
|
$head = hrmAdminPrepareHead();
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'jobsAttributes', $langs->trans($page_name), -1, 'hrm@job');
|
print dol_get_fiche_head($head, 'jobsAttributes', $langs->trans($page_name), -1, 'hrm');
|
||||||
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -27,33 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
$res = 0;
|
require '../../main.inc.php';
|
||||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
|
||||||
if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
|
|
||||||
$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
|
|
||||||
$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
|
|
||||||
while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
|
|
||||||
$i--; $j--;
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
|
|
||||||
$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
|
|
||||||
$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
|
|
||||||
}
|
|
||||||
// Try main.inc.php using relative path
|
|
||||||
if (!$res && file_exists("../../main.inc.php")) {
|
|
||||||
$res = @include "../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res && file_exists("../../../main.inc.php")) {
|
|
||||||
$res = @include "../../../main.inc.php";
|
|
||||||
}
|
|
||||||
if (!$res) {
|
|
||||||
die("Include of main fails");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
require_once '../lib/hrm.lib.php';
|
require_once '../lib/hrm.lib.php';
|
||||||
|
|
||||||
@ -105,7 +79,7 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
|
|||||||
|
|
||||||
$head = hrmAdminPrepareHead();
|
$head = hrmAdminPrepareHead();
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'skillsAttributes', $langs->trans($page_name), -1, 'hrm@skill');
|
print dol_get_fiche_head($head, 'skillsAttributes', $langs->trans($page_name), -1, 'hrm');
|
||||||
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ OpenEtablishment=Open establishment
|
|||||||
CloseEtablishment=Close establishment
|
CloseEtablishment=Close establishment
|
||||||
# Dictionary
|
# Dictionary
|
||||||
DictionaryPublicHolidays=Leave - Public holidays
|
DictionaryPublicHolidays=Leave - Public holidays
|
||||||
DictionaryDepartment=HRM - Department list
|
DictionaryDepartment=HRM - Organizational Unit
|
||||||
DictionaryFunction=HRM - Job positions
|
DictionaryFunction=HRM - Job positions
|
||||||
# Module
|
# Module
|
||||||
Employees=Employees
|
Employees=Employees
|
||||||
|
|||||||
@ -265,6 +265,7 @@ ProductBarcodeDoesNotExist=Product with barcode does not exist
|
|||||||
WarehouseId=Warehouse ID
|
WarehouseId=Warehouse ID
|
||||||
WarehouseRef=Warehouse Ref
|
WarehouseRef=Warehouse Ref
|
||||||
SaveQtyFirst=Save the real inventoried quantities first, before asking creation of the stock movement.
|
SaveQtyFirst=Save the real inventoried quantities first, before asking creation of the stock movement.
|
||||||
|
ToStart=Start
|
||||||
InventoryStartedShort=Started
|
InventoryStartedShort=Started
|
||||||
ErrorOnElementsInventory=Operation canceled for the following reason:
|
ErrorOnElementsInventory=Operation canceled for the following reason:
|
||||||
ErrorCantFindCodeInInventory=Can't find the following code in inventory
|
ErrorCantFindCodeInInventory=Can't find the following code in inventory
|
||||||
|
|||||||
@ -12,7 +12,7 @@ OpenEtablishment=Etablissement ouvert
|
|||||||
CloseEtablishment=Etablissement fermé
|
CloseEtablishment=Etablissement fermé
|
||||||
# Dictionary
|
# Dictionary
|
||||||
DictionaryPublicHolidays=Congés - jours fériés
|
DictionaryPublicHolidays=Congés - jours fériés
|
||||||
DictionaryDepartment=GRH - Liste des départements
|
DictionaryDepartment=GRH - Liste des départements organisationnels
|
||||||
DictionaryFunction=GRH - Liste des fonctions
|
DictionaryFunction=GRH - Liste des fonctions
|
||||||
# Module
|
# Module
|
||||||
Employees=Salariés
|
Employees=Salariés
|
||||||
|
|||||||
@ -411,7 +411,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
// Validate
|
// Validate
|
||||||
if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_CANCELED) {
|
if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_CANCELED) {
|
||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("Start").')</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("ToStart").')</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user