Merge branch 'master' of http://github.com/foodcoops/foodsoft
This commit is contained in:
commit
dd54cdce7a
13 changed files with 209 additions and 151 deletions
|
@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def deny_access
|
def deny_access
|
||||||
session[:return_to] = request.original_url
|
session[:return_to] = request.original_url
|
||||||
redirect_to login_url, :alert => 'Access denied!'
|
redirect_to login_url, :alert => I18n.t('application.controller.error_denied')
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -37,7 +37,7 @@ class ApplicationController < ActionController::Base
|
||||||
# No user at all: redirect to login page.
|
# No user at all: redirect to login page.
|
||||||
session[:user_id] = nil
|
session[:user_id] = nil
|
||||||
session[:return_to] = request.original_url
|
session[:return_to] = request.original_url
|
||||||
redirect_to login_url, :alert => 'Authentication required!'
|
redirect_to login_url, :alert => I18n.t('application.controller.error_authn')
|
||||||
else
|
else
|
||||||
# We have an authenticated user, now check role...
|
# We have an authenticated user, now check role...
|
||||||
# Roles gets the user through his memberships.
|
# Roles gets the user through his memberships.
|
||||||
|
@ -83,7 +83,7 @@ class ApplicationController < ActionController::Base
|
||||||
def authenticate_membership_or_admin
|
def authenticate_membership_or_admin
|
||||||
@group = Group.find(params[:id])
|
@group = Group.find(params[:id])
|
||||||
unless @group.member?(@current_user) or @current_user.role_admin?
|
unless @group.member?(@current_user) or @current_user.role_admin?
|
||||||
redirect_to root_path, alert: "Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!"
|
redirect_to root_path, alert: I18n.t('application.controller.error_members_only')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Finance::BalancingController < Finance::BaseController
|
||||||
flash.now.alert = t('finance.balancing.new.alert') if @order.closed?
|
flash.now.alert = t('finance.balancing.new.alert') if @order.closed?
|
||||||
@comments = @order.comments
|
@comments = @order.comments
|
||||||
|
|
||||||
@articles = @order.order_articles.ordered.includes(:article, :article_price,
|
@articles = @order.order_articles.ordered_or_member.includes(:article, :article_price,
|
||||||
group_order_articles: {group_order: :ordergroup})
|
group_order_articles: {group_order: :ordergroup})
|
||||||
|
|
||||||
sort_param = params['sort'] || 'name'
|
sort_param = params['sort'] || 'name'
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Finance::FinancialTransactionsController < ApplicationController
|
||||||
@financial_transaction = FinancialTransaction.new(params[:financial_transaction])
|
@financial_transaction = FinancialTransaction.new(params[:financial_transaction])
|
||||||
@financial_transaction.user = current_user
|
@financial_transaction.user = current_user
|
||||||
@financial_transaction.add_transaction!
|
@financial_transaction.add_transaction!
|
||||||
redirect_to finance_ordergroup_transactions_url(@ordergroup), notice: t('finance.financial_transactions.create.notice')
|
redirect_to finance_ordergroup_transactions_url(@ordergroup), notice: I18n.t('finance.financial_transactions.controller.create.notice')
|
||||||
rescue ActiveRecord::RecordInvalid => error
|
rescue ActiveRecord::RecordInvalid => error
|
||||||
flash.now[:alert] = error.message
|
flash.now[:alert] = error.message
|
||||||
render :action => :new
|
render :action => :new
|
||||||
|
@ -44,16 +44,16 @@ class Finance::FinancialTransactionsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_collection
|
def create_collection
|
||||||
raise "Notiz wird benötigt!" if params[:note].blank?
|
raise I18n.t('finance.financial_transactions.controller.create_collection.error_note_required') if params[:note].blank?
|
||||||
params[:financial_transactions].each do |trans|
|
params[:financial_transactions].each do |trans|
|
||||||
# ignore empty amount fields ...
|
# ignore empty amount fields ...
|
||||||
unless trans[:amount].blank?
|
unless trans[:amount].blank?
|
||||||
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction!(trans[:amount], params[:note], @current_user)
|
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction!(trans[:amount], params[:note], @current_user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to finance_ordergroups_url, notice: t('finance.create_collection.create.notice')
|
redirect_to finance_ordergroups_url, notice: I18n.t('finance.financial_transactions.controller.create_collection.notice')
|
||||||
rescue => error
|
rescue => error
|
||||||
redirect_to finance_new_transaction_collection_url, alert: t('finance.create_collection.create.alert', error: error.to_s)
|
redirect_to finance_new_transaction_collection_url, alert: I18n.t('finance.financial_transactions.controller.create_collection.alert', error: error.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -12,7 +12,8 @@ class OrderArticle < ActiveRecord::Base
|
||||||
validate :article_and_price_exist
|
validate :article_and_price_exist
|
||||||
validates_uniqueness_of :article_id, scope: :order_id
|
validates_uniqueness_of :article_id, scope: :order_id
|
||||||
|
|
||||||
scope :ordered, :conditions => "units_to_order >= 1"
|
scope :ordered, :conditions => "units_to_order > 0"
|
||||||
|
scope :ordered_or_member, -> { includes(:group_order_articles).where("units_to_order > 0 OR group_order_articles.result > 0") }
|
||||||
|
|
||||||
before_create :init_from_balancing
|
before_create :init_from_balancing
|
||||||
after_destroy :update_ordergroup_prices
|
after_destroy :update_ordergroup_prices
|
||||||
|
|
|
@ -5,21 +5,19 @@
|
||||||
|
|
||||||
$('#stock_changes tr').removeClass('success');
|
$('#stock_changes tr').removeClass('success');
|
||||||
|
|
||||||
|
var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>');
|
||||||
|
if(null === quantity) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var stock_change = $(
|
var stock_change = $(
|
||||||
'<%= j(render(:partial => 'stock_change', :locals => {:stock_change => @stock_change})) %>'
|
'<%= j(render(:partial => 'stock_change', :locals => {:stock_change => @stock_change})) %>'
|
||||||
).addClass('success');
|
).addClass('success');
|
||||||
enablePriceTooltips(stock_change);
|
enablePriceTooltips(stock_change);
|
||||||
|
$('input.stock-change-quantity', stock_change).val(quantity);
|
||||||
|
|
||||||
$('#stock_changes').append(stock_change);
|
$('#stock_changes').append(stock_change);
|
||||||
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
|
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
|
||||||
updateSort('#stock_changes');
|
updateSort('#stock_changes');
|
||||||
|
|
||||||
var quantity = w.prompt('<%= j(t('.how_many_units', :unit => @stock_change.stock_article.unit, :name => @stock_change.stock_article.name)) %>'); <%# how to properly escape here? %>
|
|
||||||
if(null === quantity) {
|
|
||||||
stock_change.remove();
|
|
||||||
mark_article_for_delivery(<%= @stock_change.stock_article.id %>);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$('input.stock-change-quantity', stock_change).val(quantity);
|
|
||||||
|
|
||||||
})(window);
|
})(window);
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
= form.hidden_field :group_id
|
= form.hidden_field :group_id
|
||||||
= form.input :email
|
= form.input :email
|
||||||
= form.submit t('.action')
|
= form.submit t('.action')
|
||||||
= link_to t('.back'), :back
|
= link_to t('ui.or_cancel'), :back
|
||||||
|
|
|
@ -212,6 +212,11 @@ de:
|
||||||
workgroups:
|
workgroups:
|
||||||
members: Mitglieder
|
members: Mitglieder
|
||||||
name: Name
|
name: Name
|
||||||
|
application:
|
||||||
|
controller:
|
||||||
|
error_authn:
|
||||||
|
error_denied:
|
||||||
|
error_members_only: Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!
|
||||||
article_categories:
|
article_categories:
|
||||||
create:
|
create:
|
||||||
notice: Die Kategorie wurde gespeichert
|
notice: Die Kategorie wurde gespeichert
|
||||||
|
@ -644,10 +649,12 @@ de:
|
||||||
create:
|
create:
|
||||||
notice: Rechnung wurde erstellt.
|
notice: Rechnung wurde erstellt.
|
||||||
financial_transactions:
|
financial_transactions:
|
||||||
|
controller:
|
||||||
create:
|
create:
|
||||||
notice: Die Transaktion wurde gespeichert.
|
notice: Die Transaktion wurde gespeichert.
|
||||||
create_collection:
|
create_collection:
|
||||||
alert: ! 'Ein Fehler ist aufgetreten: %{error}'
|
alert: ! 'Ein Fehler ist aufgetreten: %{error}'
|
||||||
|
error_note_required: Notiz wird benötigt!
|
||||||
notice: Alle Transaktionen wurden gespeichert.
|
notice: Alle Transaktionen wurden gespeichert.
|
||||||
index:
|
index:
|
||||||
balance: ! 'Kontostand: %{balance}'
|
balance: ! 'Kontostand: %{balance}'
|
||||||
|
@ -971,7 +978,6 @@ de:
|
||||||
title: Person einladen
|
title: Person einladen
|
||||||
new:
|
new:
|
||||||
action: Einlading abschicken
|
action: Einlading abschicken
|
||||||
back: oder zurück
|
|
||||||
body: <p>Hier kannst du eine Person in die Gruppe <b>%{group}</b> einladen, die noch nicht Mitglied der Foodcoop ist.</p>
|
body: <p>Hier kannst du eine Person in die Gruppe <b>%{group}</b> einladen, die noch nicht Mitglied der Foodcoop ist.</p>
|
||||||
success: Benutzerin wurde erfolgreich eingeladen.
|
success: Benutzerin wurde erfolgreich eingeladen.
|
||||||
layouts:
|
layouts:
|
||||||
|
|
|
@ -212,6 +212,11 @@ en:
|
||||||
workgroups:
|
workgroups:
|
||||||
members: members
|
members: members
|
||||||
name: name
|
name: name
|
||||||
|
application:
|
||||||
|
controller:
|
||||||
|
error_authn: Authentication required!
|
||||||
|
error_denied: Access denied!
|
||||||
|
error_members_only: This action is only available to members of the group!
|
||||||
article_categories:
|
article_categories:
|
||||||
create:
|
create:
|
||||||
notice: Category was stored
|
notice: Category was stored
|
||||||
|
@ -430,7 +435,7 @@ en:
|
||||||
create:
|
create:
|
||||||
notice: Delivery was created. Please don’t forget to create invoice!
|
notice: Delivery was created. Please don’t forget to create invoice!
|
||||||
create_stock_article:
|
create_stock_article:
|
||||||
notice: The new stock article »%{name}« was saved.
|
notice: The new stock article "%{name}" was saved.
|
||||||
destroy:
|
destroy:
|
||||||
notice: Delivery was deleted.
|
notice: Delivery was deleted.
|
||||||
edit:
|
edit:
|
||||||
|
@ -478,7 +483,7 @@ en:
|
||||||
update:
|
update:
|
||||||
notice: Delivery was updated.
|
notice: Delivery was updated.
|
||||||
update_stock_article:
|
update_stock_article:
|
||||||
notice: The stock article »%{name}« was updated.
|
notice: The stock article "%{name}" was updated.
|
||||||
documents:
|
documents:
|
||||||
order_by_articles:
|
order_by_articles:
|
||||||
filename: Order %{name}-%{date} - by articles
|
filename: Order %{name}-%{date} - by articles
|
||||||
|
@ -648,10 +653,12 @@ en:
|
||||||
create:
|
create:
|
||||||
notice: Invoice was created
|
notice: Invoice was created
|
||||||
financial_transactions:
|
financial_transactions:
|
||||||
|
controller:
|
||||||
create:
|
create:
|
||||||
notice: The transaction was saved.
|
notice: The transaction was saved.
|
||||||
create_collection:
|
create_collection:
|
||||||
alert: ! 'An error occured: %{error}'
|
alert: ! 'An error occured: %{error}'
|
||||||
|
error_note_required: Note is required!
|
||||||
notice: All transactions were saved.
|
notice: All transactions were saved.
|
||||||
index:
|
index:
|
||||||
balance: ! 'Balance of account: %{balance}'
|
balance: ! 'Balance of account: %{balance}'
|
||||||
|
@ -898,7 +905,7 @@ en:
|
||||||
warning: Warning, if you have less then %{threshold} of apple points, you are not allowed to place an order!
|
warning: Warning, if you have less then %{threshold} of apple points, you are not allowed to place an order!
|
||||||
changes_saved: Changes saved.
|
changes_saved: Changes saved.
|
||||||
index:
|
index:
|
||||||
due_date_format: ! '%A %d %b'
|
due_date_format: ! '%A %d %B'
|
||||||
messages:
|
messages:
|
||||||
title: Newest Messages
|
title: Newest Messages
|
||||||
view_all: See all messages
|
view_all: See all messages
|
||||||
|
@ -975,7 +982,6 @@ en:
|
||||||
title: Invite person
|
title: Invite person
|
||||||
new:
|
new:
|
||||||
action: Send invite
|
action: Send invite
|
||||||
back: or go back
|
|
||||||
body: <p>Here you can add a person to the group <b>%{group}</b>, who is not yet a member of the foodcoop.</p>
|
body: <p>Here you can add a person to the group <b>%{group}</b>, who is not yet a member of the foodcoop.</p>
|
||||||
success: User was invited successfully.
|
success: User was invited successfully.
|
||||||
layouts:
|
layouts:
|
||||||
|
@ -1313,7 +1319,7 @@ en:
|
||||||
prices: Prices (net/FC)
|
prices: Prices (net/FC)
|
||||||
select_all: Select all
|
select_all: Select all
|
||||||
stockit: In stock
|
stockit: In stock
|
||||||
supplier: Supplier
|
supplier: Producer
|
||||||
title: Article
|
title: Article
|
||||||
unit_quantity: Unit quantity
|
unit_quantity: Unit quantity
|
||||||
index:
|
index:
|
||||||
|
@ -1395,7 +1401,7 @@ en:
|
||||||
notice: Page was created
|
notice: Page was created
|
||||||
cshow:
|
cshow:
|
||||||
error_noexist: Page doesn’t exist!
|
error_noexist: Page doesn’t exist!
|
||||||
redirect_notice: Redirected from %{page} ..
|
redirect_notice: Redirected from %{page} ...
|
||||||
destroy:
|
destroy:
|
||||||
notice: The page '%{page}' and all subpages have been deleted successfully.
|
notice: The page '%{page}' and all subpages have been deleted successfully.
|
||||||
edit:
|
edit:
|
||||||
|
@ -1536,7 +1542,7 @@ en:
|
||||||
message:
|
message:
|
||||||
private: Message doesn’t show in Foodsoft mail inbox
|
private: Message doesn’t show in Foodsoft mail inbox
|
||||||
order_article:
|
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 otherwise ordergroups will be accounted for undelivered articles!
|
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_current_price: Also update the price of the current order
|
||||||
stock_article:
|
stock_article:
|
||||||
copy_stock_article:
|
copy_stock_article:
|
||||||
|
@ -1866,7 +1872,7 @@ en:
|
||||||
title: Show task
|
title: Show task
|
||||||
update:
|
update:
|
||||||
notice: Task has been updated
|
notice: Task has been updated
|
||||||
notice_converted: Task has been updated and was converted to a regular task
|
notice_converted: Task has been updated and was converted to a non-repeating task.
|
||||||
user:
|
user:
|
||||||
more: Nothing to do? %{tasks_link} are tasks for sure.
|
more: Nothing to do? %{tasks_link} are tasks for sure.
|
||||||
tasks_link: Here
|
tasks_link: Here
|
||||||
|
|
|
@ -212,6 +212,11 @@ fr:
|
||||||
workgroups:
|
workgroups:
|
||||||
members: membres
|
members: membres
|
||||||
name: nom
|
name: nom
|
||||||
|
application:
|
||||||
|
controller:
|
||||||
|
error_authn:
|
||||||
|
error_denied:
|
||||||
|
error_members_only:
|
||||||
article_categories:
|
article_categories:
|
||||||
create:
|
create:
|
||||||
notice: La catégorie a bien été définie.
|
notice: La catégorie a bien été définie.
|
||||||
|
@ -655,10 +660,12 @@ fr:
|
||||||
create:
|
create:
|
||||||
notice: La facture a bien été définie.
|
notice: La facture a bien été définie.
|
||||||
financial_transactions:
|
financial_transactions:
|
||||||
|
controller:
|
||||||
create:
|
create:
|
||||||
notice: La transaction a été sauvegardée.
|
notice: La transaction a été sauvegardée.
|
||||||
create_collection:
|
create_collection:
|
||||||
alert: ! 'Une erreur s''est produite: %{error}'
|
alert: ! 'Une erreur s''est produite: %{error}'
|
||||||
|
error_note_required:
|
||||||
notice: Les transactions ont été sauvegardées.
|
notice: Les transactions ont été sauvegardées.
|
||||||
index:
|
index:
|
||||||
balance: ! 'Solde: %{balance}'
|
balance: ! 'Solde: %{balance}'
|
||||||
|
@ -994,7 +1001,6 @@ fr:
|
||||||
title: Engrainer une personne
|
title: Engrainer une personne
|
||||||
new:
|
new:
|
||||||
action: Engrainer!
|
action: Engrainer!
|
||||||
back: ou revenir en arrière
|
|
||||||
body: <p>Sur cette page, tu peux engrainer une personne qui ne fait pas encore partie de la Boufcoop à rejoindre la cellule <b>%{group}</b>
|
body: <p>Sur cette page, tu peux engrainer une personne qui ne fait pas encore partie de la Boufcoop à rejoindre la cellule <b>%{group}</b>
|
||||||
success: La_le membre a été engrainéE avec succès!
|
success: La_le membre a été engrainéE avec succès!
|
||||||
layouts:
|
layouts:
|
||||||
|
@ -1288,7 +1294,7 @@ fr:
|
||||||
article_count: ! 'Articles commandés:'
|
article_count: ! 'Articles commandés:'
|
||||||
name: Nom
|
name: Nom
|
||||||
prices: Prix brut/net
|
prices: Prix brut/net
|
||||||
prices_sum: Totaux (des prix bruts/nets)
|
prices_sum: ! 'Totaux (des prix bruts/nets):'
|
||||||
unit_quantity: Unités par lots x Lots
|
unit_quantity: Unités par lots x Lots
|
||||||
units_full: Lots complet
|
units_full: Lots complet
|
||||||
units_ordered: Unités commandées
|
units_ordered: Unités commandées
|
||||||
|
@ -1536,7 +1542,7 @@ fr:
|
||||||
message:
|
message:
|
||||||
private: Le message n'apparaîtra pas dans la boîte de réception du Foodsoft
|
private: Le message n'apparaîtra pas dans la boîte de réception du Foodsoft
|
||||||
order_article:
|
order_article:
|
||||||
units_to_order: Nombre de lots livrés
|
units_to_order:
|
||||||
update_current_price: Modifie aussi le prix des commandes en cours
|
update_current_price: Modifie aussi le prix des commandes en cours
|
||||||
stock_article:
|
stock_article:
|
||||||
copy_stock_article:
|
copy_stock_article:
|
||||||
|
|
|
@ -212,6 +212,11 @@ nl:
|
||||||
workgroups:
|
workgroups:
|
||||||
members: leden
|
members: leden
|
||||||
name: naam
|
name: naam
|
||||||
|
application:
|
||||||
|
controller:
|
||||||
|
error_authn: Inloggen vereist.
|
||||||
|
error_denied: Geen toegang.
|
||||||
|
error_members_only: Deze actie is alleen beschikbaar voor leden van de groep!
|
||||||
article_categories:
|
article_categories:
|
||||||
create:
|
create:
|
||||||
notice: Categorie is opgeslagen
|
notice: Categorie is opgeslagen
|
||||||
|
@ -428,11 +433,11 @@ nl:
|
||||||
add_stock_change:
|
add_stock_change:
|
||||||
how_many_units:
|
how_many_units:
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: Levering is aangemaakt. Vergeet niet een factuur te maken!
|
||||||
create_stock_article:
|
create_stock_article:
|
||||||
notice:
|
notice: Nieuw voorraadsartikel "%{name}" gemaakt.
|
||||||
destroy:
|
destroy:
|
||||||
notice:
|
notice: Levering is verwijdered.
|
||||||
edit:
|
edit:
|
||||||
title:
|
title:
|
||||||
form:
|
form:
|
||||||
|
@ -476,7 +481,7 @@ nl:
|
||||||
remove_article:
|
remove_article:
|
||||||
suppliers_overview:
|
suppliers_overview:
|
||||||
update:
|
update:
|
||||||
notice:
|
notice: Levering is bijgewerkt.
|
||||||
update_stock_article:
|
update_stock_article:
|
||||||
notice:
|
notice:
|
||||||
documents:
|
documents:
|
||||||
|
@ -645,10 +650,12 @@ nl:
|
||||||
create:
|
create:
|
||||||
notice: Rekening is gemaakt
|
notice: Rekening is gemaakt
|
||||||
financial_transactions:
|
financial_transactions:
|
||||||
|
controller:
|
||||||
create:
|
create:
|
||||||
notice: De transactie is opgeslagen.
|
notice: De transactie is opgeslagen.
|
||||||
create_collection:
|
create_collection:
|
||||||
alert:
|
alert:
|
||||||
|
error_note_required: Notitie ontbreekt.
|
||||||
notice: Alle transacties zijn opgeslagen.
|
notice: Alle transacties zijn opgeslagen.
|
||||||
index:
|
index:
|
||||||
balance: ! 'Tegoed: %{balance}'
|
balance: ! 'Tegoed: %{balance}'
|
||||||
|
@ -668,8 +675,8 @@ nl:
|
||||||
sidebar:
|
sidebar:
|
||||||
title:
|
title:
|
||||||
ordergroup:
|
ordergroup:
|
||||||
remove:
|
remove: Verwijderen
|
||||||
remove_group:
|
remove_group: Huishouden verwijderen
|
||||||
transactions:
|
transactions:
|
||||||
amount: Bedrag
|
amount: Bedrag
|
||||||
date: Datum
|
date: Datum
|
||||||
|
@ -856,7 +863,7 @@ nl:
|
||||||
title: Lopende bestellingen
|
title: Lopende bestellingen
|
||||||
update:
|
update:
|
||||||
error_general:
|
error_general:
|
||||||
error_stale:
|
error_stale: In de tussentijd heeft iemand anders ook bestelt, daarom kon je bestelling niet opgeslagen worden. Sorry!
|
||||||
notice: De bestelling is opgeslagen.
|
notice: De bestelling is opgeslagen.
|
||||||
helpers:
|
helpers:
|
||||||
application:
|
application:
|
||||||
|
@ -890,19 +897,19 @@ nl:
|
||||||
home:
|
home:
|
||||||
apple_bar:
|
apple_bar:
|
||||||
desc:
|
desc:
|
||||||
more_info:
|
more_info: Meer informatie
|
||||||
points:
|
points:
|
||||||
warning:
|
warning:
|
||||||
changes_saved: Wijzigingen opgeslagen.
|
changes_saved: Wijzigingen opgeslagen.
|
||||||
index:
|
index:
|
||||||
due_date_format:
|
due_date_format: ! '%A %d %B'
|
||||||
messages:
|
messages:
|
||||||
title:
|
title:
|
||||||
view_all:
|
view_all:
|
||||||
my_ordergroup:
|
my_ordergroup:
|
||||||
funds:
|
funds: ! '| Beschikbaar tegoed:'
|
||||||
last_update:
|
last_update: Laatst gewijzigd %{when} geleden
|
||||||
title:
|
title: Mijn huishouden
|
||||||
transactions:
|
transactions:
|
||||||
amount: Bedrag
|
amount: Bedrag
|
||||||
note: Notitie
|
note: Notitie
|
||||||
|
@ -913,13 +920,13 @@ nl:
|
||||||
ordergroup:
|
ordergroup:
|
||||||
title:
|
title:
|
||||||
tasks_move:
|
tasks_move:
|
||||||
action:
|
action: Taken op je nemen/annuleren
|
||||||
desc:
|
desc: Je bent voor de volgende taken verantwoordelijk.
|
||||||
title:
|
title: Taken op je nemen
|
||||||
tasks_open:
|
tasks_open:
|
||||||
action:
|
action: open taken
|
||||||
desc:
|
desc: Er zijn %{size}
|
||||||
title:
|
title: open taken
|
||||||
title: Beginpagina
|
title: Beginpagina
|
||||||
your_tasks: Jouw taken
|
your_tasks: Jouw taken
|
||||||
no_ordergroups: Jammergenoeg ben je niet aangesloten bij een huishouden.
|
no_ordergroups: Jammergenoeg ben je niet aangesloten bij een huishouden.
|
||||||
|
@ -946,7 +953,7 @@ nl:
|
||||||
admin:
|
admin:
|
||||||
finances:
|
finances:
|
||||||
accounts: Tegoeden bijwerken
|
accounts: Tegoeden bijwerken
|
||||||
settle:
|
settle: Bestelling afrekenen
|
||||||
title: Financiën
|
title: Financiën
|
||||||
foodcoop: Foodcoop
|
foodcoop: Foodcoop
|
||||||
members: Leden
|
members: Leden
|
||||||
|
@ -972,7 +979,6 @@ nl:
|
||||||
title:
|
title:
|
||||||
new:
|
new:
|
||||||
action:
|
action:
|
||||||
back:
|
|
||||||
body:
|
body:
|
||||||
success:
|
success:
|
||||||
layouts:
|
layouts:
|
||||||
|
@ -1052,16 +1058,34 @@ nl:
|
||||||
|
|
||||||
Vriendelijke groet van %{foodcoop}.'
|
Vriendelijke groet van %{foodcoop}.'
|
||||||
reset_password:
|
reset_password:
|
||||||
subject:
|
subject: Nieuw wachtwoord voor %{username}
|
||||||
text:
|
text: ! 'Beste %{user},
|
||||||
|
|
||||||
|
|
||||||
|
Jij (of iemand anders) heeft een nieuw wachtwoord aangevraagd voor het foodcoop ordersysteem.
|
||||||
|
|
||||||
|
Ga naar de volgende pagina om een nieuw wachtwoord in te voeren: %{link}
|
||||||
|
|
||||||
|
Dit kan slechts éenmaal gedaan worden, en op zijn laatst op %{expires}.
|
||||||
|
|
||||||
|
Wanneer je je wachtwoord niet wilt veranderen, hoef je niets te doen; dan blijft je huidige wachtwoord geldig.
|
||||||
|
|
||||||
|
|
||||||
|
Groeten van je foodcoop!'
|
||||||
upcoming_tasks:
|
upcoming_tasks:
|
||||||
nextweek:
|
nextweek: ! 'Taken voor komende week:'
|
||||||
subject:
|
subject: Er is een taak te doen!
|
||||||
text0:
|
text0: ! 'Beste %{user},
|
||||||
text1:
|
|
||||||
|
|
||||||
|
Je bent opgegeven voor "%{task}". Deze taak is morgen te vervullen (%{when})!'
|
||||||
|
text1: ! 'Mijn taken: %{user_tasks_url}
|
||||||
|
|
||||||
|
|
||||||
|
Groeten van %{foodcoop}.'
|
||||||
messages:
|
messages:
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: Bericht is opgeslagen en wordt verzonden.
|
||||||
index:
|
index:
|
||||||
new:
|
new:
|
||||||
title:
|
title:
|
||||||
|
@ -1078,9 +1102,9 @@ nl:
|
||||||
subscribe:
|
subscribe:
|
||||||
subscribe_msg:
|
subscribe_msg:
|
||||||
wiki:
|
wiki:
|
||||||
no_user_found:
|
no_user_found: Geen gebruiker gevonden
|
||||||
search:
|
search: Zoeken ...
|
||||||
search_user:
|
search_user: Gebruiker zoeken
|
||||||
title:
|
title:
|
||||||
show:
|
show:
|
||||||
all_messages:
|
all_messages:
|
||||||
|
@ -1091,15 +1115,15 @@ nl:
|
||||||
title:
|
title:
|
||||||
model:
|
model:
|
||||||
delivery:
|
delivery:
|
||||||
each_stock_article_must_be_unique:
|
each_stock_article_must_be_unique: In een levering mag ieder voorraadsartikel maar een keer voorkomen.
|
||||||
membership:
|
membership:
|
||||||
no_admin_delete:
|
no_admin_delete: Lidmaatschap kan niet beeindigd worden. Je bent de laatste administrator.
|
||||||
order_article:
|
order_article:
|
||||||
error_price:
|
error_price: moet ingevuld worden en een huidige prijs hebben
|
||||||
page:
|
page:
|
||||||
redirect:
|
redirect: Doorverwijzing naar [[%{title}]]...
|
||||||
user:
|
user:
|
||||||
no_ordergroup:
|
no_ordergroup: geen huishouden
|
||||||
navigation:
|
navigation:
|
||||||
admin:
|
admin:
|
||||||
home: Overzicht
|
home: Overzicht
|
||||||
|
@ -1187,46 +1211,46 @@ nl:
|
||||||
delimiter:
|
delimiter:
|
||||||
ordergroups:
|
ordergroups:
|
||||||
edit:
|
edit:
|
||||||
title:
|
title: Huidhouden bewerken
|
||||||
index:
|
index:
|
||||||
title:
|
title: Huishoudens
|
||||||
model:
|
model:
|
||||||
error_single_group:
|
error_single_group: ! '%{user} behoort al tot een ander huishouden'
|
||||||
invalid_balance:
|
invalid_balance: is geen geldig nummer
|
||||||
orders:
|
orders:
|
||||||
articles:
|
articles:
|
||||||
article_count:
|
article_count: ! 'Bestelde artikelen:'
|
||||||
name:
|
name: Naam
|
||||||
prices:
|
prices: Netto/bruto prijs
|
||||||
prices_sum:
|
prices_sum: ! 'Totaal (netto/bruto prijs):'
|
||||||
unit_quantity:
|
unit_quantity: Groothandelseenheid
|
||||||
units_full:
|
units_full: Volle eenheden
|
||||||
units_ordered:
|
units_ordered: Bestelde eenheden
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: De bestelling is aangemaakt.
|
||||||
edit:
|
edit:
|
||||||
title:
|
title: Bestelling aanpassen
|
||||||
fax:
|
fax:
|
||||||
amount:
|
amount: Aantal
|
||||||
articles:
|
articles: Artikelen
|
||||||
customer_number:
|
customer_number: Klantnummer
|
||||||
delivery_day:
|
delivery_day: Bezorgdag
|
||||||
heading:
|
heading: Bestelling voor %{name}
|
||||||
name:
|
name: Naam
|
||||||
number:
|
number: Nummer
|
||||||
to_address:
|
to_address: Verzendadres
|
||||||
finish:
|
finish:
|
||||||
notice: De bestelling is gesloten.
|
notice: De bestelling is gesloten.
|
||||||
form:
|
form:
|
||||||
ignore_warnings:
|
ignore_warnings: Waarschuwingen negeren
|
||||||
name:
|
name: Naam
|
||||||
note:
|
note: Notitie
|
||||||
origin:
|
origin: Herkomst
|
||||||
prices:
|
prices: Prijs (netto/FC)
|
||||||
select_all:
|
select_all: Alles selecteren
|
||||||
stockit:
|
stockit: Beschikbaar
|
||||||
supplier:
|
supplier: Producent
|
||||||
title:
|
title: Artikel
|
||||||
unit_quantity:
|
unit_quantity:
|
||||||
index:
|
index:
|
||||||
action_end:
|
action_end:
|
||||||
|
@ -1244,7 +1268,7 @@ nl:
|
||||||
error_closed: Bestelling was al afgerekend
|
error_closed: Bestelling was al afgerekend
|
||||||
error_nosel:
|
error_nosel:
|
||||||
error_starts_before_ends:
|
error_starts_before_ends:
|
||||||
notice_close:
|
notice_close: ! 'Bestelling: %{name}, tot %{ends}'
|
||||||
stock: Voorraad
|
stock: Voorraad
|
||||||
warning_ordered:
|
warning_ordered:
|
||||||
warning_ordered_stock:
|
warning_ordered_stock:
|
||||||
|
@ -1288,7 +1312,7 @@ nl:
|
||||||
finished: gesloten
|
finished: gesloten
|
||||||
open: lopend
|
open: lopend
|
||||||
update:
|
update:
|
||||||
notice:
|
notice: De bestelling is bijgewerkt.
|
||||||
pages:
|
pages:
|
||||||
all:
|
all:
|
||||||
new_page:
|
new_page:
|
||||||
|
@ -1302,12 +1326,12 @@ nl:
|
||||||
body:
|
body:
|
||||||
title_toc:
|
title_toc:
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: Pagina is gemaakt.
|
||||||
cshow:
|
cshow:
|
||||||
error_noexist:
|
error_noexist:
|
||||||
redirect_notice:
|
redirect_notice: Doorverwezen van %{page} ...
|
||||||
destroy:
|
destroy:
|
||||||
notice:
|
notice: De pagina '%{page}' en alle subpagina's zijn verwijderd.
|
||||||
edit:
|
edit:
|
||||||
title:
|
title:
|
||||||
error_stale_object:
|
error_stale_object:
|
||||||
|
@ -1351,7 +1375,7 @@ nl:
|
||||||
versions:
|
versions:
|
||||||
title:
|
title:
|
||||||
update:
|
update:
|
||||||
notice:
|
notice: Pagina is bijgewerkt.
|
||||||
version:
|
version:
|
||||||
author:
|
author:
|
||||||
date_format:
|
date_format:
|
||||||
|
@ -1394,11 +1418,11 @@ nl:
|
||||||
address: Adres
|
address: Adres
|
||||||
apple_limit:
|
apple_limit:
|
||||||
contact: Contact
|
contact: Contact
|
||||||
deactivated:
|
deactivated: inactief
|
||||||
description:
|
description: Beschrijving
|
||||||
members: Leden
|
members: Leden
|
||||||
no_weekly_job:
|
no_weekly_job: geen wekelijkse taak ingesteld
|
||||||
weekly_job:
|
weekly_job: wekelijkse taak
|
||||||
group_form_fields:
|
group_form_fields:
|
||||||
search: Zoeken ...
|
search: Zoeken ...
|
||||||
search_user: Gebruiker zoeken
|
search_user: Gebruiker zoeken
|
||||||
|
@ -1407,8 +1431,8 @@ nl:
|
||||||
loginInfo:
|
loginInfo:
|
||||||
edit_profile: Profiel aanpassen
|
edit_profile: Profiel aanpassen
|
||||||
feedback:
|
feedback:
|
||||||
desc:
|
desc: Fout gevonden? Opmerking? Idee?
|
||||||
title:
|
title: Feedback
|
||||||
help: Help
|
help: Help
|
||||||
homepage_title: Foodcoop startpagina bezoeken
|
homepage_title: Foodcoop startpagina bezoeken
|
||||||
logout: Uitloggen
|
logout: Uitloggen
|
||||||
|
@ -1436,7 +1460,7 @@ nl:
|
||||||
total_sum: Totaalsom
|
total_sum: Totaalsom
|
||||||
who_ordered: Wie heeft besteld?
|
who_ordered: Wie heeft besteld?
|
||||||
workgroup_members:
|
workgroup_members:
|
||||||
title:
|
title: Groepsleden
|
||||||
simple_form:
|
simple_form:
|
||||||
error_notification:
|
error_notification:
|
||||||
default_message:
|
default_message:
|
||||||
|
@ -1550,7 +1574,7 @@ nl:
|
||||||
address:
|
address:
|
||||||
contact_person:
|
contact_person:
|
||||||
customer_number:
|
customer_number:
|
||||||
delivery_days:
|
delivery_days: Bezorgdagen
|
||||||
email:
|
email:
|
||||||
fax:
|
fax:
|
||||||
is_subscribed:
|
is_subscribed:
|
||||||
|
@ -1601,7 +1625,7 @@ nl:
|
||||||
'yes': Ja
|
'yes': Ja
|
||||||
stock_takings:
|
stock_takings:
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: Inventarisatie is aangelegd.
|
||||||
edit:
|
edit:
|
||||||
title:
|
title:
|
||||||
index:
|
index:
|
||||||
|
@ -1629,12 +1653,12 @@ nl:
|
||||||
date:
|
date:
|
||||||
note:
|
note:
|
||||||
update:
|
update:
|
||||||
notice:
|
notice: Inventarisatie is bijgewerkt.
|
||||||
stockit:
|
stockit:
|
||||||
check:
|
check:
|
||||||
not_empty:
|
not_empty:
|
||||||
destroy:
|
destroy:
|
||||||
notice:
|
notice: Artikel %{name} is verwijdered.
|
||||||
edit:
|
edit:
|
||||||
title:
|
title:
|
||||||
form:
|
form:
|
||||||
|
@ -1674,14 +1698,14 @@ nl:
|
||||||
search_text:
|
search_text:
|
||||||
title:
|
title:
|
||||||
stock_create:
|
stock_create:
|
||||||
notice:
|
notice: Voorraadsartikel is opgeslagen.
|
||||||
stock_update:
|
stock_update:
|
||||||
notice:
|
notice: Voorraadsartikel is bijgewerkt.
|
||||||
suppliers:
|
suppliers:
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: Leverancier is aangemaakt.
|
||||||
destroy:
|
destroy:
|
||||||
notice:
|
notice: Leverancier is verwijderd
|
||||||
edit:
|
edit:
|
||||||
title:
|
title:
|
||||||
index:
|
index:
|
||||||
|
@ -1707,7 +1731,7 @@ nl:
|
||||||
new_delivery:
|
new_delivery:
|
||||||
show_deliveries:
|
show_deliveries:
|
||||||
update:
|
update:
|
||||||
notice:
|
notice: Leverancier is bijgewerkt
|
||||||
support:
|
support:
|
||||||
array:
|
array:
|
||||||
last_word_connector:
|
last_word_connector:
|
||||||
|
@ -1715,7 +1739,7 @@ nl:
|
||||||
words_connector:
|
words_connector:
|
||||||
tasks:
|
tasks:
|
||||||
accept:
|
accept:
|
||||||
notice:
|
notice: Je hebt de taak geaccepteerd
|
||||||
archive:
|
archive:
|
||||||
title:
|
title:
|
||||||
archive_tasks:
|
archive_tasks:
|
||||||
|
@ -1724,9 +1748,9 @@ nl:
|
||||||
task_format:
|
task_format:
|
||||||
who:
|
who:
|
||||||
create:
|
create:
|
||||||
notice:
|
notice: Taak is aangemaakt
|
||||||
destroy:
|
destroy:
|
||||||
notice:
|
notice: Taak is verwijderd
|
||||||
edit:
|
edit:
|
||||||
title:
|
title:
|
||||||
warning_periodic:
|
warning_periodic:
|
||||||
|
@ -1764,7 +1788,7 @@ nl:
|
||||||
title:
|
title:
|
||||||
repeated:
|
repeated:
|
||||||
set_done:
|
set_done:
|
||||||
notice:
|
notice: De status van de taak is aangepast
|
||||||
show:
|
show:
|
||||||
accept_task:
|
accept_task:
|
||||||
confirm_delete_group:
|
confirm_delete_group:
|
||||||
|
@ -1775,8 +1799,8 @@ nl:
|
||||||
reject_task:
|
reject_task:
|
||||||
title:
|
title:
|
||||||
update:
|
update:
|
||||||
notice:
|
notice: Taak is bijgewerkt
|
||||||
notice_converted:
|
notice_converted: Taak is bijgewerkt en omgezet naar een eenmalige taak.
|
||||||
user:
|
user:
|
||||||
more:
|
more:
|
||||||
tasks_link:
|
tasks_link:
|
||||||
|
|
|
@ -5,12 +5,12 @@ namespace :foodsoft do
|
||||||
task :notify_upcoming_tasks => :environment do
|
task :notify_upcoming_tasks => :environment do
|
||||||
tasks = Task.where(done: false, due_date: 1.day.from_now.to_date)
|
tasks = Task.where(done: false, due_date: 1.day.from_now.to_date)
|
||||||
for task in tasks
|
for task in tasks
|
||||||
say "Send notifications for #{task.name} to .."
|
rake_say "Send notifications for #{task.name} to .."
|
||||||
for user in task.users
|
for user in task.users
|
||||||
begin
|
begin
|
||||||
Mailer.upcoming_tasks(user, task).deliver if user.settings.notify['upcoming_tasks'] == 1
|
Mailer.upcoming_tasks(user, task).deliver if user.settings.notify['upcoming_tasks'] == 1
|
||||||
rescue
|
rescue
|
||||||
say "deliver aborted for #{user.email}.."
|
rake_say "deliver aborted for #{user.email}.."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -27,7 +27,7 @@ namespace :foodsoft do
|
||||||
begin
|
begin
|
||||||
Mailer.not_enough_users_assigned(task, user).deliver
|
Mailer.not_enough_users_assigned(task, user).deliver
|
||||||
rescue
|
rescue
|
||||||
say "deliver aborted for #{user.email}"
|
rake_say "deliver aborted for #{user.email}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -49,6 +49,6 @@ namespace :foodsoft do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Helper
|
# Helper
|
||||||
def say(message)
|
def rake_say(message)
|
||||||
puts message unless Rake.application.options.silent
|
puts message unless Rake.application.options.silent
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace :multicoops do
|
||||||
task :run => :environment do
|
task :run => :environment do
|
||||||
task_to_run = ENV['TASK']
|
task_to_run = ENV['TASK']
|
||||||
FoodsoftConfig.each_coop do |coop|
|
FoodsoftConfig.each_coop do |coop|
|
||||||
say "Run '#{task_to_run}' for #{coop}"
|
rake_say "Run '#{task_to_run}' for #{coop}"
|
||||||
Rake::Task[task_to_run].execute
|
Rake::Task[task_to_run].execute
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -17,7 +17,7 @@ namespace :multicoops do
|
||||||
task :run_single => :environment do
|
task :run_single => :environment do
|
||||||
task_to_run = ENV['TASK']
|
task_to_run = ENV['TASK']
|
||||||
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
|
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
|
||||||
say "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
|
rake_say "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
|
||||||
Rake::Task[task_to_run].execute
|
Rake::Task[task_to_run].execute
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -25,6 +25,6 @@ end
|
||||||
|
|
||||||
|
|
||||||
# Helper
|
# Helper
|
||||||
def say(message)
|
def rake_say(message)
|
||||||
puts message unless Rake.application.options.silent
|
puts message unless Rake.application.options.silent
|
||||||
end
|
end
|
||||||
|
|
|
@ -103,6 +103,23 @@ describe 'settling an order', :type => :feature do
|
||||||
expect(GroupOrderArticle.exists?(goa1.id)).to be_false
|
expect(GroupOrderArticle.exists?(goa1.id)).to be_false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'keeps product when amount is set to zero' do
|
||||||
|
within("#order_article_#{oa.id}") do
|
||||||
|
click_link I18n.t('ui.edit')
|
||||||
|
end
|
||||||
|
within("#edit_order_article_#{oa.id}") do
|
||||||
|
fill_in :order_article_units_to_order, :with => 0
|
||||||
|
find('input[type="submit"]').click
|
||||||
|
end
|
||||||
|
expect(page).to have_selector("#order_article_#{oa.id}")
|
||||||
|
# make sure it still works after reloading
|
||||||
|
visit new_finance_order_path(order_id: order.id)
|
||||||
|
expect(page).to have_selector("#order_article_#{oa.id}")
|
||||||
|
expect(OrderArticle.exists?(oa.id)).to be_true
|
||||||
|
oa.reload
|
||||||
|
expect(oa.units_to_order).to eq(0)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue