Merge branch 'master' into master-rails3-merging

Conflicts:
	.gitignore
	.rbenv-version
	app/controllers/finance/balancing_controller.rb
	app/views/finance/balancing/_order_article_form.html.haml

Fixed updating current price in finance balancing.
This commit is contained in:
benni 2012-12-11 10:32:59 +01:00
commit 620ec946f1
7 changed files with 37 additions and 19 deletions

View file

@ -22,7 +22,9 @@ namespace :foodsoft do
workgroups = Workgroup.where(weekly_task: true)
for workgroup in workgroups
puts "Create weekly tasks for #{workgroup.name}"
workgroup.next_weekly_tasks[3..5].each do |date|
# Loop through next tasks weekly tasks method,
# skip the next 3 weeks, to allow manually deleting tasks
workgroup.next_weekly_tasks[3..-1].each do |date|
unless workgroup.tasks.exists?({:due_date => date, :weekly => true})
workgroup.tasks.create(workgroup.task_attributes(date))
end