Skip to content

Commit 093fedf

Browse files
authored
Merge pull request #728 from coopdevs/develop
[FIX] Import transfer: movements & transfer with the same created_at
2 parents 8bb690e + 615e4d1 commit 093fedf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/transfer.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Transfer < ApplicationRecord
2323
after_create :make_movements
2424

2525
def make_movements
26-
movements.create(account: Account.find(source_id), amount: -amount.to_i)
27-
movements.create(account: Account.find(destination_id), amount: amount.to_i)
26+
movements.create(account: Account.find(source_id), amount: -amount.to_i, created_at: created_at)
27+
movements.create(account: Account.find(destination_id), amount: amount.to_i, created_at: created_at)
2828
end
2929

3030
def source_id

0 commit comments

Comments
 (0)