Fix internal server error at invoices

This commit is contained in:
Patrick Gansterer 2018-09-14 01:53:05 +02:00
parent 903086ab97
commit 4eef0f07d5

View file

@ -48,6 +48,7 @@ class Finance::InvoicesController < ApplicationController
redirect_to [:finance, @invoice] redirect_to [:finance, @invoice]
end end
else else
fill_deliveries_and_orders_collection @invoice.id, @invoice.supplier_id
render :action => "new" render :action => "new"
end end
end end
@ -56,6 +57,7 @@ class Finance::InvoicesController < ApplicationController
if @invoice.update_attributes(params[:invoice]) if @invoice.update_attributes(params[:invoice])
redirect_to [:finance, @invoice], notice: I18n.t('finance.update.notice') redirect_to [:finance, @invoice], notice: I18n.t('finance.update.notice')
else else
fill_deliveries_and_orders_collection @invoice.id, @invoice.supplier_id
render :edit render :edit
end end
end end