Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/models/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,12 @@ def sum(type = :gross)
when :groups
total += go.total
when :groups_without_markup
go_price_without_markup = 0
for goa in go.group_order_articles
total += goa.result * goa.order_article.article_version.gross_group_order_price
go_price_without_markup += goa.result * goa.order_article.article_version.gross_group_order_price
end
total += go_price_without_markup.round(2) || 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why's the || 0 needed here?

total += go.transport if go.transport
end
end
end
Expand Down
Loading