mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +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
|
@ -1,4 +1,12 @@
|
|||
class AccountActivity < ActiveRecord::Base
|
||||
belongs_to :account
|
||||
belongs_to :bank_transaction
|
||||
belongs_to :invoice
|
||||
|
||||
after_create :update_balance
|
||||
def update_balance
|
||||
account.balance += sum
|
||||
account.save
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue