feat: remove global scope for ordered in raw material and product stock queries
This commit is contained in:
parent
636508c5c0
commit
11557d0b85
@ -709,6 +709,7 @@ public function getProfitMetrics(?Carbon $startDate = null, ?Carbon $endDate = n
|
||||
public function getRawMaterialStock(): array
|
||||
{
|
||||
$prices = RawMaterialPrice::query()
|
||||
->withoutGlobalScope('ordered')
|
||||
->join('raw_materials', 'raw_material_prices.raw_material_id', '=', 'raw_materials.id')
|
||||
->selectRaw('
|
||||
raw_materials.unit,
|
||||
@ -736,6 +737,7 @@ public function getRawMaterialStock(): array
|
||||
public function getProductStock(): array
|
||||
{
|
||||
$variants = ProductVariant::query()
|
||||
->withoutGlobalScope('ordered')
|
||||
->join('products', 'product_variants.product_id', '=', 'products.id')
|
||||
->where('products.status', ProductStatus::ACTIVE)
|
||||
->selectRaw('
|
||||
|
||||
Loading…
Reference in New Issue
Block a user