From 7d7630d4880021fe3e5b597a7159233a5469339b Mon Sep 17 00:00:00 2001 From: teiling88 Date: Thu, 15 Feb 2024 18:03:13 +0100 Subject: [PATCH 1/2] 47 - fix missing property --- src/Invoice/InvoiceEntity.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Invoice/InvoiceEntity.php b/src/Invoice/InvoiceEntity.php index 233510a..72dd1eb 100644 --- a/src/Invoice/InvoiceEntity.php +++ b/src/Invoice/InvoiceEntity.php @@ -128,6 +128,10 @@ class InvoiceEntity public $documentUrl; + public $startDate; + + public $endDate; + public const FIELD_MAPPING = [ 'INVOICE_ID' => 'invoiceId', 'TYPE' => 'type', @@ -183,6 +187,8 @@ class InvoiceEntity 'PAYMENTS' => 'payments', 'PAYMENT_INFO' => 'paymentInfo', 'DOCUMENT_URL' => 'documentUrl', + 'START_DATE' => 'startDate', + 'END_DATE' => 'endDate', ]; public const XML_FIELD_MAPPING = [ @@ -240,9 +246,11 @@ class InvoiceEntity 'payments' => 'PAYMENTS', 'paymentInfo' => 'PAYMENT_INFO', 'documentUrl' => 'DOCUMENT_URL', + 'startDate' => 'START_DATE', + 'endDate' => 'END_DATE', ]; - public function __construct(\SimpleXMLElement $data = null) + public function __construct(?\SimpleXMLElement $data = null) { if ($data) { $this->setData($data); From 8ad6a4a9ac311540aab3d72082aa2c5c920e7dce Mon Sep 17 00:00:00 2001 From: Krzysztof Daniel Date: Thu, 15 Feb 2024 19:25:20 +0100 Subject: [PATCH 2/2] Add missing filters to Invoice --- src/Invoice/InvoiceSearchStruct.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Invoice/InvoiceSearchStruct.php b/src/Invoice/InvoiceSearchStruct.php index b60f986..109900d 100644 --- a/src/Invoice/InvoiceSearchStruct.php +++ b/src/Invoice/InvoiceSearchStruct.php @@ -27,11 +27,17 @@ public function setCustomerIdFilter(int $customerId) $this->filters['CUSTOMER_ID'] = $customerId; } - public function setProjectIdFilter(string $month) + /** + * @Deprecated + */ + public function setMonthFilter(string $month) { $this->filters['MONTH'] = $month; } + /** + * @Deprecated + */ public function setYearFilter(string $year) { $this->filters['YEAR'] = $year; @@ -47,6 +53,26 @@ public function setEndDueDateFilter(string $endDueDate) $this->filters['END_DUE_DATE'] = $endDueDate; } + public function setStartPaidDateFilter(string $startPaidDate) + { + $this->filters['START_PAID_DATE'] = $startPaidDate; + } + + public function setEndPaidDateFilter(string $endPaidDate) + { + $this->filters['END_PAID_DATE'] = $endPaidDate; + } + + public function setStartDate(string $startDate) + { + $this->filters['START_DATE'] = $startDate; + } + + public function setEndDateFilter(string $endDate) + { + $this->filters['END_DATE'] = $endDate; + } + public function setTypeFilter(string $type) { $this->filters['TYPE'] = $type;