Add closed_at field to order serialization

The `closed_at` field is now included when serializing order data. This provides additional context regarding the closure state of invoices in the order, enhancing data accessibility and utility.
This commit is contained in:
Jepp9350
2025-03-03 17:24:12 +01:00
parent 9e46140373
commit bad6a62a5a
+1
View File
@@ -153,6 +153,7 @@ class orders_o extends db
'created_at' => $this->created_at->value(),
'deleted_at' => $this->deleted_at->value(),
'invoice_collection_id' => (int)$this->invoice_collection_id->value(),
'closed_at' => (int)$this->invoice_collection_id->value() ? (new collected_order_invoices_o())->select((int)$this->invoice_collection_id->value())->closed_at->value() : null,
];
}