fix order article add + test

This commit is contained in:
wvengen 2014-02-24 11:37:06 +01:00
parent 775137f7c0
commit f8fca4d630
4 changed files with 28 additions and 16 deletions

View file

@ -52,6 +52,14 @@ class Order < ActiveRecord::Base
end
end
def supplier_articles
if stockit?
StockArticle.undeleted.reorder('articles.name')
else
supplier.articles.undeleted.reorder('articles.name')
end
end
# Save ids, and create/delete order_articles after successfully saved the order
def article_ids=(ids)
@article_ids = ids