feat: update relationships in models to include trashed records for CuttingMaterial, OrderItem, ProductVariant, and RestockItem
This commit is contained in:
parent
1e1f195f2d
commit
e1a0d25c3c
@ -50,7 +50,7 @@ public function cutting(): BelongsTo
|
|||||||
|
|
||||||
public function rawMaterialPrice(): BelongsTo
|
public function rawMaterialPrice(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(RawMaterialPrice::class);
|
return $this->belongsTo(RawMaterialPrice::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function user(): BelongsTo
|
public function user(): BelongsTo
|
||||||
|
|||||||
@ -69,7 +69,7 @@ public function order(): BelongsTo
|
|||||||
|
|
||||||
public function productVariant(): BelongsTo
|
public function productVariant(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(ProductVariant::class);
|
return $this->belongsTo(ProductVariant::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function user(): BelongsTo
|
public function user(): BelongsTo
|
||||||
|
|||||||
@ -68,7 +68,7 @@ public function orderItems(): HasMany
|
|||||||
|
|
||||||
public function product(): BelongsTo
|
public function product(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Product::class);
|
return $this->belongsTo(Product::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function productPrices(): HasMany
|
public function productPrices(): HasMany
|
||||||
|
|||||||
@ -41,7 +41,7 @@ protected function formattedUnitPrice(): Attribute
|
|||||||
|
|
||||||
public function productVariant(): BelongsTo
|
public function productVariant(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(ProductVariant::class);
|
return $this->belongsTo(ProductVariant::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function restock(): BelongsTo
|
public function restock(): BelongsTo
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user