diff --git a/app/documents/order_by_groups.rb b/app/documents/order_by_groups.rb index 39e71176..02b9b93b 100644 --- a/app/documents/order_by_groups.rb +++ b/app/documents/order_by_groups.rb @@ -37,7 +37,7 @@ class OrderByGroups < OrderPdf rows << [ I18n.t('documents.order_by_groups.sum'), nil, nil, nil, nil, nil, number_to_currency(total)] rows.unshift I18n.t('documents.order_by_groups.rows') # Table Header - text group_order.ordergroup.name, size: fontsize(9), style: :bold + text group_order.ordergroup_name, size: fontsize(9), style: :bold table rows, width: 500, cell_style: {size: fontsize(8), overflow: :shrink_to_fit} do |table| # borders table.cells.borders = [:bottom] diff --git a/app/views/mailer/order_result.text.haml b/app/views/mailer/order_result.text.haml index cfe6cf78..e14eee89 100644 --- a/app/views/mailer/order_result.text.haml +++ b/app/views/mailer/order_result.text.haml @@ -1,4 +1,4 @@ -= raw t '.text0', ordergroup: @group_order.ordergroup.name, order: @order.name, when: I18n.l(@order.ends), user: show_user(@order.updated_by) += raw t '.text0', ordergroup: @group_order.ordergroup_name, order: @order.name, when: I18n.l(@order.ends), user: show_user(@order.updated_by) - for group_order_article in @group_order.group_order_articles.ordered.all(:include => :order_article) - article = group_order_article.order_article.article \- #{article.name}: #{group_order_article.result} x #{article.unit} = #{group_order_article.result * article.fc_price} diff --git a/app/views/shared/articles_by/_article_single_goa.html.haml b/app/views/shared/articles_by/_article_single_goa.html.haml index b34178d9..b1747bdb 100644 --- a/app/views/shared/articles_by/_article_single_goa.html.haml +++ b/app/views/shared/articles_by/_article_single_goa.html.haml @@ -1,5 +1,5 @@ %tr{class: if goa.result == 0 then 'unavailable' end, id: "goa_#{goa.id}"} - %td{:style => "width:70%"}= goa.group_order.ordergroup.name + %td{:style => "width:70%"}= goa.group_order.ordergroup_name %td.center= "#{goa.quantity} + #{goa.tolerance}" %td.center.input-delta= (edit or true rescue true) ? group_order_article_edit_result(goa) : goa.result %td.price{data: {value: goa.total_price}}= number_to_currency(goa.total_price) diff --git a/app/workers/user_notifier.rb b/app/workers/user_notifier.rb index 2faf0f71..557ea531 100644 --- a/app/workers/user_notifier.rb +++ b/app/workers/user_notifier.rb @@ -11,6 +11,7 @@ class UserNotifier def self.finished_order(args) order_id = args.first Order.find(order_id).group_orders.each do |group_order| + next if group_order.ordergroup.nil? group_order.ordergroup.users.each do |user| begin I18n.with_locale(user.settings['profile']['language']) do