From f4a81892401aea9df86df2223c71f09f289bd8b9 Mon Sep 17 00:00:00 2001 From: Shohrat Date: Thu, 14 Sep 2023 13:58:30 +0500 Subject: [PATCH] Change qty on product resource --- packages/Sarga/API/Http/Resources/Catalog/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index 9a330ab..264790f 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -56,7 +56,7 @@ class Product extends JsonResource 'new' => $this->new, 'featured' => $this->featured, 'qty' => $product->qty, - 'qty2' => $product->inventorySources->qty, + 'qty2' => $product->totalQuantity(), 'status' => $this->status, 'product_number' => $this->product_number, // 'brand' => $product->brand->name ?? '',