Fix internal server error at invoices
This commit is contained in:
parent
903086ab97
commit
4eef0f07d5
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue