implement soft delete for money moves
This commit is contained in:
@@ -7,7 +7,7 @@ class Homie < ApplicationRecord
|
||||
def self.info(importance, gang)
|
||||
# TODO: This can be improved
|
||||
|
||||
cash_totals = Homie.all.joins(:money_moves).group(:id).order(:id).sum(:amount)
|
||||
cash_totals = Homie.all.joins(:money_moves).where(money_moves: { deleted_at: nil}).group(:id).order(:id).sum(:amount)
|
||||
work_totals = Homie.all.joins(:work).group(:id).order(:id).sum(:amount)
|
||||
|
||||
Homie.where(['importance > ? and gang_id = ?', importance, gang]).map do |homie|
|
||||
|
||||
Reference in New Issue
Block a user