mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Invoice cancelling
This commit is contained in:
parent
56d7f9f2e2
commit
a26ce110b2
17 changed files with 113 additions and 25 deletions
|
@ -12,7 +12,7 @@ class Admin::BankTransactionsController < AdminController
|
|||
end
|
||||
|
||||
def bind
|
||||
if @bank_transaction.bind_invoice(params[:invoice_id])
|
||||
if @bank_transaction.bind_invoice(params[:invoice_no])
|
||||
flash[:notice] = I18n.t('record_created')
|
||||
redirect_to [:admin, @bank_transaction]
|
||||
else
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue