Merge remote-tracking branch 'foodcoop-rostock/feature-receive-i18n' into feature-receive

This commit is contained in:
wvengen 2014-01-08 12:35:44 +01:00
commit ccdb1e8add
6 changed files with 54 additions and 29 deletions

View file

@ -20,9 +20,9 @@ module OrdersHelper
if order_article.order.open? if order_article.order.open?
nil nil
else else
units_info = "#{order_article.units_to_order} ordered" units_info = "#{order_article.units_to_order} #{heading_helper OrderArticle, :units_to_order}"
units_info += ", #{order_article.units_billed} billed" unless order_article.units_billed.nil? units_info += ", #{order_article.units_billed} #{heading_helper OrderArticle, :units_billed}" unless order_article.units_billed.nil?
units_info += ", #{order_article.units_received} received" unless order_article.units_received.nil? units_info += ", #{order_article.units_received} #{heading_helper OrderArticle, :units_received}" unless order_article.units_received.nil?
end end
end end

View file

@ -7,9 +7,9 @@
= hidden_field_tag :without_units, true = hidden_field_tag :without_units, true
- else - else
.fold-line .fold-line
= form.input :units_to_order, label: 'Amount ordered', hint: '', input_html: {class: 'input-nano'} = form.input :units_to_order, hint: '', input_html: {class: 'input-nano'}
-#= form.input :units_billed, label: 'invoice', input_html: {class: 'input-nano'} -#= form.input :units_billed, label: 'invoice', input_html: {class: 'input-nano'}
= form.input :units_received, label: 'received', input_html: {class: 'input-nano'} = form.input :units_received, input_html: {class: 'input-nano'}
%p.help-block= t 'simple_form.hints.order_article.units_to_order' %p.help-block= t 'simple_form.hints.order_article.units_to_order'
.foo{style: 'clear:both'} .foo{style: 'clear:both'}

View file

@ -41,7 +41,7 @@
function init_add_article(sel) { function init_add_article(sel) {
$(sel).removeAttr('disabled').select2({ $(sel).removeAttr('disabled').select2({
placeholder: '#{j t('orders.add_article.title')}', placeholder: '#{j t('orders.receive.add_article')}',
formatNoMatches: function(term) { return '#{j t('.no_articles_available')}';} formatNoMatches: function(term) { return '#{j t('.no_articles_available')}';}
// TODO implement adding a new article, like in deliveries // TODO implement adding a new article, like in deliveries
}).on('change', function(e) { }).on('change', function(e) {
@ -66,17 +66,17 @@
$(this).replaceWith('<i class="icon icon-warning-sign add-on"></i>'); $(this).replaceWith('<i class="icon icon-warning-sign add-on"></i>');
} }
%table#order_articles.ordered-articles.table.table-striped.stupidtable %table#order_articles.ordered-articles.table.table-striped.stupidtable{style: 'margin-bottom: 0'}
%thead %thead
%tr %tr
%th.sort{:data => {:sort => 'string'}}= heading_helper Article, :order_number, short: true %th.sort{:data => {:sort => 'string'}}= heading_helper Article, :order_number, short: true
%th.default-sort.sort{:data => {:sort => 'string'}}= heading_helper Article, :name %th.default-sort.sort{:data => {:sort => 'string'}}= heading_helper Article, :name
%th= heading_helper Article, :unit %th= heading_helper Article, :unit
%th= heading_helper Article, :price %th= heading_helper Article, :price
%th Members %th= heading_helper OrderArticle, :units_to_order, short: true
%th Ordered %th= heading_helper OrderArticle, :quantity, short: true
-#%th Invoice # TODO implement invoice screen -#%th Invoice # TODO implement invoice screen
%th Received %th= heading_helper OrderArticle, :units_received, short: true
%th %th
%th= t 'ui.actions' %th= t 'ui.actions'
%tfoot %tfoot
@ -85,6 +85,7 @@
%select#add_article{:style => 'width: 500px;'} %select#add_article{:style => 'width: 500px;'}
- new_article_data.each do |option| - new_article_data.each do |option|
%option{id: "add_article_#{option[:id]}", value: option[:id]}= option[:text] %option{id: "add_article_#{option[:id]}", value: option[:id]}= option[:text]
%tbody#result_table %tbody#result_table
- @order_articles.each do |order_article| - @order_articles.each do |order_article|
= render :partial => 'edit_amount', :locals => {:order_article => order_article} = render :partial => 'edit_amount', :locals => {:order_article => order_article}

View file

@ -22,24 +22,22 @@
}); });
}); });
- title "Receiving #{@order.name}" - title t('.title', order: @order.name)
= form_tag(receive_order_path(@order)) do = form_tag(receive_order_path(@order)) do
%section#results %fieldset#results
= render 'edit_amounts' = render 'edit_amounts'
.form-actions .form-actions
.pull-left .pull-left
Surplus to %b.checkbox.inline
= label_tag :rest_to_tolerance, class: 'inline' do = t '.surplus_options'
= label_tag :rest_to_tolerance, class: 'checkbox inline' do
= check_box_tag :rest_to_tolerance, 1, true = check_box_tag :rest_to_tolerance, 1, true
member tolerance, = t '.consider_member_tolerance'
%span{style: 'color: grey'} = label_tag :rest_to_stock, class: 'checkbox inline' do
and = check_box_tag :rest_to_stock, 1, false, disabled: true
= label_tag :rest_to_stock, class: 'inline' do %span{style: 'color: grey'}= t '.rest_to_stock'
= check_box_tag :rest_to_stock, 1, false, disabled: true
stock
.pull-right .pull-right
= submit_tag t('.submit'), class: 'btn btn-primary' = submit_tag t('.submit'), class: 'btn btn-primary'
= link_to t('ui.or_cancel'), order_path(@order) = link_to t('ui.or_cancel'), order_path(@order)

View file

@ -77,11 +77,17 @@ de:
note: Notiz note: Notiz
starts: Läuft vom starts: Läuft vom
status: Status status: Status
supplier: Lieferant
order_article: order_article:
article: Artikel article: Artikel
missing_units: Fehlende Einheiten missing_units: Fehlende Einheiten
missing_units_short: Fehlende missing_units_short: Fehlend
units_to_order: Menge quantity: Gewünschte Einheiten
quantity_short: Gewünscht
units_received: Gelieferte Gebinde
units_received_short: Geliefert
units_to_order: Bestellte Gebinde
units_to_order_short: Bestellt
update_current_price: Globalen Preis aktualisieren update_current_price: Globalen Preis aktualisieren
order_comment: order_comment:
text: Kommentiere diese Bestellung ... text: Kommentiere diese Bestellung ...
@ -1095,6 +1101,9 @@ de:
notice: Die Bestellung wurde erstellt. notice: Die Bestellung wurde erstellt.
edit: edit:
title: Bestellung bearbeiten title: Bestellung bearbeiten
edit_amount:
locked_to_protect_manual_update: Die Verteilung dieses Artikels auf die einzelnen Bestellgruppen wurde manuell angepasst. Dieses Eingabefeld wurde gesperrt, um die manuellen Änderungen zu bewahren. Um den Artikel neu zu verteilen, drücke den Entsperrknopf und ändere die gelieferte Menge.
locked_to_protect_unlock_button: Drücke diesen Knopf, um das Eingabefeld für die gelieferte Menge zu entsperren. Vorherige manuelle Änderungen werden überschrieben und der Artikel wird wieder automatisch auf die Bestellgruppen aufgeteilt, wenn Du die Menge änderst.
fax: fax:
amount: Menge amount: Menge
articles: Artikel articles: Artikel
@ -1113,12 +1122,14 @@ de:
title: Artikel title: Artikel
index: index:
action_end: Beenden action_end: Beenden
action_receive: In Empfang nehmen
closed_orders: Abgerechnete Bestellungen
confirm_delete: Willst Du wirklich die Bestellung löschen? confirm_delete: Willst Du wirklich die Bestellung löschen?
confirm_end: Willst Du wirklich die Bestellung %{order} beenden? Es gibt kein zurück. confirm_end: Willst Du wirklich die Bestellung %{order} beenden? Es gibt kein zurück.
ended_orders: Beendete Bestellungen
new_order: Neue Bestellung anlegen new_order: Neue Bestellung anlegen
no_open_orders: Derzeit gibt es keine laufende Bestellungen. no_open_orders: Derzeit gibt es keine laufende Bestellungen.
open_orders: Laufende Bestellungen open_orders: Laufende Bestellungen
orders_in_progress: In Bearbeitung
title: Bestellungen verwalten title: Bestellungen verwalten
model: model:
error_closed: Bestellung wurde schon abgerechnet error_closed: Bestellung wurde schon abgerechnet
@ -1130,6 +1141,13 @@ de:
warning_ordered_stock: ! 'Warnung: Die rot markierten Artikel wurden in der laufenden Lagerbestellung bereits bestellt bzw. gekauft. Wenn Du sie hier abwählst, werden alle bestehenden Bestellungen bzw. Käufe dieses Artikels gelöscht und nicht abgerechnet!' warning_ordered_stock: ! 'Warnung: Die rot markierten Artikel wurden in der laufenden Lagerbestellung bereits bestellt bzw. gekauft. Wenn Du sie hier abwählst, werden alle bestehenden Bestellungen bzw. Käufe dieses Artikels gelöscht und nicht abgerechnet!'
new: new:
title: Neue Bestellung anlegen title: Neue Bestellung anlegen
receive:
add_article: Artikel hinzufügen
consider_member_tolerance: Toleranz berücksichtigen
rest_to_stock: Rest ins Lager
submit: Bestellung in Empfang nehmen
surplus_options: 'Verteilungsoptionen:'
title: »%{order}« in Empfang nehmen
show: show:
action_end: Beenden! action_end: Beenden!
amounts: ! 'Netto/Bruttosumme:' amounts: ! 'Netto/Bruttosumme:'

View file

@ -77,11 +77,17 @@ en:
note: Note note: Note
starts: Starts at starts: Starts at
status: Status status: Status
supplier: Supplier
order_article: order_article:
article: Article article: Article
missing_units: Missing units missing_units: Missing units
missing_units_short: Missing missing_units_short: Missing
units_to_order: Amount of units quantity: Desired amount
quantity_short: Desired
units_received: Received amount of units
units_received_short: Received
units_to_order: Ordered amount of units
units_to_order_short: Ordered
update_current_price: Globally update current price update_current_price: Globally update current price
order_comment: order_comment:
text: Add comment to this order ... text: Add comment to this order ...
@ -1090,9 +1096,6 @@ en:
new: new:
title: Add delivered article to order title: Add delivered article to order
orders: orders:
add_article:
title: Add article
notice: Article "%{name}" was added to the order.
articles: articles:
article_count: ! 'Ordered articles:' article_count: ! 'Ordered articles:'
prices: Net/gross price prices: Net/gross price
@ -1104,7 +1107,7 @@ en:
edit: edit:
title: Edit order title: Edit order
edit_amount: edit_amount:
locked_to_protect_manual_update: The distribution of this article among the ordergroups was changed manually. This field is locked in order to protect those changes. To redistribute anyway, press the unlock button and change the amount. locked_to_protect_manual_update: The distribution of this article among the ordergroups was changed manually. This field was locked in order to protect those changes. To redistribute anyway, press the unlock button and change the amount.
locked_to_protect_unlock_button: Press this button to unlock the received field. Any previous manual changes will be overwritten and the article will be redistributed over the ordergroups. locked_to_protect_unlock_button: Press this button to unlock the received field. Any previous manual changes will be overwritten and the article will be redistributed over the ordergroups.
fax: fax:
amount: Amount amount: Amount
@ -1144,7 +1147,12 @@ en:
new: new:
title: Create new order title: Create new order
receive: receive:
add_article: Add article
consider_member_tolerance: consider tolerance
rest_to_stock: rest to stock
submit: Receive order submit: Receive order
surplus_options: 'Distribution options:'
title: Receiving %{order}
show: show:
action_end: Close! action_end: Close!
amounts: ! 'Net/gross sum:' amounts: ! 'Net/gross sum:'