From c1898476e5ce2f8c0584abd2efca42b41bab4a41 Mon Sep 17 00:00:00 2001 From: Cihan ARIK Date: Tue, 9 Dec 2025 23:15:12 +0300 Subject: [PATCH] added methods for getQuotationLines and getQuotationOrderChargeLines those 2 is already existing for SalesOrders but was missing in Quotations --- src/Picqer/Financials/Exact/Quotation.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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']; + } }