Skip to content

Commit 29f1ce2

Browse files
authored
Merge pull request #625 from DFID/fix-supplier-org-type
Added a fix for receiver org type on the transactions page.
2 parents b8b8a9d + a0f94b1 commit 29f1ce2

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

helpers/project_helpers.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,13 @@ def get_transaction_details_pagev2(projectId, transactionType, page, count)
525525
#currency = activity.has_key?('default-currency') ? activity['default-currency'] : 'GBP'
526526
currency = t.has_key?('value.currency') ? t['value.currency'] : 'GBP'
527527
if t.has_key?('receiver-org')
528-
receiverOrgRef = t['receiver-org']['ref']
529-
if !activity['participating_org_ref'].find_index(receiverOrgRef.to_s).nil?
528+
if t['receiver-org'].has_key?('type')
530529
begin
531-
x = orgTypes.select{|s| s['code'].to_i == activity['participating_org_type'][activity['participating_org_ref'].find_index(receiverOrgRef.to_s)].to_i}.first
530+
x = orgTypes.select{|s| s['code'].to_i == t['receiver-org']['type'].to_i}.first
532531
receiverOrgType = x['name']
533532
rescue
534533
receiverOrgType = 'N/A'
535-
end
534+
end
536535
else
537536
receiverOrgType = 'N/A'
538537
end

0 commit comments

Comments
 (0)