Skip to content

Commit

Permalink
Merge pull request #728 from coopdevs/develop
Browse files Browse the repository at this point in the history
[FIX] Import transfer: movements & transfer with the same created_at
  • Loading branch information
markets authored Jan 7, 2024
2 parents 8bb690e + 615e4d1 commit 093fedf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Transfer < ApplicationRecord
after_create :make_movements

def make_movements
movements.create(account: Account.find(source_id), amount: -amount.to_i)
movements.create(account: Account.find(destination_id), amount: amount.to_i)
movements.create(account: Account.find(source_id), amount: -amount.to_i, created_at: created_at)
movements.create(account: Account.find(destination_id), amount: amount.to_i, created_at: created_at)
end

def source_id
Expand Down

0 comments on commit 093fedf

Please sign in to comment.