From 00799f2f642948bdfe59aab0427db0a85938c743 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 8 Feb 2021 17:35:34 +0100 Subject: [PATCH] Adapted: Ordered Notizen to retrieve last inserted first Signed-off-by: cris-technikum --- application/models/person/Notiz_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index 29e11c1df..2e09875d8 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -208,7 +208,7 @@ class Notiz_model extends DB_Model } /** - * Get Notiz by Anrechnung and title + * Get Notizen by Anrechnung and title ordered last first * * @param $anrechnung_id * @return array @@ -216,6 +216,7 @@ class Notiz_model extends DB_Model public function getNotizByAnrechnung($anrechnung_id, $titel = null) { $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); + $this->addOrder('insertamum', 'DESC'); if (is_string($titel)) {