Create new FinancialLink for reverted FinancialTransaction
This commit is contained in:
parent
9b889dd643
commit
18e38be6be
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ class FinancialTransaction < ApplicationRecord
|
||||||
|
|
||||||
def revert!(user)
|
def revert!(user)
|
||||||
transaction do
|
transaction do
|
||||||
|
update_attribute :financial_link, FinancialLink.new
|
||||||
rt = dup
|
rt = dup
|
||||||
rt.amount = -rt.amount
|
rt.amount = -rt.amount
|
||||||
rt.reverts = self
|
rt.reverts = self
|
||||||
|
|
Loading…
Reference in a new issue