mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Some tests for invoice binding
This commit is contained in:
parent
e678e655da
commit
57d23976c7
19 changed files with 206 additions and 25 deletions
|
@ -3,6 +3,8 @@ class BankStatement < ActiveRecord::Base
|
|||
|
||||
attr_accessor :th6_file
|
||||
|
||||
validates :bank_code, :iban, :queried_at, presence: true
|
||||
|
||||
def import
|
||||
import_th6_file && save
|
||||
end
|
||||
|
@ -47,4 +49,8 @@ class BankStatement < ActiveRecord::Base
|
|||
self.queried_at = DateTime.strptime(row[30, 10].strip, '%y%m%d%H%M')
|
||||
nil
|
||||
end
|
||||
|
||||
def bind_with_invoices
|
||||
bank_transactions.unbinded.each(&:bind_with_invoice)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue