new: make invoice still keep the old addresses when their address gets deleted in profile

This commit is contained in:
Valentin Lab
2025-10-04 12:39:13 +02:00
parent 5cc43bc889
commit 7c796802be
3 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ class Order extends Model
public function delivery_address(): BelongsTo
{
return $this->belongsTo(CustomerAddress::class, 'delivery_address_id');
return $this->belongsTo(CustomerAddress::class, 'delivery_address_id')->withTrashed();
}
public function delivery(): BelongsTo