This commit is contained in:
FGU 2023-02-15 16:09:11 +01:00
parent 6835616170
commit b808f83931

View file

@ -63,7 +63,7 @@ class GroupOrder < ApplicationRecord
# add counts from the previous group order
if previous_group_order
previous_group_order.group_order_articles.each do |goa|
order_article_id = OrderArticle.find_by(order: order, article: goa.order_article.article)&.id
order_article_id = OrderArticle.find_by!(order: order, article: goa.order_article.article)&.id
data[:order_articles][order_article_id] ||= {}
data[:order_articles][order_article_id][:previous_quantity] = goa.quantity
data[:order_articles][order_article_id][:previous_tolerance] = goa.tolerance