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?
nil
else
units_info = "#{order_article.units_to_order} ordered"
units_info += ", #{order_article.units_billed} 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_to_order} #{heading_helper OrderArticle, :units_to_order}"
units_info += ", #{order_article.units_billed} #{heading_helper OrderArticle, :units_billed}" unless order_article.units_billed.nil?
units_info += ", #{order_article.units_received} #{heading_helper OrderArticle, :units_received}" unless order_article.units_received.nil?
end
end

View file

@ -7,9 +7,9 @@
= hidden_field_tag :without_units, true
- else
.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_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'
.foo{style: 'clear:both'}

View file

@ -41,7 +41,7 @@
function init_add_article(sel) {
$(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')}';}
// TODO implement adding a new article, like in deliveries
}).on('change', function(e) {
@ -66,17 +66,17 @@
$(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
%tr
%th.sort{:data => {:sort => 'string'}}= heading_helper Article, :order_number, short: true
%th.default-sort.sort{:data => {:sort => 'string'}}= heading_helper Article, :name
%th= heading_helper Article, :unit
%th= heading_helper Article, :price
%th Members
%th Ordered
%th= heading_helper OrderArticle, :units_to_order, short: true
%th= heading_helper OrderArticle, :quantity, short: true
-#%th Invoice # TODO implement invoice screen
%th Received
%th= heading_helper OrderArticle, :units_received, short: true
%th
%th= t 'ui.actions'
%tfoot
@ -85,6 +85,7 @@
%select#add_article{:style => 'width: 500px;'}
- new_article_data.each do |option|
%option{id: "add_article_#{option[:id]}", value: option[:id]}= option[:text]
%tbody#result_table
- @order_articles.each do |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
%section#results
%fieldset#results
= render 'edit_amounts'
.form-actions
.pull-left
Surplus to
= label_tag :rest_to_tolerance, class: 'inline' do
%b.checkbox.inline
= t '.surplus_options'
= label_tag :rest_to_tolerance, class: 'checkbox inline' do
= check_box_tag :rest_to_tolerance, 1, true
member tolerance,
%span{style: 'color: grey'}
and
= label_tag :rest_to_stock, class: 'inline' do
= check_box_tag :rest_to_stock, 1, false, disabled: true
stock
= t '.consider_member_tolerance'
= label_tag :rest_to_stock, class: 'checkbox inline' do
= check_box_tag :rest_to_stock, 1, false, disabled: true
%span{style: 'color: grey'}= t '.rest_to_stock'
.pull-right
= submit_tag t('.submit'), class: 'btn btn-primary'
= link_to t('ui.or_cancel'), order_path(@order)

View file

@ -77,11 +77,17 @@ de:
note: Notiz
starts: Läuft vom
status: Status
supplier: Lieferant
order_article:
article: Artikel
missing_units: Fehlende Einheiten
missing_units_short: Fehlende
units_to_order: Menge
missing_units_short: Fehlend
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
order_comment:
text: Kommentiere diese Bestellung ...
@ -1095,6 +1101,9 @@ de:
notice: Die Bestellung wurde erstellt.
edit:
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:
amount: Menge
articles: Artikel
@ -1113,12 +1122,14 @@ de:
title: Artikel
index:
action_end: Beenden
action_receive: In Empfang nehmen
closed_orders: Abgerechnete Bestellungen
confirm_delete: Willst Du wirklich die Bestellung löschen?
confirm_end: Willst Du wirklich die Bestellung %{order} beenden? Es gibt kein zurück.
ended_orders: Beendete Bestellungen
new_order: Neue Bestellung anlegen
no_open_orders: Derzeit gibt es keine laufende Bestellungen.
open_orders: Laufende Bestellungen
orders_in_progress: In Bearbeitung
title: Bestellungen verwalten
model:
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!'
new:
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:
action_end: Beenden!
amounts: ! 'Netto/Bruttosumme:'

View file

@ -77,11 +77,17 @@ en:
note: Note
starts: Starts at
status: Status
supplier: Supplier
order_article:
article: Article
missing_units: Missing units
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
order_comment:
text: Add comment to this order ...
@ -1090,9 +1096,6 @@ en:
new:
title: Add delivered article to order
orders:
add_article:
title: Add article
notice: Article "%{name}" was added to the order.
articles:
article_count: ! 'Ordered articles:'
prices: Net/gross price
@ -1104,7 +1107,7 @@ en:
edit:
title: Edit order
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.
fax:
amount: Amount
@ -1144,7 +1147,12 @@ en:
new:
title: Create new order
receive:
add_article: Add article
consider_member_tolerance: consider tolerance
rest_to_stock: rest to stock
submit: Receive order
surplus_options: 'Distribution options:'
title: Receiving %{order}
show:
action_end: Close!
amounts: ! 'Net/gross sum:'