mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Binding interface for bank statements
This commit is contained in:
parent
2dfa65645b
commit
851e5368eb
15 changed files with 113 additions and 26 deletions
|
@ -8,10 +8,15 @@ class BankTransaction < ActiveRecord::Base
|
|||
account_activity.present?
|
||||
end
|
||||
|
||||
def binded_invoice
|
||||
return unless binded?
|
||||
account_activity.invoice
|
||||
end
|
||||
|
||||
# For successful binding, reference number, invoice id and sum must match with the invoice
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
def bind_with_invoice
|
||||
def bind_invoice
|
||||
return if binded?
|
||||
registrar = Registrar.find_by(reference_no: reference_no)
|
||||
return unless registrar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue