Merge branch 'master' into article-dialog
Conflicts: app/assets/stylesheets/bootstrap_and_overrides.css.less
This commit is contained in:
commit
923b579bd1
30 changed files with 451 additions and 677 deletions
|
|
@ -3,7 +3,7 @@
|
|||
= f.hidden_field :supplier_id
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
%h3= t '.title'
|
||||
%h3= @article.new_record? ? t('.title_new') : t('.title_edit')
|
||||
.modal-body
|
||||
/= f.input :availability
|
||||
= f.input :name
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%td= sort_link_helper t('.date'), "date"
|
||||
%td= t('.who')
|
||||
%td= sort_link_helper t('.note'), "note"
|
||||
%td= sort_link_helper t('.amount'), "amount"
|
||||
%th= sort_link_helper heading_helper(FinancialTransaction, :created_on), "date"
|
||||
%th= heading_helper FinancialTransaction, :user
|
||||
%th= sort_link_helper heading_helper(FinancialTransaction, :note), "note"
|
||||
%th= sort_link_helper heading_helper(FinancialTransaction, :amount), "amount"
|
||||
%tbody
|
||||
- @financial_transactions.each do |t|
|
||||
%tr
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@
|
|||
|
||||
= form_tag finance_create_transaction_collection_path do
|
||||
%p
|
||||
%b= t('.note')
|
||||
%b= heading_helper FinancialTransaction, :note
|
||||
= text_field_tag :note, params[:note], class: 'input-xlarge', required: 'required'
|
||||
%p
|
||||
%table#ordergroups{:style => "width:20em"}
|
||||
%tr
|
||||
%th= t('.ordergroup')
|
||||
%th= t('.amount')
|
||||
%th= heading_helper FinancialTransaction, :ordergroup
|
||||
%th= heading_helper FinancialTransaction, :amount
|
||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||
%p
|
||||
= link_to t('.new_ordergroup'), '#', 'data-add-transaction' => true, class: 'btn'
|
||||
|
|
|
|||
|
|
@ -27,22 +27,23 @@
|
|||
%h2= @order.name
|
||||
%dl.dl-horizontal
|
||||
- unless @order.note.blank?
|
||||
%dt= t '.note'
|
||||
%dt= heading_helper Order, :note
|
||||
%dd= @order.note
|
||||
%dt= t '.created_by'
|
||||
%dt= heading_helper Order, :created_by
|
||||
%dd= show_user_link(@order.created_by)
|
||||
%dt= t '.ending'
|
||||
%dt= heading_helper Order, :ends
|
||||
%dd= format_time(@order.ends)
|
||||
- unless @order.stockit? or @order.supplier.min_order_quantity.blank?
|
||||
%dt= t '.min_quantity'
|
||||
%dt= heading_helper Supplier, :min_order_quantity, short: true
|
||||
%dd= @order.supplier.min_order_quantity
|
||||
%dt= t '.sum_amount'
|
||||
%dd= number_to_currency @order.sum
|
||||
%dt= t '.last_update'
|
||||
%dd
|
||||
= show_user(@group_order.updated_by) if @group_order.updated_by
|
||||
(#{format_time(@group_order.updated_on)})
|
||||
%dt= t '.funds'
|
||||
- unless @group_order.new_record?
|
||||
%dt= heading_helper GroupOrder, :updated_by
|
||||
%dd
|
||||
= show_user(@group_order.updated_by)
|
||||
(#{format_time(@group_order.updated_on)})
|
||||
%dt= heading_helper Ordergroup, :available_funds
|
||||
%dd= number_to_currency(@ordering_data[:available_funds])
|
||||
|
||||
.well.pull-right
|
||||
|
|
@ -65,20 +66,20 @@
|
|||
%table.table.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.name'
|
||||
%th= heading_helper Article, :name
|
||||
- if @order.stockit?
|
||||
%th{style: 'width:120px'}= t '.supplier'
|
||||
%th{style: 'width:120px'}= heading_helper StockArticle, :supplier
|
||||
%th{style: "width:13px;"}
|
||||
%th{style: "width:4.5em;"}= t '.price'
|
||||
%th{style: "width:4.5em;"}= t '.unit'
|
||||
%th{style: "width:4.5em;"}= heading_helper Article, :unit
|
||||
- unless @order.stockit?
|
||||
%th{style: "width:70px;"}= t '.unit_missing'
|
||||
%th#col_required= t '.amount'
|
||||
%th#col_tolerance= t '.tolerance'
|
||||
%th{style: "width:70px;"}= heading_helper OrderArticle, :missing_units, short: true
|
||||
%th#col_required= heading_helper GroupOrderArticle, :quantity
|
||||
%th#col_tolerance= heading_helper GroupOrderArticle, :tolerance
|
||||
- else
|
||||
%th(style="width:20px")= t '.available'
|
||||
%th#col_required= t '.amount'
|
||||
%th{style: "width:15px;"}= t '.sum'
|
||||
%th(style="width:20px")= heading_helper StockArticle, :available
|
||||
%th#col_required= heading_helper GroupOrderArticle, :quantity
|
||||
%th{style: "width:15px;"}= heading_helper GroupOrderArticle, :total_price
|
||||
%tbody.list
|
||||
- @order.articles_grouped_by_category.each do |category, order_articles|
|
||||
%tr.list-heading.article-category
|
||||
|
|
@ -132,11 +133,11 @@
|
|||
%span{id: "t_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] + @ordering_data[:order_articles][order_article.id][:others_tolerance]
|
||||
%br/
|
||||
.pull-left
|
||||
#{t '.manufacturer'}: #{order_article.article.manufacturer}
|
||||
#{heading_helper Article, :manufacturer}: #{order_article.article.manufacturer}
|
||||
%br/
|
||||
#{t '.units'}: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit}
|
||||
#{heading_helper Article, :units}: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit}
|
||||
%br/
|
||||
#{t '.note'}: #{order_article.article.note}
|
||||
#{heading_helper Article, :note}: #{order_article.article.note}
|
||||
%br/
|
||||
#order-footer
|
||||
#info-box
|
||||
|
|
@ -147,7 +148,7 @@
|
|||
%td.currency
|
||||
%span#total_price= number_to_currency(@group_order.price)
|
||||
%tr
|
||||
%td= t('.available_funds') + ':'
|
||||
%td= heading_helper(Ordergroup, :available_funds) + ':'
|
||||
%td.currency= number_to_currency(@ordering_data[:available_funds])
|
||||
%tr
|
||||
%td= t('.new_funds') + ':'
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.supplier'
|
||||
%th= t '.ending'
|
||||
%th= t '.sum'
|
||||
%th= heading_helper Order, :name
|
||||
%th= heading_helper Order, :ends
|
||||
%th= heading_helper GroupOrder, :price
|
||||
%tbody
|
||||
- for order in orders
|
||||
- group_order = order.group_order(@ordergroup) # Get GroupOrder if possible
|
||||
|
|
|
|||
|
|
@ -6,22 +6,22 @@
|
|||
%h2= t '.funds.title'
|
||||
%table.table.table-striped
|
||||
%tr
|
||||
%td= t('.funds.account_balance') + ':'
|
||||
%td= heading_helper Ordergroup, :account_balance
|
||||
%td.numeric{:style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
|
||||
%tr
|
||||
%td= '- ' + t('.funds.open_orders') + ':'
|
||||
%td= '- ' + t('.funds.open_orders')
|
||||
%td.numeric= number_to_currency(@ordergroup.value_of_open_orders)
|
||||
%tr
|
||||
%td= '- ' + t('.funds.finished_orders') + ':'
|
||||
%td= '- ' + t('.funds.finished_orders')
|
||||
%td.numeric= number_to_currency(@ordergroup.value_of_finished_orders)
|
||||
%tr
|
||||
%th= t('.funds.available_funds') + ':'
|
||||
%th= heading_helper Ordergroup, :available_funds
|
||||
%th.numeric= number_to_currency(@ordergroup.get_available_funds)
|
||||
|
||||
= render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup}
|
||||
|
||||
// finished orders
|
||||
- unless Order.finished.empty?
|
||||
- unless Order.finished_not_closed.empty?
|
||||
%section
|
||||
%h2= t '.finished_orders.title'
|
||||
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
- content_for :head do
|
||||
= render 'data'
|
||||
|
||||
= render :partial => 'order_head'
|
||||
|
||||
- form_tag(:action => 'saveOrder', :id => @order) do
|
||||
.single_column{:style => "clear:both;margin-bottom:7em;"}
|
||||
.box_title
|
||||
%h2= t '.title'
|
||||
.column_content
|
||||
%table#order.list
|
||||
%thead
|
||||
%tr
|
||||
%th= t 'group_orders.form.name'
|
||||
%th{:style => "width:13px;"}
|
||||
%th{:style => "width:4.5em;"}= t 'group_orders.form.price'
|
||||
%th{:style => "width:4.5em;"}= t 'group_orders.form.unit'
|
||||
%th{:style => "width:70px;"}= t 'group_orders.form.unit_missing'
|
||||
%th#col_required= t 'group_orders.form.amount'
|
||||
- if not @order.stockit?
|
||||
%th#col_tolerance= t 'group_orders.form.tolerance'
|
||||
%th{:style => "width:15px;"}= t 'group_orders.form.sum'
|
||||
%tbody
|
||||
- total = 0
|
||||
- i = 0
|
||||
- @articles_grouped_by_category.each do |category, order_articles|
|
||||
%tr{:style => "background-color:#EFEFEF"}
|
||||
%td{:style => "text-align:left"}
|
||||
%b= h category
|
||||
%td{:colspan => "9"}
|
||||
- order_articles.each do |order_article|
|
||||
- if FoodsoftConfig[:tolerance_is_costly]
|
||||
- article_total = @price[i] * (@tolerance[i] + @quantity[i])
|
||||
- else
|
||||
- article_total = @price[i] * @quantity[i]
|
||||
- total += article_total
|
||||
%tr{:class => "#{cycle('even', 'odd', :name => 'articles')} order-article", :valign => "top"}
|
||||
%td.name= order_article.article.name
|
||||
%td= h order_article.article.origin
|
||||
%td= number_to_currency(@price[i])
|
||||
%td= order_article.article.unit
|
||||
%td
|
||||
%span{:id => "missing_units_#{i}"}
|
||||
- if @order.stockit?
|
||||
- order_article.article.quantity_available
|
||||
- else
|
||||
- missing_units = @unit[i] - (((@quantity[i] + @others_quantity[i]) % @unit[i]) + @tolerance[i] + @others_tolerance[i])
|
||||
- missing_units < 0 ? 0 : missing_units
|
||||
%td.quantity
|
||||
%input{:id => "q_#{i}", :name => "ordered[#{order_article.id}][quantity]", :size => "2", :type => "hidden", :value => @quantity[i]}/
|
||||
%span.used{:id => "q_used_#{i}"}= @used_quantity[i]
|
||||
+
|
||||
%span.unused{:id => "q_unused_#{i}"}= @quantity[i] - @used_quantity[i]
|
||||
= button_to_function('+', "increaseQuantity(#{i})")
|
||||
= button_to_function('-', "decreaseQuantity(#{i})")
|
||||
- unless @order.stockit?
|
||||
%td.tolerance
|
||||
%input{:id => "t_#{i}", :name => "ordered[#{order_article.id}][tolerance]", :size => "2", :type => "hidden", :value => @tolerance[i]}/
|
||||
- if (@unit[i] > 1)
|
||||
%span.used{:id => "t_used_#{i}"}= @used_tolerance[i]
|
||||
+
|
||||
%span.unused{:id => "t_unused_#{i}"}= @tolerance[i] - @used_tolerance[i]
|
||||
= button_to_function('+', "increaseTolerance(#{i})")
|
||||
= button_to_function('-', "decreaseTolerance(#{i})")
|
||||
%td{:id => "td_price_#{i}", :style => "text-align:right; padding-right:10px; width:4em"}
|
||||
%span{:id => "price_#{i}_display"}= number_to_currency(article_total, :unit => "")
|
||||
€
|
||||
.article-info
|
||||
%h3= order_article.article.name
|
||||
.right
|
||||
= t('group_orders.form.units_full') + ':'
|
||||
%span{:id => "units_#{i}"}= order_article.units_to_order
|
||||
%br/
|
||||
= t('group_orders.form.total_units') + ':'
|
||||
%span{:id => "q_total_#{i}"}= @quantity[i] + @others_quantity[i]
|
||||
%br/
|
||||
= t('group_orders.form.total_tolerance') + ':'
|
||||
%span{:id => "t_total_#{i}"}= @tolerance[i] + @others_tolerance[i]
|
||||
%br/
|
||||
.left
|
||||
#{t 'group_orders.form.manufacturer'}: #{order_article.article.manufacturer}
|
||||
%br/
|
||||
#{t 'group_orders.form.units'}: #{@order.stockit? ? order_article.article.quantity_available : @unit[i]} * #{h order_article.article.unit}
|
||||
%br/
|
||||
#{t 'group_orders.form.note'}: #{order_article.article.note}
|
||||
%br/
|
||||
- i = i + 1
|
||||
= render "order_footer", :total => total
|
||||
|
|
@ -9,21 +9,22 @@
|
|||
.well
|
||||
// Order summary
|
||||
%dl.dl-horizontal
|
||||
%dt= t '.supplier'
|
||||
%dt= heading_helper Order, :name
|
||||
%dd= @order.name
|
||||
%dt= t '.note'
|
||||
%dt= heading_helper Order, :note
|
||||
%dd= @order.note
|
||||
%dt= t '.ending'
|
||||
%dt= heading_helper Order, :ends
|
||||
%dd= format_time(@order.ends)
|
||||
%dt= t '.order_sum'
|
||||
%dt= heading_helper GroupOrder, :price
|
||||
%dd
|
||||
- if @group_order
|
||||
= number_to_currency(@group_order.price)
|
||||
- else
|
||||
= t '.not_ordered'
|
||||
- if @order.closed?
|
||||
%p= t '.closed_by', user: show_user(@order.updated_by)
|
||||
= link_to t('.comment'), "#comments"
|
||||
%dt= heading_helper Order, :closed_by
|
||||
%dd= show_user_link @order.updated_by
|
||||
%p= link_to t('.comment'), "#comments"
|
||||
|
||||
// Article box
|
||||
%section
|
||||
|
|
@ -35,8 +36,8 @@
|
|||
%table.table.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th{style: "width:40%"}= t '.articles.name'
|
||||
%th= t '.articles.units'
|
||||
%th{style: "width:40%"}= heading_helper Article, :name
|
||||
%th= heading_helper Article, :units
|
||||
%th= t '.articles.unit_price'
|
||||
%th
|
||||
%abbr{title: t('.articles.ordered_title')}= t '.articles.ordered'
|
||||
|
|
@ -46,7 +47,7 @@
|
|||
= t '.articles.order_open'
|
||||
- else
|
||||
= t '.articles.order_not_open'
|
||||
%th= t '.articles.total_price'
|
||||
%th= heading_helper GroupOrderArticle, :total_price
|
||||
%tbody
|
||||
- for category_name, order_articles in @order.articles_grouped_by_category
|
||||
%tr.article-category
|
||||
|
|
@ -61,7 +62,7 @@
|
|||
%td{style: "width:40%"}
|
||||
= oa.article.name
|
||||
- unless oa.article.note.blank?
|
||||
= image_tag("lamp_grey.png", {alt: "Notiz anzeigen", size: "15x16", border: "0", onmouseover: "$('note_#{oa.id}').show();", onmouseout: "$('note_#{oa.id}').hide();"})
|
||||
= image_tag("lamp_grey.png", {alt: t('.articles.show_note'), size: "15x16", border: "0", onmouseover: "$('#note_#{oa.id}').show();", onmouseout: "$('#note_#{oa.id}').hide();"})
|
||||
%td= "#{oa.price.unit_quantity} x #{oa.article.unit}"
|
||||
%td= number_to_currency(oa.price.fc_price)
|
||||
%td
|
||||
|
|
@ -73,7 +74,7 @@
|
|||
%tr{id: "note_#{oa.id}", class: "note even", style: "display:none"}
|
||||
%td{colspan: "6"}=h oa.article.note
|
||||
%tr{class: cycle('even', 'odd', name: 'articles')}
|
||||
%th{colspan: "5"}= t '.articles.sum'
|
||||
%th{colspan: "5"}= heading_helper GroupOrder, :price
|
||||
%th= number_to_currency(@group_order.price)
|
||||
%br/
|
||||
= link_to_top
|
||||
|
|
|
|||
|
|
@ -50,10 +50,10 @@
|
|||
%h3= t '.my_ordergroup.transactions.title'
|
||||
%table.table.table-striped
|
||||
%tr
|
||||
%th= t '.my_ordergroup.transactions.when'
|
||||
%th= t '.my_ordergroup.transactions.where'
|
||||
%th= t '.my_ordergroup.transactions.note'
|
||||
%th= t '.my_ordergroup.transactions.amount'
|
||||
%th= heading_helper FinancialTransaction, :created_on
|
||||
%th= heading_helper FinancialTransaction, :user
|
||||
%th= heading_helper FinancialTransaction, :note
|
||||
%th= heading_helper FinancialTransaction, :amount
|
||||
- for ft in current_user.ordergroup.financial_transactions.limit(5).order('created_on DESC')
|
||||
%tr
|
||||
%td= format_time(ft.created_on)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
- unless @ordergroup.description.blank?
|
||||
%p= @ordergroup.description
|
||||
%p
|
||||
%b= Ordergroup.human_attribute_name(:available_funds) + ':'
|
||||
%b= heading_helper(Ordergroup, :available_funds) + ':'
|
||||
= number_to_currency(@ordergroup.get_available_funds())
|
||||
%p
|
||||
%b= Ordergroup.human_attribute_name(:user_tokens) + ':'
|
||||
%b= heading_helper(Ordergroup, :user_tokens) + ':'
|
||||
= @ordergroup.memberships.map{|m| show_user m.user}.join(', ')
|
||||
= link_to t('.invite'), new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary'
|
||||
.span8
|
||||
|
|
|
|||
|
|
@ -7,10 +7,6 @@
|
|||
%title= [t('layouts.foodsoft'), yield(:title)].join(" - ")
|
||||
= csrf_meta_tags
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
%link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
|
||||
%link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
|
||||
%link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
|
||||
%link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
|
||||
//%link(href="images/favicon.ico" rel="shortcut icon")
|
||||
|
||||
= yield(:head)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
%table.table.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.name'
|
||||
%th= t '.unit_quantity'
|
||||
%th= heading_helper Article, :name
|
||||
%th= heading_helper Article, :unit_quantity
|
||||
%th= t '.prices'
|
||||
%th= t '.units_ordered'
|
||||
- unless order.stockit?
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@
|
|||
%table.table.table-hover#articleList
|
||||
%tr
|
||||
%th= check_box_tag 'checkall', "1", false, { 'data-check-all' => '#articleList' }
|
||||
%th= t '.name'
|
||||
%th= t '.note'
|
||||
%th= heading_helper Article, :name
|
||||
%th= heading_helper Article, :note
|
||||
- if @order.stockit?
|
||||
%th= t '.stockit'
|
||||
- else
|
||||
%th= t '.origin'
|
||||
%th= t '.supplier'
|
||||
%th= t '.unit_quantity'
|
||||
%th= heading_helper Article, :origin
|
||||
%th= heading_helper Article, :manufacturer
|
||||
%th= heading_helper Article, :unit_quantity
|
||||
%th= t '.prices'
|
||||
- for category_name, articles in @order.articles_for_ordering
|
||||
%tr.article-category
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= sort_link_helper t('.supplier'), "supplier"
|
||||
%th= t '.start'
|
||||
%th= sort_link_helper t('.ending'), "ends"
|
||||
%th= t '.status'
|
||||
%th= sort_link_helper heading_helper(Order, :supplier), "supplier"
|
||||
%th= heading_helper Order, :starts
|
||||
%th= sort_link_helper heading_helper(Order, :ends), "ends"
|
||||
%th= heading_helper Order, :status
|
||||
%th{:colspan => "2"}
|
||||
%tbody
|
||||
- @orders.each do |order|
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.supplier'
|
||||
%th= t '.ending'
|
||||
%th= t '.note'
|
||||
%th= heading_helper Order, :name
|
||||
%th= heading_helper Order, :ends
|
||||
%th= heading_helper Order, :note
|
||||
%th{colspan: "2"}
|
||||
%tbody
|
||||
- for order in @open_orders
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@
|
|||
// Order summary
|
||||
.well
|
||||
%dl.dl-horizontal
|
||||
%dt= t '.supplier'
|
||||
%dt= heading_helper(Order, :name) + ':'
|
||||
%dd= @order.name
|
||||
- if @note.present?
|
||||
%dt= t '.note'
|
||||
%dt= heading_helper(Order, :note) + ':'
|
||||
%dd= @order.note
|
||||
%dt= t '.created_by'
|
||||
%dt= heading_helper(Order, :created_by) + ':'
|
||||
%dd= show_user_link(@order.created_by)
|
||||
%dt= t '.begin'
|
||||
%dt= heading_helper(Order, :starts) + ':'
|
||||
%dd= format_time(@order.starts)
|
||||
%dt= t '.ending'
|
||||
%dt= heading_helper(Order, :ends) + ':'
|
||||
%dd= format_time(@order.ends)
|
||||
%dt= t '.group_orders'
|
||||
%dd #{@order.group_orders.count} (#{@order.group_orders.includes(:ordergroup).all.map {|g| g.ordergroup.name}.join(', ')})
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.supplier'
|
||||
%th= t '.ending'
|
||||
%th= heading_helper Order, :name
|
||||
%th= heading_helper Order, :ends
|
||||
%th= t '.who_ordered'
|
||||
%th= t '.total'
|
||||
%th= heading_helper GroupOrder, :price
|
||||
%tbody
|
||||
- total = 0
|
||||
- Order.open.each do |order|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue