add validation for name, used and quantity
This commit is contained in:
parent
4b72d383ea
commit
e73baa2754
4 changed files with 25 additions and 4 deletions
|
|
@ -578,6 +578,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def quantity_left_of(resource)
|
||||
return '-/-' if resource.quantity.blank?
|
||||
"#{resource.quantity - resource.used}/#{resource.quantity}"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue