From 478ac22b53910d92acd0e5263a1b7c19bf74c284 Mon Sep 17 00:00:00 2001 From: Kamran Biglari Date: Sat, 24 Aug 2024 00:34:01 +0100 Subject: [PATCH] Update GoodsDelivery.php --- src/Picqer/Financials/Exact/GoodsDelivery.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Picqer/Financials/Exact/GoodsDelivery.php b/src/Picqer/Financials/Exact/GoodsDelivery.php index 5348befd..027573b3 100644 --- a/src/Picqer/Financials/Exact/GoodsDelivery.php +++ b/src/Picqer/Financials/Exact/GoodsDelivery.php @@ -77,4 +77,12 @@ class GoodsDelivery extends Model ]; protected $url = 'salesorder/GoodsDeliveries'; + + public function getGoodsDeliveryLines() + { + if (array_key_exists('__deferred', $this->attributes['GoodsDeliveryLines'])) { + $this->attributes['GoodsDeliveryLines'] = (new GoodsDeliveryLine($this->connection()))->filter("EntryID eq guid'{$this->EntryID}'"); + } + return $this->attributes['GoodsDeliveryLines']; + } }