Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sj service request export changes #790

Merged
merged 2 commits into from
Dec 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 6 additions & 17 deletions app/views/service_requests/show.xlsx.axlsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,38 +284,27 @@ wb.add_worksheet(name: "Review") do |sheet|

##SSR Total
if @sub_service_request
ssr_total_row = has_per_patient_per_visit_services ? ["", "", "", "", ""] : ["", "", "", ""]
ssr_total_row = ["", "", "", "", ""]
if has_per_patient_per_visit_services
(visit_count*2 - 3).times do
(visit_count*2).times do
ssr_total_row << ""
end
end

ssr_total_row << "" if @admin_offset
if has_per_patient_per_visit_services
ssr_total_row += ["#{@sub_service_request.organization.abbreviation} Total", "", "", display_ssr_grand_total(@sub_service_request)]
else
ssr_total_row += ["#{@sub_service_request.organization.abbreviation} Total", display_ssr_grand_total(@sub_service_request)]
end
ssr_total_row += ["#{@sub_service_request.organization.abbreviation} Total", display_ssr_grand_total(@sub_service_request)]
ssr_total_row = sheet.add_row(ssr_total_row, :style => row_header_style)
end

##Total
grand_total_row = has_per_patient_per_visit_services ? ["", "", "", "", ""] : ["", "", "", ""]
grand_total_row = ["", "", "", "", ""]

if has_per_patient_per_visit_services
(visit_count*2 - 3).times do
(visit_count*2).times do
grand_total_row << ""
end
end

grand_total_row << "" if @admin_offset
if has_per_patient_per_visit_services
grand_total_row += ["Total Cost", "", "", display_study_grand_total(@service_request.protocol, @service_request)]
else
grand_total_row += ["Total Cost", display_study_grand_total(@service_request.protocol, @service_request)]
end

grand_total_row += ["Total Cost", display_study_grand_total(@service_request.protocol, @service_request)]
grand_total_row = sheet.add_row(grand_total_row, :style => row_header_style)

###### style and merge cells ######
Expand Down