mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
Match Plaid holding values on current day (#2212)
* Match Plaid holding values on current day * Fix chart timezone issue * Add timezone tests for syncs * Hide sidebars on trades test
This commit is contained in:
parent
470b753833
commit
2000f05453
16 changed files with 242 additions and 21 deletions
|
@ -40,12 +40,11 @@ class Holding::BaseCalculator
|
|||
new_quantities
|
||||
end
|
||||
|
||||
def build_holdings(portfolio, date)
|
||||
def build_holdings(portfolio, date, price_source: nil)
|
||||
portfolio.map do |security_id, qty|
|
||||
price = portfolio_cache.get_price(security_id, date)
|
||||
price = portfolio_cache.get_price(security_id, date, source: price_source)
|
||||
|
||||
if price.nil?
|
||||
Rails.logger.warn "No price found for security #{security_id} on #{date}"
|
||||
next
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue