fix order article add + test
This commit is contained in:
parent
775137f7c0
commit
f8fca4d630
4 changed files with 28 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue