Add reminder to stock column when value is negative [SCI-9564] (#6503)

This commit is contained in:
wandji 2023-10-19 14:57:53 +01:00 committed by GitHub
parent f71cc4755c
commit db48eadd6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ module RepositoryDatatable
end end
end end
if data[:stock_amount].zero? if data[:stock_amount] <= 0
data[:reminder] = true data[:reminder] = true
data[:reminder_text] = I18n.t('repositories.item_card.reminders.stock_empty') data[:reminder_text] = I18n.t('repositories.item_card.reminders.stock_empty')
end end