diff --git a/src/Picqer/Financials/Exact/Quotation.php b/src/Picqer/Financials/Exact/Quotation.php index bbb35947..df79215a 100644 --- a/src/Picqer/Financials/Exact/Quotation.php +++ b/src/Picqer/Financials/Exact/Quotation.php @@ -171,4 +171,22 @@ public function addItem(array $array) } $this->attributes['QuotationLines'][] = $array; } + + public function getQuotationLines() + { + if (array_key_exists('__deferred', $this->attributes['QuotationLines'])) { + $this->attributes['QuotationLines'] = (new QuotationLine($this->connection()))->filter("QuotationID eq guid'{$this->QuotationID}'"); + } + + return $this->attributes['QuotationLines']; + } + + public function getQuotationOrderChargeLines() + { + if (array_key_exists('__deferred', $this->attributes['QuotationOrderChargeLines'])) { + $this->attributes['QuotationOrderChargeLines'] = (new QuotationOrderChargeLine($this->connection()))->filter("QuotationID eq guid'{$this->QuotationID}'"); + } + + return $this->attributes['QuotationOrderChargeLines']; + } }