Add invoice numbers

This commit is contained in:
Martin Lensment 2015-04-23 17:49:22 +03:00
parent 109ce6c912
commit 1e47f3e41c
10 changed files with 35 additions and 14 deletions

View file

@ -9,7 +9,7 @@ class Registrar::DepositsController < RegistrarController
@deposit = Deposit.new(deposit_params.merge(registrar: current_user.registrar))
@invoice = @deposit.issue_prepayment_invoice
if @invoice
if @invoice.persisted?
flash[:notice] = t('please_pay_the_following_invoice')
redirect_to [:registrar, @invoice]
else