mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue