From 0c0c5927df77f5828e23e0a853448d3969f3d701 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Tue, 27 Apr 2021 09:01:37 +1000 Subject: [PATCH] Try to fix missing currency for PackingList --- app/models/document.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/document.php b/app/models/document.php index ee477c80..7c6678c7 100755 --- a/app/models/document.php +++ b/app/models/document.php @@ -89,6 +89,11 @@ class Document extends AppModel { $currencyID = $document['OrderAcknowledgement']['currency_id']; $conditions = $this->__getCurrencyConditions($currencyID); return $this->OrderAcknowledgement->Currency->find('first',$conditions); + } + elseif(!empty($document['PackingList']['id'])) { + $currencyID = $document['PackingList']['currency_id']; + $conditions = $this->__getCurrencyConditions($currencyID); + return $this->OrderAcknowledgement->Currency->find('first',$conditions); } }