FIX code
This commit is contained in:
parent
c904b8030c
commit
f7bb7df6c7
@ -215,9 +215,9 @@ if (empty($reshook)) {
|
|||||||
$object->salaryextra = GETPOST("salaryextra") != '' ? GETPOST("salaryextra") : '';
|
$object->salaryextra = GETPOST("salaryextra") != '' ? GETPOST("salaryextra") : '';
|
||||||
$object->weeklyhours = GETPOST("weeklyhours") != '' ? GETPOST("weeklyhours") : '';
|
$object->weeklyhours = GETPOST("weeklyhours") != '' ? GETPOST("weeklyhours") : '';
|
||||||
|
|
||||||
$date = dol_mktime(0, 0, 0, GETPOST('dateemploymentmonth'), GETPOST('dateemploymentday'), GETPOST('dateemploymentyear'));
|
|
||||||
$object->color = GETPOST("color") != '' ? GETPOST("color") : '';
|
$object->color = GETPOST("color") != '' ? GETPOST("color") : '';
|
||||||
$object->dateemployment = $date != '' ? $date : '';
|
$dateemployment = dol_mktime(0, 0, 0, GETPOST('dateemploymentmonth'), GETPOST('dateemploymentday'), GETPOST('dateemploymentyear'));
|
||||||
|
$object->dateemployment = $dateemployment;
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||||
@ -359,8 +359,8 @@ if (empty($reshook)) {
|
|||||||
$object->weeklyhours = GETPOST("weeklyhours") != '' ? GETPOST("weeklyhours") : '';
|
$object->weeklyhours = GETPOST("weeklyhours") != '' ? GETPOST("weeklyhours") : '';
|
||||||
|
|
||||||
$object->color = GETPOST("color") != '' ? GETPOST("color") : '';
|
$object->color = GETPOST("color") != '' ? GETPOST("color") : '';
|
||||||
$date = dol_mktime(0, 0, 0, GETPOST('dateemploymentmonth'), GETPOST('dateemploymentday'), GETPOST('dateemploymentyear'));
|
$dateemployment = dol_mktime(0, 0, 0, GETPOST('dateemploymentmonth'), GETPOST('dateemploymentday'), GETPOST('dateemploymentyear'));
|
||||||
$object->dateemployment = $date != '' ? $date : '';
|
$object->dateemployment = $dateemployment;
|
||||||
|
|
||||||
if (! empty($conf->multicompany->enabled))
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
@ -1426,7 +1426,7 @@ else
|
|||||||
// Date employment
|
// Date employment
|
||||||
print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
|
print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $object->dateemployment;
|
print dol_print_date($object->dateemployment);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
@ -289,7 +289,7 @@ class User extends CommonObject
|
|||||||
$this->salaryextra = $obj->salaryextra;
|
$this->salaryextra = $obj->salaryextra;
|
||||||
$this->weeklyhours = $obj->weeklyhours;
|
$this->weeklyhours = $obj->weeklyhours;
|
||||||
$this->color = $obj->color;
|
$this->color = $obj->color;
|
||||||
$this->dateemployment = $obj->dateemployment;
|
$this->dateemployment = $this->db->jdate($obj->dateemployment);
|
||||||
|
|
||||||
$this->datec = $this->db->jdate($obj->datec);
|
$this->datec = $this->db->jdate($obj->datec);
|
||||||
$this->datem = $this->db->jdate($obj->datem);
|
$this->datem = $this->db->jdate($obj->datem);
|
||||||
@ -1305,11 +1305,7 @@ class User extends CommonObject
|
|||||||
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
|
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
|
||||||
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
|
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
|
||||||
$sql.= ", color = '".$this->db->escape($this->color)."'";
|
$sql.= ", color = '".$this->db->escape($this->color)."'";
|
||||||
if (!empty($this->dateemployment)) {
|
$sql.= ", dateemployment=".(strval($this->dateemployment)!='' ? "'".$this->db->idate($this->dateemployment)."'" : 'null');
|
||||||
$sql.= ", dateemployment = '".$this->db->idate($this->dateemployment)."'";
|
|
||||||
} else {
|
|
||||||
$sql.= ", dateemployment = NULL";
|
|
||||||
}
|
|
||||||
$sql.= ", note = '".$this->db->escape($this->note)."'";
|
$sql.= ", note = '".$this->db->escape($this->note)."'";
|
||||||
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
|
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
|
||||||
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");
|
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user