Show only suppliers with articles in the dropdown-menu for new orders
When there are many suppliers to be able to select them for invoices, the menu for creating new orders gets unclear.
This commit is contained in:
parent
65c7673a41
commit
5b309d3d51
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
= t '.new_order'
|
= t '.new_order'
|
||||||
%span.caret
|
%span.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
- Supplier.undeleted.order('suppliers.name ASC').each do |supplier|
|
- Supplier.where(id: Article.undeleted.select(:supplier_id).distinct).order('suppliers.name ASC').each do |supplier|
|
||||||
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
|
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
|
||||||
|
|
||||||
.well
|
.well
|
||||||
|
|
Loading…
Reference in a new issue