diff --git a/app/models/shared_article.rb b/app/models/shared_article.rb index 238b48f0..c09a9ec0 100644 --- a/app/models/shared_article.rb +++ b/app/models/shared_article.rb @@ -19,8 +19,10 @@ class SharedArticle < ApplicationRecord :unit_quantity => unit_quantity, :order_number => number, :article_category => ArticleCategory.find_match(category), + :price_per => price_per, + :unit_symbol => unit_symbol, # convert to db-compatible-string - :shared_updated_on => updated_on.to_formatted_s(:db) + :shared_updated_on => updated_on.to_fs(:db) ) end end diff --git a/app/models/supplier.rb b/app/models/supplier.rb index 9d6cd8a5..245e2620 100644 --- a/app/models/supplier.rb +++ b/app/models/supplier.rb @@ -88,7 +88,6 @@ class Supplier < ApplicationRecord new_attrs[:article_category] = ArticleCategory.find_match(new_attrs[:article_category]) new_attrs[:tax] ||= FoodsoftConfig[:tax_default] new_article = articles.build(new_attrs) - if status.nil? if article.nil? new_articles << new_article