Skip to content

Commit c189847

Browse files
authored
added methods for getQuotationLines and getQuotationOrderChargeLines
those 2 is already existing for SalesOrders but was missing in Quotations
1 parent b858596 commit c189847

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Picqer/Financials/Exact/Quotation.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,22 @@ public function addItem(array $array)
171171
}
172172
$this->attributes['QuotationLines'][] = $array;
173173
}
174+
175+
public function getQuotationLines()
176+
{
177+
if (array_key_exists('__deferred', $this->attributes['QuotationLines'])) {
178+
$this->attributes['QuotationLines'] = (new QuotationLine($this->connection()))->filter("QuotationID eq guid'{$this->QuotationID}'");
179+
}
180+
181+
return $this->attributes['QuotationLines'];
182+
}
183+
184+
public function getQuotationOrderChargeLines()
185+
{
186+
if (array_key_exists('__deferred', $this->attributes['QuotationOrderChargeLines'])) {
187+
$this->attributes['QuotationOrderChargeLines'] = (new QuotationOrderChargeLine($this->connection()))->filter("QuotationID eq guid'{$this->QuotationID}'");
188+
}
189+
190+
return $this->attributes['QuotationOrderChargeLines'];
191+
}
174192
}

0 commit comments

Comments
 (0)