mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Corrected: No genehmigt_von and update info when Anrechnung is rejected
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -218,29 +218,12 @@ class AnrechnungLib
|
||||
return success(false); // dont reject
|
||||
}
|
||||
|
||||
// Start DB transaction
|
||||
$this->ci->db->trans_start(false);
|
||||
|
||||
// Insert new status approved
|
||||
// Insert new status rejected
|
||||
$result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED);
|
||||
|
||||
// Update genehmigt von
|
||||
$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))
|
||||
if (isError($result))
|
||||
{
|
||||
$this->ci->db->trans_rollback();
|
||||
show_error($result->msg, EXIT_ERROR);
|
||||
show_error(getError($result));
|
||||
}
|
||||
|
||||
return success(true); // rejected
|
||||
|
||||
Reference in New Issue
Block a user