2
0
forked from Wavyzz/dolibarr

Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/accountancy/admin/index.php
	htdocs/admin/mailing.php
	htdocs/admin/paymentbybanktransfer.php
	htdocs/admin/prelevement.php
	htdocs/modulebuilder/template/admin/setup.php
This commit is contained in:
Laurent Destailleur
2021-01-24 15:29:53 +01:00
18 changed files with 78 additions and 48 deletions

View File

@@ -3,6 +3,24 @@ English Dolibarr ChangeLog
-------------------------------------------------------------- --------------------------------------------------------------
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
For users:
----------
For developers:
---------------
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
***** ChangeLog for 13.0.0 compared to 12.0.0 ***** ***** ChangeLog for 13.0.0 compared to 12.0.0 *****
For users: For users:

View File

@@ -117,6 +117,7 @@ if ($action == 'setlistsortdone') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -130,6 +131,7 @@ if ($action == 'setmanagezero') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -143,6 +145,7 @@ if ($action == 'setdisabledirectinput') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -156,6 +159,7 @@ if ($action == 'setenabledraftexport') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -169,6 +173,7 @@ if ($action == 'setenablesubsidiarylist') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -182,6 +187,7 @@ if ($action == 'setdisablebindingonsales') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -195,6 +201,7 @@ if ($action == 'setdisablebindingonpurchases') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -208,6 +215,7 @@ if ($action == 'setdisablebindingonexpensereports') {
if (!($res > 0)) { if (!($res > 0)) {
$error++; $error++;
} }
if (!$error) { if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {
@@ -215,9 +223,11 @@ if ($action == 'setdisablebindingonexpensereports') {
} }
} }
/* /*
* View * View
*/ */
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert'); $title = $langs->trans('ConfigAccountingExpert');

View File

@@ -87,7 +87,7 @@ $search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha');
$search_ledger_code = GETPOST('search_ledger_code', 'array'); $search_ledger_code = GETPOST('search_ledger_code', 'array');
$search_lettering_code = GETPOST('search_lettering_code', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha');
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); $search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
// Load variable for pagination // Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
@@ -784,7 +784,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
{ {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>'; print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>'; print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '</td>'; print '</td>';
} }

View File

@@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'array');
$search_debit = GETPOST('search_debit', 'alpha'); $search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha');
$search_lettering_code = GETPOST('search_lettering_code', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha');
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); $search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
$action = 'delbookkeepingyear'; $action = 'delbookkeepingyear';
@@ -516,7 +516,7 @@ if (!empty($arrayfields['t.lettering_code']['checked']))
{ {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>'; print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>'; print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '</td>'; print '</td>';
} }
// Date export // Date export

View File

@@ -74,7 +74,7 @@ $search_ledger_code = GETPOST('search_ledger_code', 'array');
$search_debit = GETPOST('search_debit', 'alpha'); $search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha');
$search_lettering_code = GETPOST('search_lettering_code', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha');
$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); $search_not_reconciled = GETPOST('search_not_reconciled', 'alpha');
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
$action = 'delbookkeepingyear'; $action = 'delbookkeepingyear';
@@ -544,7 +544,7 @@ if (!empty($arrayfields['t.credit']['checked'])) {
if (!empty($arrayfields['t.lettering_code']['checked'])) { if (!empty($arrayfields['t.lettering_code']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>'; print '<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.'"/>';
print '<br><span class="nowrap"><input type="checkbox" name="search_reconciled_option" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>'; print '<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled == 'notreconciled' ? ' checked' : '').'>'.$langs->trans("NotReconciled").'</span>';
print '</td>'; print '</td>';
} }
// Date export // Date export

View File

@@ -36,6 +36,7 @@ $action = GETPOST('action', 'aZ09');
$form = new Form($db); $form = new Form($db);
/* /*
* Actions * Actions
*/ */
@@ -65,8 +66,7 @@ if ($action == 'setvalue')
if (!($res > 0)) $error++; if (!($res > 0)) $error++;
if (!$error) if (!$error) {
{
$db->commit(); $db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else { } else {

View File

@@ -50,8 +50,7 @@ if ($action == "set")
$id = GETPOST('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 'int'); $id = GETPOST('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 'int');
$account = new Account($db); $account = new Account($db);
if ($account->fetch($id) > 0) if ($account->fetch($id) > 0) {
{
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) $error++; if (!($res > 0)) $error++;
/* /*
@@ -70,11 +69,14 @@ if ($action == "set")
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
*/ */
} else $error++; } else {
$error++;
}
/* Moved to account /* Moved to account
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_ICS", GETPOST("PAYMENTBYBANKTRANSFER_ICS"), 'chaine', 0, '', $conf->entity);
if (!($res > 0)) $error++; if (!($res > 0)) $error++;
*/ */
if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0) if (GETPOST("PAYMENTBYBANKTRANSFER_USER") > 0)
{ {
$res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "PAYMENTBYBANKTRANSFER_USER", GETPOST("PAYMENTBYBANKTRANSFER_USER"), 'chaine', 0, '', $conf->entity);

View File

@@ -75,7 +75,6 @@ if ($action == "set")
} else $error++; } else $error++;
/* Moved to account /* Moved to account
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
if (!($res > 0)) $error++; if (!($res > 0)) $error++;
*/ */

View File

@@ -6042,8 +6042,7 @@ abstract class CommonObject
$objectid = $this->id; $objectid = $this->id;
if ($computed) if ($computed) {
{
if (!preg_match('/^search_/', $keyprefix)) return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>'; if (!preg_match('/^search_/', $keyprefix)) return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>';
else return ''; else return '';
} }
@@ -6052,26 +6051,20 @@ abstract class CommonObject
if (empty($morecss) && !empty($val['css'])) { if (empty($morecss) && !empty($val['css'])) {
$morecss = $val['css']; $morecss = $val['css'];
} elseif (empty($morecss)) { } elseif (empty($morecss)) {
if ($type == 'date') if ($type == 'date') {
{
$morecss = 'minwidth100imp'; $morecss = 'minwidth100imp';
} elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id } elseif ($type == 'datetime' || $type == 'link') { // link means an foreign key to another primary id
{
$morecss = 'minwidth200imp'; $morecss = 'minwidth200imp';
} elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) } elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) {
{
$morecss = 'maxwidth75'; $morecss = 'maxwidth75';
} elseif ($type == 'url') { } elseif ($type == 'url') {
$morecss = 'minwidth400'; $morecss = 'minwidth400';
} elseif ($type == 'boolean') } elseif ($type == 'boolean') {
{
$morecss = ''; $morecss = '';
} else { } else {
if (round($size) < 12) if (round($size) < 12) {
{
$morecss = 'minwidth100'; $morecss = 'minwidth100';
} elseif (round($size) <= 48) } elseif (round($size) <= 48) {
{
$morecss = 'minwidth200'; $morecss = 'minwidth200';
} else { } else {
$morecss = 'minwidth400'; $morecss = 'minwidth400';
@@ -6468,13 +6461,13 @@ abstract class CommonObject
if (!preg_match('/search_/', $keyprefix)) { if (!preg_match('/search_/', $keyprefix)) {
if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button if (!empty($param_list_array[2])) { // If the entry into $fields is set to add a create button
if ($this->fields[$key]['picto']) { if (!empty($this->fields[$key]['picto'])) {
$morecss .= ' widthcentpercentminusxx'; $morecss .= ' widthcentpercentminusxx';
} else { } else {
$morecss .= ' widthcentpercentminusx'; $morecss .= ' widthcentpercentminusx';
} }
} else { } else {
if ($this->fields[$key]['picto']) { if (!empty($this->fields[$key]['picto'])) {
$morecss .= ' widthcentpercentminusx'; $morecss .= ' widthcentpercentminusx';
} }
} }

View File

@@ -408,7 +408,7 @@ class FormTicket
{ {
$formproject = new FormProjets($this->db); $formproject = new FormProjets($this->db);
print '<tr><td><label for="project"><span class="">'.$langs->trans("Project").'</span></label></td><td>'; print '<tr><td><label for="project"><span class="">'.$langs->trans("Project").'</span></label></td><td>';
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
print '</td></tr>'; print '</td></tr>';
} }

View File

@@ -1879,7 +1879,7 @@ BackgroundTableLineOddColor=Background color for odd table lines
BackgroundTableLineEvenColor=Background color for even table lines BackgroundTableLineEvenColor=Background color for even table lines
MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay)
NbAddedAutomatically=Number of days added to counters of users (automatically) each month NbAddedAutomatically=Number of days added to counters of users (automatically) each month
EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters. EnterAnyCode=This field contains a reference to identify the line. Enter any value of your choice, but without special characters.
Enter0or1=Enter 0 or 1 Enter0or1=Enter 0 or 1
UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364]
ColorFormat=The RGB color is in HEX format, eg: FF0000 ColorFormat=The RGB color is in HEX format, eg: FF0000
@@ -2095,3 +2095,4 @@ CombinationsSeparator=Separator character for product combinations
SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples SeeLinkToOnlineDocumentation=See link to online documention on top menu for examples
SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF. SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module <b>%s</b> is used, show details of subproducts of a kit on PDF.
AskThisIDToYourBank=Contact your bank to get this ID AskThisIDToYourBank=Contact your bank to get this ID
AdvancedModeOnly=Permision available in Advanced permission mode only

View File

@@ -83,10 +83,9 @@ if ($action == 'updateMask') {
if ($maskconstorder) { if ($maskconstorder) {
$res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
} if (!($res > 0)) {
$error++;
if (!($res > 0)) { }
$error++;
} }
if (!$error) { if (!$error) {

View File

@@ -361,7 +361,7 @@ if ($event->type == 'payout.created') {
} }
} elseif ($event->type == 'payment_method.detached') { } elseif ($event->type == 'payment_method.detached') {
$db->begin(); $db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE ref = '".$db->escape($event->data->object->id)."' and status = ".$servicestatus; $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE number = '".$db->escape($event->data->object->id)."' and status = ".$servicestatus;
$db->query($sql); $db->query($sql);
$db->commit(); $db->commit();
} elseif ($event->type == 'charge.succeeded') { } elseif ($event->type == 'charge.succeeded') {

View File

@@ -115,7 +115,7 @@ class RecruitmentCandidature extends CommonObject
'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,), 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1,),
'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,), 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,),
'email' => array('type'=>'varchar(255)', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1,), 'email' => array('type'=>'varchar(255)', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email'),
'phone' => array('type'=>'varchar(64)', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1,), 'phone' => array('type'=>'varchar(64)', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1,),
'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,), 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,),
'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'), 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'),

View File

@@ -103,13 +103,13 @@ class RecruitmentJobPosition extends CommonObject
'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'csslist'=>'tdoverflowmax300', 'showoncombobox'=>'1', 'autofocusoncreate'=>1), 'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'csslist'=>'tdoverflowmax300', 'showoncombobox'=>'1', 'autofocusoncreate'=>1),
'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp',), 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp'),
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500', 'picto'=>'project'),
'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax150'), 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax150'),
'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail'), 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail', 'picto'=>'email'),
'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid',), 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid',),
'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',), 'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',),
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner",), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'css'=>'maxwidth500', 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner", 'picto'=>'company'),
'date_planned' => array('type'=>'date', 'label'=>'DateExpected', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,), 'date_planned' => array('type'=>'date', 'label'=>'DateExpected', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
'remuneration_suggested' => array('type'=>'varchar(255)', 'label'=>'Remuneration', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>1,), 'remuneration_suggested' => array('type'=>'varchar(255)', 'label'=>'Remuneration', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>1,),
'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>3,), 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>3,),

View File

@@ -1313,11 +1313,11 @@ table[summary="list_of_modules"] .fa-cog {
.minwidth500imp { min-width: 250px !important; } .minwidth500imp { min-width: 250px !important; }
} }
select.widthcentpercentminusx, span.widthcentpercentminusx, input.widthcentpercentminusx { select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection), input.widthcentpercentminusx {
width: calc(100% - 52px) !important; width: calc(100% - 52px) !important;
display: inline-block; display: inline-block;
} }
select.widthcentpercentminusxx, span.widthcentpercentminusxx, input.widthcentpercentminusxx { select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx {
width: calc(100% - 70px) !important; width: calc(100% - 70px) !important;
display: inline-block; display: inline-block;
} }

View File

@@ -637,6 +637,7 @@ if (empty($reshook)) {
if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage';
} }
/* /*
* View * View
*/ */

View File

@@ -325,8 +325,8 @@ if ($result)
// TODO Define familyposition // TODO Define familyposition
$family = $modules[$obj->module]->family_position; $family = $modules[$obj->module]->family_position;
$familyposition = 0; $familyposition = 0;
$sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".$modules[$obj->module]->module_position.","; $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".((int) $modules[$obj->module]->module_position).",";
$sqlupdate .= " family_position = ".$familyposition; $sqlupdate .= " family_position = ".((int) $familyposition);
$sqlupdate .= " WHERE module_position = 0 AND module = '".$db->escape($obj->module)."'"; $sqlupdate .= " WHERE module_position = 0 AND module = '".$db->escape($obj->module)."'";
$db->query($sqlupdate); $db->query($sqlupdate);
} }
@@ -438,9 +438,16 @@ if ($result)
print '<td>&nbsp</td>'; print '<td>&nbsp</td>';
} }
// Label // Label of permission
$permlabel = ($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label))); $permlabel = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $langs->trans($obj->label)));
print '<td class="maxwidthonsmartphone">'.$permlabel.'</td>'; print '<td class="maxwidthonsmartphone">';
print $permlabel;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
if (preg_match('/_advance$/', $obj->perms)) {
print ' <span class="opacitymedium">('.$langs->trans("AdvancedModeOnly").')</span>';
}
}
print '</td>';
// Permission id // Permission id
if ($user->admin) print '<td class="right"><span class="opacitymedium">'.$obj->id.'</span></td>'; if ($user->admin) print '<td class="right"><span class="opacitymedium">'.$obj->id.'</span></td>';