mirror of
				https://github.com/grocy/grocy.git
				synced 2025-10-31 18:49:38 +00:00 
			
		
		
		
	Typo...
This commit is contained in:
		| @@ -1,5 +1,5 @@ | |||||||
| ALTER TABLE products | ALTER TABLE products | ||||||
| ADD cumulate_min_stock_amount_of_subproducts TINYINT DEFAULT 0; | ADD cumulate_min_stock_amount_of_sub_products TINYINT DEFAULT 0; | ||||||
|  |  | ||||||
| DROP VIEW stock_missing_products; | DROP VIEW stock_missing_products; | ||||||
| CREATE VIEW stock_missing_products | CREATE VIEW stock_missing_products | ||||||
| @@ -15,7 +15,7 @@ FROM products p | |||||||
| LEFT JOIN stock_current s | LEFT JOIN stock_current s | ||||||
| 	ON p.id = s.product_id | 	ON p.id = s.product_id | ||||||
| WHERE p.min_stock_amount != 0 | WHERE p.min_stock_amount != 0 | ||||||
| 	AND p.cumulate_min_stock_amount_of_subproducts = 0 | 	AND p.cumulate_min_stock_amount_of_sub_products = 0 | ||||||
| GROUP BY p.id | GROUP BY p.id | ||||||
| HAVING IFNULL(SUM(s.amount), 0) < p.min_stock_amount | HAVING IFNULL(SUM(s.amount), 0) < p.min_stock_amount | ||||||
|  |  | ||||||
| @@ -35,7 +35,7 @@ JOIN products sub_p | |||||||
| LEFT JOIN stock_current s | LEFT JOIN stock_current s | ||||||
| 	ON pr.sub_product_id = s.product_id | 	ON pr.sub_product_id = s.product_id | ||||||
| WHERE sub_p.min_stock_amount != 0 | WHERE sub_p.min_stock_amount != 0 | ||||||
| 	AND p.cumulate_min_stock_amount_of_subproducts = 1 | 	AND p.cumulate_min_stock_amount_of_sub_products = 1 | ||||||
| GROUP BY p.id | GROUP BY p.id | ||||||
| HAVING IFNULL(SUM(s.amount), 0) < SUM(sub_p.min_stock_amount) | HAVING IFNULL(SUM(s.amount), 0) < SUM(sub_p.min_stock_amount) | ||||||
|  |  | ||||||
| @@ -55,7 +55,7 @@ JOIN products sub_p | |||||||
| LEFT JOIN stock_current s | LEFT JOIN stock_current s | ||||||
| 	ON pr.sub_product_id = s.product_id | 	ON pr.sub_product_id = s.product_id | ||||||
| WHERE sub_p.min_stock_amount != 0 | WHERE sub_p.min_stock_amount != 0 | ||||||
| 	AND p.cumulate_min_stock_amount_of_subproducts = 0 | 	AND p.cumulate_min_stock_amount_of_sub_products = 0 | ||||||
| GROUP BY sub_p.id | GROUP BY sub_p.id | ||||||
| HAVING IFNULL(SUM(s.amount), 0) < sub_p.min_stock_amount; | HAVING IFNULL(SUM(s.amount), 0) < sub_p.min_stock_amount; | ||||||
|  |  | ||||||
| @@ -75,7 +75,7 @@ FROM products p | |||||||
| LEFT JOIN stock_current s | LEFT JOIN stock_current s | ||||||
| 	ON p.id = s.product_id | 	ON p.id = s.product_id | ||||||
| WHERE p.min_stock_amount != 0 | WHERE p.min_stock_amount != 0 | ||||||
| 	AND p.cumulate_min_stock_amount_of_subproducts = 0 | 	AND p.cumulate_min_stock_amount_of_sub_products = 0 | ||||||
| GROUP BY p.id | GROUP BY p.id | ||||||
| HAVING IFNULL(SUM(s.amount), 0) < p.min_stock_amount | HAVING IFNULL(SUM(s.amount), 0) < p.min_stock_amount | ||||||
|  |  | ||||||
| @@ -95,7 +95,7 @@ JOIN products sub_p | |||||||
| LEFT JOIN stock_current s | LEFT JOIN stock_current s | ||||||
| 	ON pr.sub_product_id = s.product_id | 	ON pr.sub_product_id = s.product_id | ||||||
| WHERE sub_p.min_stock_amount != 0 | WHERE sub_p.min_stock_amount != 0 | ||||||
| 	AND p.cumulate_min_stock_amount_of_subproducts = 1 | 	AND p.cumulate_min_stock_amount_of_sub_products = 1 | ||||||
| GROUP BY p.id | GROUP BY p.id | ||||||
| HAVING IFNULL(SUM(s.amount), 0) < SUM(sub_p.min_stock_amount) | HAVING IFNULL(SUM(s.amount), 0) < SUM(sub_p.min_stock_amount) | ||||||
|  |  | ||||||
| @@ -115,6 +115,6 @@ JOIN products sub_p | |||||||
| LEFT JOIN stock_current s | LEFT JOIN stock_current s | ||||||
| 	ON pr.sub_product_id = s.product_id | 	ON pr.sub_product_id = s.product_id | ||||||
| WHERE sub_p.min_stock_amount != 0 | WHERE sub_p.min_stock_amount != 0 | ||||||
| 	AND p.cumulate_min_stock_amount_of_subproducts = 0 | 	AND p.cumulate_min_stock_amount_of_sub_products = 0 | ||||||
| GROUP BY sub_p.id | GROUP BY sub_p.id | ||||||
| HAVING IFNULL(SUM(s.amount), 0) < sub_p.min_stock_amount; | HAVING IFNULL(SUM(s.amount), 0) < sub_p.min_stock_amount; | ||||||
|   | |||||||
| @@ -100,9 +100,9 @@ | |||||||
|  |  | ||||||
| 			<div class="form-group"> | 			<div class="form-group"> | ||||||
| 				<div class="form-check"> | 				<div class="form-check"> | ||||||
| 					<input type="hidden" name="cumulate_min_stock_amount_of_subproducts" value="0"> | 					<input type="hidden" name="cumulate_min_stock_amount_of_sub_products" value="0"> | ||||||
| 					<input @if($mode == 'edit' && $product->cumulate_min_stock_amount_of_subproducts == 1) checked @endif class="form-check-input" type="checkbox" id="cumulate_min_stock_amount_of_subproducts" name="cumulate_min_stock_amount_of_subproducts" value="1"> | 					<input @if($mode == 'edit' && $product->cumulate_min_stock_amount_of_sub_products == 1) checked @endif class="form-check-input" type="checkbox" id="cumulate_min_stock_amount_of_sub_products" name="cumulate_min_stock_amount_of_sub_products" value="1"> | ||||||
| 					<label class="form-check-label" for="cumulate_min_stock_amount_of_subproducts">{{ $__t('Accumulate sub products min. stock amount') }} | 					<label class="form-check-label" for="cumulate_min_stock_amount_of_sub_products">{{ $__t('Accumulate sub products min. stock amount') }} | ||||||
| 						<span class="text-muted small">{{ $__t('If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be "missing", only this product') }}</span> | 						<span class="text-muted small">{{ $__t('If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be "missing", only this product') }}</span> | ||||||
| 					</label> | 					</label> | ||||||
| 				</div> | 				</div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user