mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
(bug) filter product is available in admin products list
This commit is contained in:
parent
0abb3641df
commit
de960cf00c
@ -159,8 +159,10 @@ class ProductService
|
||||
|
||||
products = if filters[:stock_from].to_i.positive?
|
||||
products.where('(stock ->> ?)::int >= ?', filters[:stock_type], filters[:stock_from])
|
||||
else
|
||||
elsif !operator&.privileged?
|
||||
products.where('(stock ->> ?)::int >= quantity_min', filters[:stock_type])
|
||||
else
|
||||
products
|
||||
end
|
||||
products = products.where('(stock ->> ?)::int <= ?', filters[:stock_type], filters[:stock_to]) if filters[:stock_to].to_i != 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user