Skip to content

Commit

Permalink
Merge pull request #324 from sparc-request/jl-add-status-to-consolidated
Browse files Browse the repository at this point in the history
Jl add status to consolidated
  • Loading branch information
jleonardw9 committed Mar 23, 2016
2 parents af1a408 + 677437a commit 3edd31a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/service_calendar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def move_to_position arm
end

def display_line_items_status(line_item)
line_item.service_request.status.capitalize
AVAILABLE_STATUSES[line_item.sub_service_request.status]
end

def display_per_patient_calendar?(service_request, sub_service_request, merged)
Expand Down
4 changes: 2 additions & 2 deletions app/models/protocol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def has_per_patient_per_visit? current_request, portal
def has_one_time_fees? current_request, portal
return self.service_requests.detect do |sr|
if sr.has_one_time_fee_services?
if ['first_draft', 'draft'].include?(sr.status)
if ['first_draft'].include?(sr.status)
if portal
false
elsif current_request == sr
Expand All @@ -436,7 +436,7 @@ def has_one_time_fees? current_request, portal
def direct_cost_total service_request
total = 0
self.service_requests.each do |sr|
next if ['first_draft', 'draft'].include?(sr.status) && sr != service_request
next if ['first_draft'].include?(sr.status) && sr != service_request
total += sr.direct_cost_total
end
return total
Expand Down

0 comments on commit 3edd31a

Please sign in to comment.