mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
change datum_von of benutzerfunktion if vb gueltig_ab is earlier
This commit is contained in:
@@ -47,6 +47,14 @@ class VertragsbestandteilFunktion extends Vertragsbestandteil
|
||||
'updateamum' => strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'updatevon' => getAuthUID()
|
||||
);
|
||||
|
||||
$curbfres = $this->CI->BenutzerfunktionModel->load($this->getBenutzerfunktion_id());
|
||||
$curbf = (getData($curbfres))[0];
|
||||
if( $curbf && ($this->getVon() < $curbf->datum_von) )
|
||||
{
|
||||
$data->datum_von = $this->getVon();
|
||||
}
|
||||
|
||||
$ret = $this->CI->BenutzerfunktionModel->update($this->getBenutzerfunktion_id(), $data);
|
||||
|
||||
if(isError($ret) )
|
||||
|
||||
Reference in New Issue
Block a user