mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Fix income summary totals (#759)
This commit is contained in:
@@ -9,8 +9,8 @@ class Transaction < ApplicationRecord
|
||||
|
||||
monetize :amount
|
||||
|
||||
scope :inflows, -> { where("amount > 0") }
|
||||
scope :outflows, -> { where("amount < 0") }
|
||||
scope :inflows, -> { where("amount <= 0") }
|
||||
scope :outflows, -> { where("amount > 0") }
|
||||
scope :active, -> { where(excluded: false) }
|
||||
scope :with_converted_amount, ->(currency = Current.family.currency) {
|
||||
# Join with exchange rates to convert the amount to the given currency
|
||||
|
||||
Reference in New Issue
Block a user