fix order.ordergroup nil pointer error ~ automatic go invoices

This commit is contained in:
viehlieb 2022-01-28 13:39:17 +01:00
parent bddaebe1a9
commit 1fc582319f

View file

@ -21,7 +21,7 @@
%td= show_user(order.updated_by) %td= show_user(order.updated_by)
%td{id: "generate-invoice#{order.id}"} %td{id: "generate-invoice#{order.id}"}
- if order.closed? - if order.closed?
-if FoodsoftConfig[:contact][:tax_number] -if FoodsoftConfig[:contact][:tax_number] && order.ordergroups.present?
= render :partial => 'group_order_invoices/links', locals:{order: order} = render :partial => 'group_order_invoices/links', locals:{order: order}
-else -else
= I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set') = I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set')