feat: update relationships in models to include trashed records for CuttingMaterial, OrderItem, ProductVariant, and RestockItem

This commit is contained in:
Yoga Pangestu 2026-08-13 00:28:10 +07:00
parent 1e1f195f2d
commit e1a0d25c3c
4 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ public function cutting(): BelongsTo
public function rawMaterialPrice(): BelongsTo
{
return $this->belongsTo(RawMaterialPrice::class);
return $this->belongsTo(RawMaterialPrice::class)->withTrashed();
}
public function user(): BelongsTo

View File

@ -69,7 +69,7 @@ public function order(): BelongsTo
public function productVariant(): BelongsTo
{
return $this->belongsTo(ProductVariant::class);
return $this->belongsTo(ProductVariant::class)->withTrashed();
}
public function user(): BelongsTo

View File

@ -68,7 +68,7 @@ public function orderItems(): HasMany
public function product(): BelongsTo
{
return $this->belongsTo(Product::class);
return $this->belongsTo(Product::class)->withTrashed();
}
public function productPrices(): HasMany

View File

@ -41,7 +41,7 @@ protected function formattedUnitPrice(): Attribute
public function productVariant(): BelongsTo
{
return $this->belongsTo(ProductVariant::class);
return $this->belongsTo(ProductVariant::class)->withTrashed();
}
public function restock(): BelongsTo