Fixed deliveries.

This commit is contained in:
benni 2012-10-17 20:45:52 +02:00
parent 552c553b77
commit 9af26e1da6
14 changed files with 184 additions and 225 deletions

View file

@ -1,7 +1,7 @@
class StockChange < ActiveRecord::Base
belongs_to :delivery
belongs_to :order
belongs_to :stock_article
belongs_to :stock_article, with_deleted: true
validates_presence_of :stock_article_id, :quantity
validates_numericality_of :quantity

View file

@ -15,6 +15,7 @@ class Supplier < ActiveRecord::Base
validates :name, :presence => true, :length => { :in => 4..30 }, :uniqueness => true
validates :phone, :presence => true, :length => { :in => 8..20 }
validates :address, :presence => true, :length => { :in => 8..50 }
validates_length_of :order_howto, :note, maximum: 250
# validates_length_of :name, :in => 4..30
# validates_uniqueness_of :name