From 4eef0f07d579eea57f04dce4c8432361ce743420 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 14 Sep 2018 01:53:05 +0200 Subject: [PATCH] Fix internal server error at invoices --- app/controllers/finance/invoices_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/finance/invoices_controller.rb b/app/controllers/finance/invoices_controller.rb index af3e123b..43a5ba3b 100644 --- a/app/controllers/finance/invoices_controller.rb +++ b/app/controllers/finance/invoices_controller.rb @@ -48,6 +48,7 @@ class Finance::InvoicesController < ApplicationController redirect_to [:finance, @invoice] end else + fill_deliveries_and_orders_collection @invoice.id, @invoice.supplier_id render :action => "new" end end @@ -56,6 +57,7 @@ class Finance::InvoicesController < ApplicationController if @invoice.update_attributes(params[:invoice]) redirect_to [:finance, @invoice], notice: I18n.t('finance.update.notice') else + fill_deliveries_and_orders_collection @invoice.id, @invoice.supplier_id render :edit end end