diff --git a/app/models/article.rb b/app/models/article.rb index b12288b2..92fb1f86 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -41,7 +41,7 @@ class Article < ActiveRecord::Base validates_presence_of :name, :unit, :price, :tax, :deposit, :unit_quantity, :supplier_id, :article_category_id validates_length_of :name, :in => 4..60 validates_length_of :unit, :in => 2..15 - validates_numericality_of :price, :greater_than => 0 + validates_numericality_of :price, :unit_quantity, :greater_than => 0 validates_numericality_of :deposit, :tax # Callbacks diff --git a/config/locales/de.yml b/config/locales/de.yml index d88b83dc..9466a80e 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -127,6 +127,10 @@ de: article: price: Nettopreis gross_price: Bruttopreis + unit: Einheit + unit_quantity: Gebindegröße + tax: MwSt + deposit: Pfand stock_article: price: Nettopreis user: