diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index f48974acb02..3086e7d264a 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -141,16 +141,17 @@ function user_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'user'); - if (! empty($conf->hrm->enabled) && $user->rights->hrm->employee->read) + if ((! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) + || (! empty($conf->hrm->enabled) && ! empty($user->rights->hrm->employee->read))) { // Bank $head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id; - $head[$h][1] = $langs->trans("HR"); + $head[$h][1] = $langs->trans("HRAndBank"); $head[$h][2] = 'bank'; $h++; } - //Info on users is visible only by internal user + // Such info on users is visible only by internal user if (empty($user->societe_id)) { // Notes diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 74a0107aedb..3d1ea43f63c 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -45,7 +45,7 @@ class modHRM extends DolibarrModules $this->family = "hr"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace( '/^mod/i', '', get_class($this)); - $this->description = "Management of employees carrier and feelings"; + $this->description = "Management of employees carrier and feelings (department, employment contract)"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'development'; diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index a1f4753b12d..d5e982bcccc 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -54,7 +54,7 @@ class modSalaries extends DolibarrModules // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); // Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) - $this->description = "Employees contracts and salaries management"; + $this->description = "Payment of salaries"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 291169aa30d..1f1e9e53f73 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -74,7 +74,7 @@ print load_fiche_titre($langs->trans("HRMSetup"), $linkback); // Configuration header $head = hrm_admin_prepare_head(); -dol_fiche_head($head, 'establishments', $langs->trans("HRM"), 0, "user"); +dol_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "user"); $sql = "SELECT e.rowid, e.name, e.address, e.zip, e.town, e.status"; $sql.= " FROM ".MAIN_DB_PREFIX."establishment as e"; diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index 7f9ed583b98..f488eb562e5 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -78,7 +78,7 @@ print '
'; print ''; print ''; -dol_fiche_head($head, 'parameters', $langs->trans("HRM"), 0, "user"); +dol_fiche_head($head, 'parameters', $langs->trans("HRM"), -1, "user"); print ''; print ''; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index a171a111889..d449af14972 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -96,6 +96,7 @@ class Establishment extends CommonObject $sql.= ", entity"; $sql.= ", datec"; $sql.= ", fk_user_author"; + $sql.= ", fk_user_mod"; $sql.= ") VALUES ("; $sql.= " '".$this->db->escape($this->name)."'"; $sql.= ", '".$this->db->escape($this->address)."'"; @@ -106,6 +107,7 @@ class Establishment extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", '".$this->db->idate($now)."'"; $sql.= ", ". $user->id; + $sql.= ", ". $user->id; $sql.= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index 1ef523fa607..29b571e58ce 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -44,7 +44,7 @@ if ($id) $head = establishment_prepare_head($object); - dol_fiche_head($head, 'info', $langs->trans("Establishment"), 0, 'building'); + dol_fiche_head($head, 'info', $langs->trans("Establishment"), -1, 'building'); print '
'; dol_print_object_info($object); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1c9ac65e4b8..be7451caffa 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -519,8 +519,8 @@ Module410Name=Webcalendar Module410Desc=Webcalendar integration Module500Name=Special expenses Module500Desc=Management of special expenses (taxes, social or fiscal taxes, dividends) -Module510Name=Employee contracts and salaries -Module510Desc=Management of employees contracts, salaries and payments +Module510Name=Payment of employee wages +Module510Desc=Record and follow payment of your employee wages Module520Name=Loan Module520Desc=Management of loans Module600Name=Notifications @@ -563,7 +563,7 @@ Module2900Desc=GeoIP Maxmind conversions capabilities Module3100Name=Skype Module3100Desc=Add a Skype button into users / third parties / contacts / members cards Module4000Name=HRM -Module4000Desc=Human resources management +Module4000Desc=Human resources management (mangement of department, employee contracts and feelings) Module5000Name=Multi-company Module5000Desc=Allows you to manage multiple companies Module6000Name=Workflow diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index a5f2ddf1e7e..01aa5537c13 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -772,6 +772,7 @@ SetMultiCurrencyCode=Set currency BulkActions=Bulk actions ClickToShowHelp=Click to show tooltip help HR=HR +HRAndBank=HR and Bank # Week day Monday=Monday Tuesday=Tuesday diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index c86ca27bf34..939f7c35aa7 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -24,7 +24,7 @@ /** * \file htdocs/user/bank.php * \ingroup HRM - * \brief BAN tab for users + * \brief Tab for HRM */ require '../main.inc.php'; @@ -47,7 +47,7 @@ $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); if ($user->id == $id) $feature2=''; // A user can always read its own card -$result = restrictedArea($user, 'user', $id, 'user&user', $feature2); +$result = restrictedArea($user, 'salaries|hrm', $id, 'user&user', $feature2); $object = new User($db); if ($id > 0 || ! empty($ref)) @@ -155,14 +155,27 @@ if ($account->id && $action != 'edit') print '
'; + print '
'; + + print ''; + + print ''; + print ''; + + print '
'.$langs->trans("xxx").'
'; + + print '
'; + + print load_fiche_titre($langs->trans("BAN")); + print '
'; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; // Show fields of bank account foreach ($account->getFieldsToShow() as $val) { @@ -182,7 +195,7 @@ if ($account->id && $action != 'edit') } print ''; - print ''; print ''; - print ''; - print '\n"; - print '\n"; - print '\n"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 9249e8f295e..92951de98e8 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1028,6 +1028,8 @@ if (($action == 'create') || ($action == 'adduserldap')) print ''; } + // TODO Move this into tab RH (HierarchicalResponsible must be on both tab) + // Hierarchy print ''; print ''; } - // TODO Move this into RH Tab (visible if RH module on) - + // TODO Move this into tab RH, visible when salarie or RH is visible (HierarchicalResponsible must be on both tab) + // Hierarchy print ''; print '"; } + // TODO Move this into tab RH (HierarchicalResponsible must be on both tab) + // Hierarchy print ''; print '
'.$langs->trans("LabelRIB").''.$account->label.'
'.$account->label.'
'.$langs->trans("BankName").''.$account->bank.'
'.$account->bank.'
'.$langs->trans("IBAN").''.$account->iban . ' '; + print ''.$account->iban . ' '; if (! empty($account->iban)) { if (! checkIbanForAccount($account)) { print img_picto($langs->trans("IbanNotValid"),'warning'); @@ -193,7 +206,7 @@ if ($account->id && $action != 'edit') print '
'.$langs->trans("BIC").''.$account->bic.' '; + print ''.$account->bic.' '; if (! empty($account->bic)) { if (! checkSwiftForAccount($account)) { print img_picto($langs->trans("SwiftNotValid"),'warning'); @@ -203,15 +216,15 @@ if ($account->id && $action != 'edit') } print '
'.$langs->trans("BankAccountDomiciliation").''; + print '
'.$langs->trans("BankAccountDomiciliation").''; print $account->domiciliation; print "
'.$langs->trans("BankAccountOwner").''; + print '
'.$langs->trans("BankAccountOwner").''; print $account->proprio; print "
'.$langs->trans("BankAccountOwnerAddress").''; + print '
'.$langs->trans("BankAccountOwnerAddress").''; print $account->owner_address; print "
'.$langs->trans("HierarchicalResponsible").''; @@ -1264,7 +1266,7 @@ else */ if ($action != 'edit') { - dol_fiche_head($head, 'user', $title, 0, 'user'); + dol_fiche_head($head, 'user', $title, -1, 'user'); dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); @@ -1386,8 +1388,8 @@ else print ''.$object->accountancy_code.'
'.$langs->trans("HierarchicalResponsible").''; @@ -2279,6 +2281,8 @@ else print "
'.$langs->trans("HierarchicalResponsible").'';