From 1fc582319f64652b9080d81d40cc3b6bdd648943 Mon Sep 17 00:00:00 2001 From: viehlieb Date: Fri, 28 Jan 2022 13:39:17 +0100 Subject: [PATCH] fix order.ordergroup nil pointer error ~ automatic go invoices --- app/views/finance/balancing/_orders.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/finance/balancing/_orders.html.haml b/app/views/finance/balancing/_orders.html.haml index addbf930..dddb00c2 100644 --- a/app/views/finance/balancing/_orders.html.haml +++ b/app/views/finance/balancing/_orders.html.haml @@ -21,7 +21,7 @@ %td= show_user(order.updated_by) %td{id: "generate-invoice#{order.id}"} - 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} -else = I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set')