From 5db833fae03dcbcc3c31a8e075837f2514a49714 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 23 Nov 2025 20:32:05 +1100 Subject: [PATCH] Roll back types for is_deleted --- app/Models/Project.php | 2 +- app/Models/PurchaseOrder.php | 2 +- app/Models/RecurringInvoice.php | 2 +- app/Services/EDocument/Standards/Peppol.php | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Models/Project.php b/app/Models/Project.php index 91d74bb217..790c2fa6d1 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -126,7 +126,7 @@ class Project extends BaseModel 'name' => ctrans('texts.project') . " " . $this->number . ' | ' . $this->name . " | " . $this->client->present()->name(), 'hashed_id' => $this->hashed_id, 'number' => (string)$this->number, - 'is_deleted' => (bool)$this->is_deleted, + 'is_deleted' => $this->is_deleted, 'task_rate' => (float) $this->task_rate, 'budgeted_hours' => (float) $this->budgeted_hours, 'due_date' => $this->due_date, diff --git a/app/Models/PurchaseOrder.php b/app/Models/PurchaseOrder.php index a7855d1eab..1093088bb9 100644 --- a/app/Models/PurchaseOrder.php +++ b/app/Models/PurchaseOrder.php @@ -234,7 +234,7 @@ class PurchaseOrder extends BaseModel 'name' => ctrans('texts.purchase_order') . " " . $this->number . " | " . $this->vendor->present()->name() . ' | ' . Number::formatMoney($this->amount, $this->company) . ' | ' . $this->translateDate($this->date, $this->company->date_format(), $locale), 'hashed_id' => $this->hashed_id, 'number' => (string)$this->number, - 'is_deleted' => (bool)$this->is_deleted, + 'is_deleted' => $this->is_deleted, 'amount' => (float) $this->amount, 'balance' => (float) $this->balance, 'due_date' => $this->due_date, diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index bb0dea8cb0..85dbe389d2 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -330,7 +330,7 @@ class RecurringInvoice extends BaseModel 'name' => ctrans('texts.recurring_invoice') . " " . $this->number . " | " . $this->client->present()->name() . ' | ' . Number::formatMoney($this->amount, $this->company) . ' | ' . $this->translateDate($this->date, $this->company->date_format(), $locale), 'hashed_id' => $this->hashed_id, 'number' => (string)$this->number, - 'is_deleted' => (bool)$this->is_deleted, + 'is_deleted' => $this->is_deleted, 'amount' => (float) $this->amount, 'balance' => (float) $this->balance, 'due_date' => $this->due_date, diff --git a/app/Services/EDocument/Standards/Peppol.php b/app/Services/EDocument/Standards/Peppol.php index 4944ff45dc..1c6997d2da 100644 --- a/app/Services/EDocument/Standards/Peppol.php +++ b/app/Services/EDocument/Standards/Peppol.php @@ -1344,7 +1344,9 @@ class Peppol extends AbstractService } - if (isset($this->invoice->e_invoice->Invoice->InvoicePeriod[0])) { + if (isset($this->invoice->e_invoice->Invoice->InvoicePeriod[0]) && + isset($this->invoice->e_invoice->Invoice->InvoicePeriod[0]->StartDate) && + isset($this->invoice->e_invoice->Invoice->InvoicePeriod[0]->EndDate)) { $ip = new \InvoiceNinja\EInvoice\Models\Peppol\PeriodType\InvoicePeriod(); $ip->StartDate = new \DateTime($this->invoice->e_invoice->Invoice->InvoicePeriod[0]->StartDate); $ip->EndDate = new \DateTime($this->invoice->e_invoice->Invoice->InvoicePeriod[0]->EndDate);