Add link for creating invoice at an order

This commit is contained in:
Patrick Gansterer 2016-02-24 15:31:04 +01:00 committed by wvengen
parent 36dd19f324
commit 6015d16cab
5 changed files with 16 additions and 0 deletions

View file

@ -1,5 +1,13 @@
- title t('.title', name: @order.name)
- if current_user.role_finance? || current_user.role_invoices?
- content_for :actionbar do
- if @order.invoice.present?
= link_to t('.show_invoice'), finance_invoice_path(@order.invoice), class: 'btn'
- elsif @order.closed?
= link_to t('.create_invoice'), new_finance_invoice_path(:order_id => @order, :supplier_id => @order.supplier),
class: 'btn'
.well
= close_button :alert
%p