From 0e5da1850ddc2e5a2b5a6626a7083b0b184d9a38 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 23 Feb 2023 13:06:04 +0100 Subject: [PATCH] Contract WIP --- application/Contract/Contract.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/Contract/Contract.php b/application/Contract/Contract.php index 7cdda9229..8700b0b20 100644 --- a/application/Contract/Contract.php +++ b/application/Contract/Contract.php @@ -208,6 +208,11 @@ class Contract extends mfBaseModel { return $this->journals; } + if($name == "journals") { + $this->journals = array_reverse(ContractjournalModel::search(["contract_id" => $this->id])); + return $this->journals; + } + if($name == "links") { $this->links = ContractLinkModel::includesContractId($this->id, ["type" => $link]); //var_dump($this->links);exit;