Fix invoice redirect
This commit is contained in:
parent
b0ae35f73a
commit
341f86d98e
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ class Finance::InvoicesController < ApplicationController
|
||||||
|
|
||||||
if @invoice.save
|
if @invoice.save
|
||||||
flash[:notice] = I18n.t('finance.create.notice')
|
flash[:notice] = I18n.t('finance.create.notice')
|
||||||
if @invoice.orders.count == 1
|
if @invoice.orders.count == 1 && current_user.role_finance?
|
||||||
# Redirect to balancing page
|
# Redirect to balancing page
|
||||||
redirect_to new_finance_order_url(order_id: @invoice.orders.first.id)
|
redirect_to new_finance_order_url(order_id: @invoice.orders.first.id)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue