Invoice cancelling

This commit is contained in:
Martin Lensment 2015-04-27 11:15:09 +03:00
parent 56d7f9f2e2
commit a26ce110b2
17 changed files with 113 additions and 25 deletions

View file

@ -28,6 +28,16 @@ class Registrar::InvoicesController < RegistrarController
end
end
def cancel
if @invoice.cancel
flash[:notice] = t('record_updated')
redirect_to([:registrar, @invoice])
else
flash.now[:alert] = t('failed_to_update_record')
render :show
end
end
def download_pdf
# render 'pdf', layout: false