Merge remote-tracking branch 'bennibu/rails3' into rails3
Conflicts: app/controllers/admin/ordergroups_controller.rb app/controllers/finance/balancing_controller.rb app/controllers/suppliers_controller.rb app/views/articles/_article.html.haml app/views/finance/balancing/_summary.haml app/views/finance/balancing/new.html.haml app/views/group_orders/_form.html.haml app/views/home/_apple_bar.html.haml app/views/suppliers/index.haml
This commit is contained in:
commit
7af796c09c
47 changed files with 325 additions and 240 deletions
|
|
@ -1,4 +1,4 @@
|
|||
%tr{class: row_classes(article)}
|
||||
%tr{class: row_classes(article)}[article]
|
||||
%td= check_box_tag 'selected_articles[]', article.id.to_s, false, {:id => "checkbox_#{article.id}", 'data-ignore-onchange' => true}
|
||||
%td{'data-check-this' => "#checkbox_#{article.id}", :class => 'click-me'}= article.name
|
||||
%td= article.origin
|
||||
|
|
@ -15,5 +15,3 @@
|
|||
:remote => true, class: 'btn btn-mini'
|
||||
%td= link_to t('ui.delete'), [@supplier, article],
|
||||
:method => :delete, :confirm => t('.confirm_delete'), :remote => true, class: 'btn btn-mini btn-danger'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
%td= article.unit_quantity
|
||||
%td
|
||||
- logger.debug "[debug] #{article.attributes.inspect}"
|
||||
- if @supplier.articles.where(order_number: article.number).exists?
|
||||
- if @supplier.articles.undeleted.where(order_number: article.number).exists?
|
||||
%i.icon-ok
|
||||
schon importiert
|
||||
- else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- title "Artikel von #{@supplier.name} (#{@supplier.articles.count})"
|
||||
- title "Artikel von #{@supplier.name} (#{@supplier.articles.undeleted.count})"
|
||||
|
||||
.well.well-small
|
||||
.btn-toolbar
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
Lieferant wechseln ..
|
||||
%span.caret
|
||||
%ul.dropdown-menu
|
||||
- Supplier.where('id != ?', @supplier.id).order('name ASC').each do |supplier|
|
||||
- Supplier.undeleted.where('id != ?', @supplier.id).order('suppliers.name ASC').each do |supplier|
|
||||
%li= link_to supplier.name, supplier_articles_path(supplier), tabindex: -1
|
||||
|
||||
- unless @supplier.shared_supplier.nil?
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
%h1 Artikel mit externer Datenbank synchronisieren
|
||||
- title 'Artikel mit externer Datenbank synchronisieren'
|
||||
|
||||
- form_tag update_all_supplier_articles_path(@supplier, :sync => "1") do
|
||||
= form_tag update_all_supplier_articles_path(@supplier, :sync => "1") do
|
||||
%h2 Auslisten ...
|
||||
%p
|
||||
- unless @outlisted_articles.empty?
|
||||
|
|
@ -25,47 +25,49 @@
|
|||
Werten vorausgefüllt.
|
||||
%br/
|
||||
Abweichungen zu den alten Artikeln sind gelb markiert.
|
||||
%table
|
||||
%tr
|
||||
%th Name
|
||||
%th Notiz
|
||||
%th Hersteller
|
||||
%th Herkunft
|
||||
%th Einheit
|
||||
%th GebGr
|
||||
%th Preis
|
||||
%th MwSt.
|
||||
%th Pfand
|
||||
%th Kategorie
|
||||
- @updated_articles.each do |@article, unequal_attributes|
|
||||
- article = Article.find(@article.id)
|
||||
%tr{:style => 'color:grey'}
|
||||
%td= article.name
|
||||
%td= article.note
|
||||
%td= article.manufacturer
|
||||
%td= article.origin
|
||||
%td= article.unit
|
||||
%td= article.unit_quantity
|
||||
%td= article.price
|
||||
%td= article.tax
|
||||
%td= article.deposit
|
||||
%td= article.article_category.name if article.article_category
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
- fields_for 'articles[]', @article do |form|
|
||||
%td{:style => highlight_new(unequal_attributes, :name)}
|
||||
= form.text_field 'name', :size => 0
|
||||
= form.hidden_field 'shared_updated_on'
|
||||
%td{:style => highlight_new(unequal_attributes, :note)}= form.text_field 'note', :size => 15
|
||||
%td{:style => highlight_new(unequal_attributes, :manufacturer)}= form.text_field 'manufacturer', :size => 10
|
||||
%td{:style => highlight_new(unequal_attributes, :origin)}= form.text_field 'origin', :size => 5
|
||||
%td{:style => highlight_new(unequal_attributes, :unit)}= form.text_field 'unit', :size => 5
|
||||
%td{:style => highlight_new(unequal_attributes, :unit_quantity)}= form.text_field 'unit_quantity', :size => 5
|
||||
%td{:style => highlight_new(unequal_attributes, :price)}= form.text_field 'price', :size => 5
|
||||
%td{:style => highlight_new(unequal_attributes, :tax)}= form.text_field 'tax', :size => 4
|
||||
%td{:style => highlight_new(unequal_attributes, :deposit)}= form.text_field 'deposit', :size => 4
|
||||
%td= select 'article[]', 'article_category_id', ArticleCategory.find(:all).collect {|a| [ a.name, a.id ] }, { :include_blank => true }
|
||||
%th Name
|
||||
%th Notiz
|
||||
%th Hersteller
|
||||
%th Herkunft
|
||||
%th Einheit
|
||||
%th GebGr
|
||||
%th Preis
|
||||
%th MwSt.
|
||||
%th Pfand
|
||||
%th Kategorie
|
||||
%tbody
|
||||
- @updated_articles.each do |updated_article, attrs|
|
||||
- article = Article.find(updated_article.id)
|
||||
%tr{:style => 'color:grey'}
|
||||
%td= article.name
|
||||
%td= article.note
|
||||
%td= article.manufacturer
|
||||
%td= article.origin
|
||||
%td= article.unit
|
||||
%td= article.unit_quantity
|
||||
%td= article.price
|
||||
%td= article.tax
|
||||
%td= article.deposit
|
||||
%td= article.article_category.name if article.article_category
|
||||
%tr
|
||||
= fields_for 'articles[]', updated_article do |form|
|
||||
%td{:style => highlight_new(attrs, :name)}
|
||||
= form.text_field 'name', :size => 0
|
||||
= form.hidden_field 'shared_updated_on'
|
||||
%td{:style => highlight_new(attrs, :note)}= form.text_field 'note', class: 'input-small'
|
||||
%td{:style => highlight_new(attrs, :manufacturer)}= form.text_field 'manufacturer', class: 'input-small'
|
||||
%td{:style => highlight_new(attrs, :origin)}= form.text_field 'origin', class: 'input-mini'
|
||||
%td{:style => highlight_new(attrs, :unit)}= form.text_field 'unit', class: 'input-mini'
|
||||
%td{:style => highlight_new(attrs, :unit_quantity)}= form.text_field 'unit_quantity', class: 'input-mini'
|
||||
%td{:style => highlight_new(attrs, :price)}= form.text_field 'price', class: 'input-mini'
|
||||
%td{:style => highlight_new(attrs, :tax)}= form.text_field 'tax', class: 'input-mini'
|
||||
%td{:style => highlight_new(attrs, :deposit)}= form.text_field 'deposit', class: 'input-mini'
|
||||
%td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] },
|
||||
{include_blank: true}, class: 'input-small'
|
||||
%hr/
|
||||
= hidden_field 'supplier', 'id'
|
||||
= submit_tag 'Alle löschen/aktualisieren'
|
||||
|
|
||||
= link_to 'Abbrechen', supplier_articles_path(@supplier)
|
||||
= submit_tag 'Alle löschen/aktualisieren', class: 'btn btn-primary'
|
||||
= link_to 'oder abbrechen', supplier_articles_path(@supplier)
|
||||
Loading…
Add table
Add a link
Reference in a new issue