Add column for birth place

This commit is contained in:
Laurent Destailleur 2022-11-02 02:19:26 +01:00
parent 59809eb50a
commit 2e8f0b77be
3 changed files with 9 additions and 5 deletions

View File

@ -368,3 +368,6 @@ ALTER TABLE llx_prelevement_facture_demande RENAME TO llx_prelevement_demande;
ALTER TABLE llx_prelevement ADD COLUMN fk_salary INTEGER NULL AFTER fk_facture_fourn; ALTER TABLE llx_prelevement ADD COLUMN fk_salary INTEGER NULL AFTER fk_facture_fourn;
ALTER TABLE llx_prelevement_demande ADD COLUMN fk_salary INTEGER NULL AFTER fk_facture_fourn; ALTER TABLE llx_prelevement_demande ADD COLUMN fk_salary INTEGER NULL AFTER fk_facture_fourn;
ALTER TABLE llx_user ADD COLUMN birth_place varchar(64);

View File

@ -50,6 +50,7 @@ create table llx_user
fk_state integer DEFAULT 0, fk_state integer DEFAULT 0,
fk_country integer DEFAULT 0, fk_country integer DEFAULT 0,
birth date, -- birthday birth date, -- birthday
birth_place varchar(64), -- birth place (town)
job varchar(128), job varchar(128),
office_phone varchar(20), office_phone varchar(20),
office_fax varchar(20), office_fax varchar(20),

View File

@ -1290,7 +1290,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print "</tr>\n"; print "</tr>\n";
// Date employment // Date employment
print '<tr><td>'.$langs->trans("DateEmployment").'</td>'; print '<tr><td>'.$langs->trans("DateOfEmployment").'</td>';
print '<td>'; print '<td>';
print $form->selectDate($dateemployment, 'dateemployment', 0, 0, 1, 'formdateemployment', 1, 1); print $form->selectDate($dateemployment, 'dateemployment', 0, 0, 1, 'formdateemployment', 1, 1);
@ -2307,25 +2307,25 @@ if ($action == 'create' || $action == 'adduserldap') {
if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', '&nbsp;'); print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', '&nbsp;');
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
if ($object->ldap_sid) { if ($object->ldap_sid) {
print ' ('.$langs->trans("DomainUser").')'; print ' ('.$langs->trans("DomainUser").')';
} }
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
if ($object->ldap_sid) { if ($object->ldap_sid) {
print ' ('.$langs->trans("DomainUser").')'; print ' ('.$langs->trans("DomainUser").')';
} }
} elseif (!($object->socid > 0) && $object->contact_id > 0) { // internal user with a link to a contact } elseif (!($object->socid > 0) && $object->contact_id > 0) { // internal user with a link to a contact
print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
if ($object->ldap_sid) { if ($object->ldap_sid) {
print ' ('.$langs->trans("DomainUser").')'; print ' ('.$langs->trans("DomainUser").')';
} }
} else { // $object->socid is not > 0 here } else { // $object->socid is not > 0 here
print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set print img_picto('', 'company').$form->select_company(0, 'socid', '', '&nbsp;'); // We keep thirdparty empty, contact is already set
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
} }
} }
print '</td></tr>'; print '</td></tr>';