Allow to create stock_article as copy of article in delivery form
This commit is contained in:
parent
cc5574f8b5
commit
cc1a839246
6 changed files with 41 additions and 7 deletions
|
|
@ -14,6 +14,10 @@ module DeliveriesHelper
|
|||
supplier.stock_articles.undeleted.reorder('articles.name ASC').map {|a| ["#{a.name} (#{number_to_currency a.price}/#{a.unit})", a.id] }
|
||||
end
|
||||
|
||||
def articles_for_select(supplier)
|
||||
supplier.articles.undeleted.reorder('articles.name ASC').map {|a| ["#{a.name} (#{number_to_currency a.price}/#{a.unit})", a.id] }.unshift(['', nil])
|
||||
end
|
||||
|
||||
def stock_articles_for_table(supplier)
|
||||
supplier.stock_articles.undeleted.reorder('articles.name COLLATE NOCASE ASC')
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue