From 615e4d16a70d0081abfca7fcc37ab6936744aa0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Jos=C3=A9=20Perej=C3=B3n=20Barrios?= <70280187+franpb14@users.noreply.github.com> Date: Sun, 7 Jan 2024 19:42:55 +0100 Subject: [PATCH] [FIX] Import transfer: movements & transfer with the same created_at --- app/models/transfer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/transfer.rb b/app/models/transfer.rb index 9efeec490..41e4db8ca 100644 --- a/app/models/transfer.rb +++ b/app/models/transfer.rb @@ -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