From f83f6971e87e5988f9989b62972d7096eee08ec9 Mon Sep 17 00:00:00 2001 From: Julius Date: Sat, 4 Jan 2014 21:35:19 +0100 Subject: [PATCH] Rename update_current_price to update_global_price to avoid confusion --- app/models/order_article.rb | 10 +++++----- app/views/finance/order_articles/_edit.html.haml | 2 +- config/locales/de.yml | 4 ++-- config/locales/en.yml | 4 ++-- config/locales/fr.yml | 4 ++-- config/locales/nl.yml | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/models/order_article.rb b/app/models/order_article.rb index bf080464..b7c69c7d 100644 --- a/app/models/order_article.rb +++ b/app/models/order_article.rb @@ -1,7 +1,7 @@ # An OrderArticle represents a single Article that is part of an Order. class OrderArticle < ActiveRecord::Base - attr_reader :update_current_price + attr_reader :update_global_price belongs_to :order belongs_to :article @@ -107,8 +107,8 @@ class OrderArticle < ActiveRecord::Base if price_attributes.present? article_price.attributes = price_attributes if article_price.changed? - # Updates also price attributes of article if update_current_price is selected - if update_current_price + # Updates also price attributes of article if update_global_price is selected + if update_global_price article.update_attributes!(price_attributes) self.article_price = article.article_prices.first and save # Assign new created article price to order article else @@ -124,8 +124,8 @@ class OrderArticle < ActiveRecord::Base end end - def update_current_price=(value) - @update_current_price = (value == true or value == '1') ? true : false + def update_global_price=(value) + @update_global_price = (value == true or value == '1') ? true : false end # Units missing for the next full unit_quantity of the article diff --git a/app/views/finance/order_articles/_edit.html.haml b/app/views/finance/order_articles/_edit.html.haml index e783cfe1..a0d73754 100644 --- a/app/views/finance/order_articles/_edit.html.haml +++ b/app/views/finance/order_articles/_edit.html.haml @@ -15,7 +15,7 @@ = render partial: 'shared/article_fields_units', locals: {f_unit: f, f_uq: fprice} = render partial: 'shared/article_fields_price', locals: {f: fprice} - = form.input :update_current_price, as: :boolean + = form.input :update_global_price, as: :boolean = f.input :order_number .modal-footer = link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'} diff --git a/config/locales/de.yml b/config/locales/de.yml index bdc6fcbb..e54fbeed 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -81,7 +81,7 @@ de: missing_units: Fehlende Einheiten missing_units_short: Fehlende units_to_order: Menge - update_current_price: Globalen Preis aktualisieren + update_global_price: Globalen Preis aktualisieren order_comment: text: Kommentiere diese Bestellung ... ordergroup: @@ -1287,7 +1287,7 @@ de: private: Nachricht erscheint nicht im Foodsoft Posteingang order_article: units_to_order: Wenn Du die Gesamtanzahl gelieferter Gebinde änderst, musst Du auch die individuelle Anzahl der einzelnen Bestellgruppen anpassen, indem Du auf den Artikelnamen klickst. Sie werden nicht automatisch neuberechnet und andernfalls werden den Bestellgruppen Artikel in Rechnung gestellt, die nicht geliefert wurden! - update_current_price: Ändert auch den Preis für aktuelle Bestellungen + update_global_price: Ändert auch den Preis für zukünftige Bestellungen stock_article: copy: name: Bitte ändern diff --git a/config/locales/en.yml b/config/locales/en.yml index 86fea3bb..acd1ddf3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -81,7 +81,7 @@ en: missing_units: Missing units missing_units_short: Missing units_to_order: Amount of units - update_current_price: Globally update current price + update_global_price: Globally update current price order_comment: text: Add comment to this order ... ordergroup: @@ -1291,7 +1291,7 @@ en: private: Message doesn’t show in Foodsoft mail inbox order_article: units_to_order: If you change the total amount of delivered units, you also have to change individual group amounts by clicking on the article name. They will not be automatically recalculated and so ordergroups may be accounted for articles that were not delivered! - update_current_price: Also update the price of the current order + update_global_price: Also update the price of future orders stock_article: copy: name: Please modify diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e73a720b..67df564c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -81,7 +81,7 @@ fr: missing_units: Unités manquantes missing_units_short: units_to_order: Quantité - update_current_price: Mettre à jour le prix global + update_global_price: Mettre à jour le prix global order_comment: text: Commenter cette commande... ordergroup: @@ -1292,7 +1292,7 @@ fr: private: Le message n'apparaîtra pas dans la boîte de réception du Foodsoft order_article: units_to_order: - update_current_price: Modifie aussi le prix des commandes en cours + update_global_price: # ATTENTION, MEANING CHANGED. OLD (NOW WRONG) TRANSLATION WAS 'Modifie aussi le prix des commandes en cours' stock_article: copy: name: Merci de modifier diff --git a/config/locales/nl.yml b/config/locales/nl.yml index e11dfebc..f99dbfca 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -81,7 +81,7 @@ nl: missing_units: Missende eenheden missing_units_short: Nodig units_to_order: Aantal eenheden - update_current_price: Huidige prijs overal bijwerken + update_global_price: Huidige prijs overal bijwerken order_comment: text: Commentaar voor deze bestelling toevoegen ... ordergroup: @@ -1269,7 +1269,7 @@ nl: private: Bericht wordt niet getoond in de Foodsoft inbox. order_article: units_to_order: Als je het aantal geleverde eenheden wijzigt, moet je daarna de hoeveelheden voor huishoudens aanpassen. Klik daarvoor op de artikelnaam. Als je dit vergeet, kunnen huishoudens belast worden voor artikelen die ze niet hebben gekregen! - update_current_price: Ook prijs in huidige besteling aanpassen + update_global_price: # ATTENTION, MEANING CHANGED. OLD (NOW WRONG) TRANSLATION WAS 'Ook prijs in huidige besteling aanpassen' stock_article: copy: name: Wijzigen alsjeblieft