mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 07:25:19 +02:00
chore: Cleanup for PR
- Cleanup gitignore - Fix transaction naming bug
This commit is contained in:
parent
29f46e53e9
commit
9e9e2fa1e8
2 changed files with 5 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -71,5 +71,3 @@ node_modules
|
||||||
compose.yml
|
compose.yml
|
||||||
|
|
||||||
plaid_test_accounts/
|
plaid_test_accounts/
|
||||||
dump.rdb
|
|
||||||
dev.docs.md
|
|
|
@ -174,8 +174,11 @@ class SimpleFinAccount < ApplicationRecord
|
||||||
amount_from_sf = transaction_data["amount"].to_d * -1
|
amount_from_sf = transaction_data["amount"].to_d * -1
|
||||||
# account_type = self.account.accountable_type
|
# account_type = self.account.accountable_type
|
||||||
|
|
||||||
|
# Try to determine name from best option
|
||||||
|
name = transaction_data["description"].presence || "Transaction"
|
||||||
|
|
||||||
entry.assign_attributes(
|
entry.assign_attributes(
|
||||||
name: transaction_data["description"],
|
name: name,
|
||||||
amount: amount_from_sf,
|
amount: amount_from_sf,
|
||||||
currency: self.account.currency,
|
currency: self.account.currency,
|
||||||
date: Time.at(transaction_data["posted"].to_i).to_date,
|
date: Time.at(transaction_data["posted"].to_i).to_date,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue