diff --git a/src/Picqer/Financials/Exact/PurchaseOrder.php b/src/Picqer/Financials/Exact/PurchaseOrder.php index 7ca7cb10..e50c68ad 100644 --- a/src/Picqer/Financials/Exact/PurchaseOrder.php +++ b/src/Picqer/Financials/Exact/PurchaseOrder.php @@ -159,4 +159,13 @@ public function addItem(array $array) } $this->attributes['PurchaseOrderLines'][] = $array; } + + public function getPurchaseOrderLines($select = '') + { + if (array_key_exists('__deferred', $this->attributes['PurchaseOrderLines'])) { + $this->attributes['PurchaseOrderLines'] = (new PurchaseOrderLine($this->connection()))->filter("PurchaseOrderID eq guid'{$this->PurchaseOrderID}'", '', $select); + } + + return $this->attributes['PurchaseOrderLines']; + } }