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;