Merge pull request #2383 from aspangaro/3.7-patch4
FIXED: Remove condition to show accountancy field on user.
This commit is contained in:
commit
081875c4d9
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -984,6 +984,15 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '<input size="8" type="text" name="weeklyhours" value="'.GETPOST('weeklyhours').'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
print '<input size="30" type="text" name="accountancy_code" value="'.GETPOST('accountancy_code').'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// User color
|
||||
if (! empty($conf->agenda->enabled))
|
||||
@ -1127,7 +1136,7 @@ else
|
||||
*/
|
||||
if ($action != 'edit')
|
||||
{
|
||||
$rowspan=17;
|
||||
$rowspan=19;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -1323,13 +1332,12 @@ else
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
if (! empty($conf->global->USER_ENABLE_ACCOUNTANCY_CODE)) // For the moment field is not used so must not appeared.
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
$rowspan++;
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="2">'.$object->accountancy_code.'</td>';
|
||||
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="2">'.$object->accountancy_code.'</td>';
|
||||
}
|
||||
|
||||
|
||||
// Color user
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
@ -1658,7 +1666,7 @@ else
|
||||
*/
|
||||
if ($action == 'edit' && ($canedituser || $caneditfield || $caneditpassword || ($user->id == $object->id)))
|
||||
{
|
||||
$rowspan=15;
|
||||
$rowspan=16;
|
||||
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
if (! empty($conf->adherent->enabled)) $rowspan++;
|
||||
@ -2025,23 +2033,23 @@ else
|
||||
print "</tr>\n";
|
||||
|
||||
// Accountancy code
|
||||
if (! empty($conf->global->USER_ENABLE_ACCOUNTANCY_CODE)) // For the moment field is not used so must not appeared.
|
||||
{
|
||||
print "<tr>";
|
||||
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||
print $object->accountancy_code;
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
}
|
||||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print "<tr>";
|
||||
print '<td valign="top">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield)
|
||||
{
|
||||
print '<input size="30" type="text" class="flat" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="accountancy_code" value="'.$object->accountancy_code.'">';
|
||||
print $object->accountancy_code;
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// User color
|
||||
if (! empty($conf->agenda->enabled))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user