From 925727d3ae8122c50af0f8dfd5b2039f7eeb37a7 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 20 Jan 2017 02:42:47 +0100 Subject: [PATCH] Show button for creating invoices also at finished orders Check if a order is not opened instead of checking if it is closed. --- app/views/orders/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/orders/show.html.haml b/app/views/orders/show.html.haml index b2db94f1..8e8a42be 100644 --- a/app/views/orders/show.html.haml +++ b/app/views/orders/show.html.haml @@ -4,7 +4,7 @@ - content_for :actionbar do - if @order.invoice.present? = link_to t('.show_invoice'), finance_invoice_path(@order.invoice), class: 'btn' - - elsif @order.closed? + - elsif !@order.open? = link_to t('.create_invoice'), new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier), class: 'btn'