1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Deposit, Withdrawal, and Interest Transactions for Investment View (#1075)

* Trade and Transaction builders

* Consolidate logic

* Remove redundant fields from trade form

* Add deposit, withdrawal, and interest form controls
This commit is contained in:
Zach Gollwitzer 2024-08-09 20:11:27 -04:00 committed by GitHub
parent f3c44464be
commit 94be117a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 286 additions and 17 deletions

View file

@ -1,8 +1,8 @@
class Account::TradeBuilder
TYPES = %w[ buy sell ].freeze
class Account::TradeBuilder < Account::EntryBuilder
include ActiveModel::Model
TYPES = %w[ buy sell ].freeze
attr_accessor :type, :qty, :price, :ticker, :date, :account
validates :type, :qty, :price, :ticker, :date, presence: true