Fixed bug in deliveries. Extended test fixtures.
This commit is contained in:
parent
46d0a9c485
commit
0a87294ed4
9 changed files with 28 additions and 8 deletions
|
|
@ -20,7 +20,7 @@
|
|||
# order_number :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# quantity :decimal(, ) default(0.0)
|
||||
# quantity :integer default(0)
|
||||
# deleted_at :datetime
|
||||
# type :string(255)
|
||||
#
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Delivery < ActiveRecord::Base
|
|||
|
||||
def stock_change_attributes=(stock_change_attributes)
|
||||
for attributes in stock_change_attributes
|
||||
stock_changes.build(attributes) unless attributes[:quantity] == 0.0 or attributes[:quantity].blank?
|
||||
stock_changes.build(attributes) unless attributes[:quantity].to_i == 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# order_number :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# quantity :decimal(, ) default(0.0)
|
||||
# quantity :integer default(0)
|
||||
# deleted_at :datetime
|
||||
# type :string(255)
|
||||
#
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# delivery_id :integer
|
||||
# order_id :integer
|
||||
# stock_article_id :integer
|
||||
# quantity :decimal(, ) default(0.0)
|
||||
# quantity :integer default(0)
|
||||
# created_at :datetime
|
||||
#
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@
|
|||
= form.text_field :deposit
|
||||
%p
|
||||
Kategorie:
|
||||
= form.select :article_category, ArticleCategory.all(:order => 'name').collect { |c| [c.name, c.id] }
|
||||
= form.select :article_category_id, ArticleCategory.all(:order => 'name').collect { |c| [c.name, c.id] }
|
||||
%p
|
||||
= submit_tag "Artikel speichern"
|
||||
Loading…
Add table
Add a link
Reference in a new issue