Merge latest changes in master of http://github.com/foodcoops/foodsoft

This commit is contained in:
Julius 2013-06-26 20:23:11 +02:00
commit d0ccf07bc5
20 changed files with 139 additions and 125 deletions

View file

@ -5,7 +5,7 @@
= f.input :contact_person
= f.input :contact_phone
= f.input :contact_address
= f.input :ignore_apple_restriction
= f.input :ignore_apple_restriction, :label => false, :inline_label => true
.form-actions
= f.button :submit
= link_to t('ui.or_cancel'), :back

View file

@ -22,20 +22,20 @@
= link_to "-", update_result_finance_group_order_article_path(group_order_article, modifier: '-'),
method: :put, remote: true, class: 'btn btn-mini'
%td.numeric
= number_to_currency(group_order_article.order_article.price.fc_price * group_order_article.result, :unit => "")
= number_to_currency(group_order_article.order_article.price.fc_price * group_order_article.result)
%td.actions{:style=>"width:1em"}
= link_to "Bearbeiten", edit_finance_group_order_article_path(group_order_article), remote: true,
= link_to t('ui.edit'), edit_finance_group_order_article_path(group_order_article), remote: true,
class: 'btn btn-mini'
%td.actions{:style=>"width:1em"}
= link_to "Löschen", finance_group_order_article_path(group_order_article), method: :delete,
= link_to t('ui.delete'), finance_group_order_article_path(group_order_article), method: :delete,
remote: true, class: 'btn btn-mini btn-danger'
%td
%tfoot
%tr
%td
%td{:style => "width:8em"}= t('total_fc')
%td{:style => "width:8em"}= t('.total_fc')
%td{:id => "group_orders_sum_quantity_#{order_article.id}"}
= order_article.group_orders_sum[:quantity]
%td.numeric{:id => "group_orders_sum_price_#{order_article.id}"}
= number_to_currency(order_article.group_orders_sum[:price], :unit => "")
%td{:colspan => "3"}
= number_to_currency(order_article.group_orders_sum[:price])
%td{:colspan => "3"}

View file

@ -7,4 +7,4 @@
%td.numeric= number_to_currency(group_order.price)
.form-actions
= link_to t('.clear'), close_finance_order_path(@order), method: :put, class: 'btn btn-primary'
= link_to t('.or_cancle'), new_finance_order_path(order_id: @order.id)
= link_to t('.or_cancel'), new_finance_order_path(order_id: @order.id)

View file

@ -3,9 +3,9 @@
= f.hidden_field :order_id
- if @invoice.delivery
%p= t('.linked', what_link: link_to(t('.delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p= t('.linked', what_link: link_to(t('.order'), @invoice.order)).html_safe
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), @invoice.order)).html_safe
= f.association :supplier, hint: false
= f.input :number

View file

@ -1,12 +1,18 @@
- title t('.title', number: @invoice.number)
%p
%b= t 'simple_form.labels.invoice.supplier'
%b= t('simple_form.labels.invoice.supplier') + ':'
= @invoice.supplier.name
- if @invoice.delivery
%p
%b= t('simple_form.labels.invoice.delivery') + ':'
= t('.linked', what_link: link_to(t('.delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p
%b= t('simple_form.labels.invoice.order') + ':'
= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), @invoice.order)).html_safe
%p
%b= t('simple_form.labels.invoice.number') + ':'
= @invoice.number

View file

@ -3,7 +3,7 @@
$(function() {
#{data_to_js(@ordering_data)}
setGroupBalance(#{@ordering_data[:available_funds]});
setDecimalSeparator(",");
setCurrencyFormat("#{t('number.currency.format.separator')}", #{t('number.currency.format.precision')}, "#{t('number.currency.format.unit')}");
setToleranceBehaviour(#{FoodsoftConfig[:tolerance_is_costly]});
setStockit(#{@order.stockit?});
});
@ -97,8 +97,7 @@
%input{type: 'button', value: '-', 'data-decrease_tolerance' => order_article.id}
%td{id: "td_price_#{order_article.id}", style: "text-align:right; padding-right:10px; width:4em"}
%span{id: "price_#{order_article.id}_display"}= number_to_currency(@ordering_data[:order_articles][order_article.id][:total_price], unit: "")
%span{id: "price_#{order_article.id}_display"}= number_to_currency(@ordering_data[:order_articles][order_article.id][:total_price])
.article-info
.article-name= order_article.article.name
.pull-right
@ -125,8 +124,7 @@
%tr
%td= t('.total_sum_amount') + ':'
%td.currency
%span#total_price= @group_order.price
%span#total_price= number_to_currency(@group_order.price)
%tr
%td= t('.available_funds') + ':'
%td.currency= number_to_currency(@ordering_data[:available_funds])
@ -134,8 +132,7 @@
%td= t('.new_funds') + ':'
%td.currency
%strong
%span#new_balance= @ordering_data[:available_funds] - @group_order.price
%span#new_balance= number_to_currency(@ordering_data[:available_funds] - @group_order.price)
#order-button
= submit_tag( t('.action_save'), id: 'submit_button', class: 'btn btn-primary' )
#{link_to t('ui.or_cancel'), group_orders_path}

View file

@ -14,12 +14,12 @@
.control-group
%label(for='nick' class='control-label')= t '.user'
.controls
= text_field_tag 'nick'
= text_field_tag 'nick', nil, autocapitalize: 'off', autocorrect: 'off'
.control-group
%label(for='password' class='control-label')= t '.password'
.controls
= password_field_tag 'password'
= password_field_tag 'password', nil, autocapitalize: 'off', autocorrect: 'off'
.control-group
.controls