mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-24 05:38:52 +00:00
Do not show negative remainder when there are no purchases
This commit is contained in:
@@ -50,7 +50,8 @@ module OpenFoodNetwork::Reports
|
||||
end
|
||||
|
||||
def remainder(lis)
|
||||
total_available(lis) - max_quantity_amount(lis)
|
||||
remainder = total_available(lis) - max_quantity_amount(lis)
|
||||
remainder >= 0 ? remainder : ''
|
||||
end
|
||||
|
||||
def max_quantity_amount(lis)
|
||||
|
||||
Reference in New Issue
Block a user