mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
Corrected: No genehmigt_von and update info when Anrechnung is rejected
Signed-off-by: cris-technikum <[email protected]>
This commit is contained in:
@@ -218,29 +218,12 @@ class AnrechnungLib
|
|||||||
return success(false); // dont reject
|
return success(false); // dont reject
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start DB transaction
|
// Insert new status rejected
|
||||||
$this->ci->db->trans_start(false);
|
|
||||||
|
|
||||||
// Insert new status approved
|
|
||||||
$result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED);
|
$result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED);
|
||||||
|
|
||||||
// Update genehmigt von
|
if (isError($result))
|
||||||
$result = $this->ci->AnrechnungModel->update(
|
|
||||||
$anrechnung_id,
|
|
||||||
array(
|
|
||||||
'genehmigt_von' => getAuthUID(),
|
|
||||||
'updateamum' => (new DateTime())->format('Y-m-d H:m:i'),
|
|
||||||
'updatevon' => getAuthUID()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Transaction complete!
|
|
||||||
$this->ci->db->trans_complete();
|
|
||||||
|
|
||||||
if ($this->ci->db->trans_status() === false || isError($result))
|
|
||||||
{
|
{
|
||||||
$this->ci->db->trans_rollback();
|
show_error(getError($result));
|
||||||
show_error($result->msg, EXIT_ERROR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return success(true); // rejected
|
return success(true); // rejected
|
||||||
|
|||||||
Reference in New Issue
Block a user