Skip to content

Commit

Permalink
include transfers to person in consolidate_transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
johnofsydney committed Sep 12, 2024
1 parent a4c1659 commit 2744476
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/models/concerns/transfer_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def consolidated_transfers(depth: 0, results: [], visited_nodes: [], queue: [sel
results << transfer_struct(transfer:, depth: counter, direction: 'outgoing')
end

next unless node.class == Group # TODO - get rid of this, people can accept transfers too (make taker polymorphic as well)
Transfer.where(taker: node).find_each do |transfer|
results << transfer_struct(transfer:, depth: counter, direction: 'incoming')
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/record_person_or_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(name)

def person_or_group
regex_for_3_or_4_capitals = /\bHCF\b|\bINPEX\b|\bCMAX\b|\bSDA\b|\bONA\b|\bSPP\b|\bACCI\b|\bACTU\b|\bCEC\b|\bCLP|\bMSD\b|\bUNSW\b|\bAICR\b|\bAFUL\b/i
regex_for_company_words_1 = /Corporation|Transport|Tax Aid|Outcomes|Lifestyle/i
regex_for_company_words_1 = /Corporation|Transport|Tax Aid|Outcomes|Lifestyle|active super/i
regex_for_company_words_2 = /business|technology|shopping|toyota|bank|promotions|publications/i
regex_for_company_words_3 = /institute|horticultural|cleaning|technologies|centre/i
regex_for_company_words_4 = /Services|investments|entertainment|Insurance|Commerce/i
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/common/money_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Common::MoneySummary < ApplicationView

def initialize(entity:)
@entity = entity
end
end

def template
if money_in.present? || money_out.present?
Expand Down

0 comments on commit 2744476

Please sign in to comment.