mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
Skip account valuation on entry balance_after_entry (#1435)
This commit is contained in:
parent
3b928775a8
commit
a113d573d6
3 changed files with 16 additions and 3 deletions
|
@ -14,9 +14,9 @@ module Account::EntriesHelper
|
|||
|
||||
def entries_by_date(entries, selectable: true, totals: false)
|
||||
entries.group_by(&:date).map do |date, grouped_entries|
|
||||
# Valuations always go first, then sort by created_at
|
||||
# Valuations always go first, then sort by created_at desc
|
||||
sorted_entries = grouped_entries.sort_by do |entry|
|
||||
[ entry.account_valuation? ? 0 : 1, entry.created_at ]
|
||||
[ entry.account_valuation? ? 0 : 1, -entry.created_at.to_i ]
|
||||
end
|
||||
|
||||
content = capture do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue