mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-02 03:19:27 +00:00
reload Vertragsstatus if change of mitarbeiter
This commit is contained in:
@@ -75,8 +75,20 @@ class Vertraege extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
}
|
||||
|
||||
public function getStatiOfContract($vertrag_id)
|
||||
public function getStatiOfContract($person_id, $vertrag_id)
|
||||
{
|
||||
//check if vertrag_id corresponds with person_id and return null if not
|
||||
$result = $this->VertragModel->loadWhere(
|
||||
array(
|
||||
'vertrag_id' => $vertrag_id,
|
||||
'person_id' => $person_id
|
||||
)
|
||||
);
|
||||
if(!hasData($result))
|
||||
{
|
||||
$this->terminateWithSuccess([]);
|
||||
}
|
||||
|
||||
$result = $this->VertragModel->getStatiOfContract($vertrag_id);
|
||||
|
||||
if (isError($result)) {
|
||||
|
||||
Reference in New Issue
Block a user