mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Test for invoice payment button #2733
This commit is contained in:
parent
e722da3ed8
commit
268fa47909
5 changed files with 59 additions and 2 deletions
|
@ -16,7 +16,10 @@ class Admin::BankStatementsController < AdminController
|
|||
end
|
||||
|
||||
def new
|
||||
@bank_statement = BankStatement.new
|
||||
@bank_statement = BankStatement.new(
|
||||
bank_code: Setting.registry_bank_code,
|
||||
iban: Setting.registry_iban
|
||||
)
|
||||
@invoice = Invoice.find_by(id: params[:invoice_id])
|
||||
@bank_transaction = @bank_statement.bank_transactions.build(
|
||||
description: @invoice.to_s,
|
||||
|
@ -78,7 +81,7 @@ class Admin::BankStatementsController < AdminController
|
|||
|
||||
def bank_statement_params
|
||||
params.require(:bank_statement).permit(:th6_file, :bank_code, :iban, bank_transactions_attributes: [
|
||||
:description, :sum, :reference_no, :paid_at
|
||||
:description, :sum, :currency, :reference_no, :paid_at
|
||||
])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
= x.label :sum, class: 'col-md-4 control-label required'
|
||||
.col-md-8
|
||||
= x.text_field(:sum, class: 'form-control', required: true)
|
||||
.form-group
|
||||
= x.label :currency, class: 'col-md-4 control-label required'
|
||||
.col-md-8
|
||||
= x.text_field(:currency, class: 'form-control', required: true, readonly: true)
|
||||
.form-group
|
||||
= x.label :reference_no, class: 'col-md-4 control-label required'
|
||||
.col-md-8
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
= render 'setting_row', var: :registry_vat_no
|
||||
= render 'setting_row', var: :registry_vat_prc
|
||||
= render 'setting_row', var: :registry_bank
|
||||
= render 'setting_row', var: :registry_bank_code
|
||||
= render 'setting_row', var: :registry_iban
|
||||
= render 'setting_row', var: :registry_swift
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue