diff --git a/app/controllers/admin/invoices_controller.rb b/app/controllers/admin/invoices_controller.rb index dce34ac2a..5aa6d4438 100644 --- a/app/controllers/admin/invoices_controller.rb +++ b/app/controllers/admin/invoices_controller.rb @@ -16,7 +16,7 @@ class Admin::InvoicesController < AdminController flash[:notice] = t(:record_created) redirect_to [:admin, @invoice] else - flash[:alert] = t(:failed_to_create_record) + flash.now[:alert] = t(:failed_to_create_record) render 'new' end end diff --git a/app/controllers/registrar/deposits_controller.rb b/app/controllers/registrar/deposits_controller.rb index 4bd40eaa6..4b7d0db97 100644 --- a/app/controllers/registrar/deposits_controller.rb +++ b/app/controllers/registrar/deposits_controller.rb @@ -13,7 +13,7 @@ class Registrar::DepositsController < RegistrarController flash[:notice] = t(:please_pay_the_following_invoice) redirect_to [:registrar, @invoice] else - flash[:alert] = t(:failed_to_create_record) + flash.now[:alert] = t(:failed_to_create_record) render 'new' end end diff --git a/app/views/registrar/invoices/partials/_details.haml b/app/views/registrar/invoices/partials/_details.haml index 0b897ce7f..a2677f170 100644 --- a/app/views/registrar/invoices/partials/_details.haml +++ b/app/views/registrar/invoices/partials/_details.haml @@ -27,7 +27,7 @@ %dt= t(:description) - @invoice.description.prepend(' - ') if @invoice.description.present? - %dd= "#{t('invoice_no', no: @invoice.id)}#{@invoice.description}" + %dd= "#{t('invoice_no', no: @invoice.number)}#{@invoice.description}" %dt= t(:reference_no) %dd= @invoice.reference_no diff --git a/app/views/registrar/invoices/pdf.haml b/app/views/registrar/invoices/pdf.haml index 5888f2bc2..ae67ac4e3 100644 --- a/app/views/registrar/invoices/pdf.haml +++ b/app/views/registrar/invoices/pdf.haml @@ -177,7 +177,7 @@ %dt= t(:description) - @invoice.description.prepend(' - ') if @invoice.description.present? - %dd= "#{t('invoice_no', no: @invoice.id)}#{@invoice.description}" + %dd= "#{t('invoice_no', no: @invoice.number)}#{@invoice.description}" %dt= t(:reference_no) %dd= @invoice.reference_no