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

#3946-Update BC Grants displayed #4190

Merged
merged 7 commits into from
Dec 31, 2024

Conversation

guru-aot
Copy link
Collaborator

@guru-aot guru-aot commented Dec 30, 2024

Report changed to show the values of BC Grant.
image

Migration revert Screenshot

image

Sample query to run and check in the DB

(select
to_char(dr.disburse_date, 'YYYY-MM-DD') as "Date of Disbursement",
dr.student_sin as "SIN",
app.application_number as "Application Number",
ds.document_number as "Certificate Number",
drv.grant_type as "Funding Code",
drv.grant_amount as "Disbursement Amount"
from
sims.disbursement_receipts dr
inner join sims.disbursement_receipt_values drv on drv.disbursement_receipt_id = dr.id
inner join sims.disbursement_schedules ds on ds.id = dr.disbursement_schedule_id
inner join sims.student_assessments sa on sa.id = ds.student_assessment_id
inner join sims.applications app on app.id = sa.application_id
inner join sims.education_programs_offerings epo on epo.id = sa.offering_id
where
epo.offering_intensity = 'Full Time'
and dr.disburse_date between '2024-01-01'
and '2025-01-01'
union
all
select
to_char(dr.disburse_date, 'YYYY-MM-DD') as "Date of Disbursement",
dr.student_sin as "SIN",
app.application_number as "Application Number",
ds.document_number as "Certificate Number",
case
when dr.funding_type = 'BC' then 'BCSL'
when dr.funding_type = 'FE' then 'CSL'
end as "Funding Code",
dr.total_disbursed_amount as "Disbursement Amount"
from
sims.disbursement_receipts dr
inner join sims.disbursement_schedules ds on ds.id = dr.disbursement_schedule_id
inner join sims.student_assessments sa on sa.id = ds.student_assessment_id
inner join sims.applications app on app.id = sa.application_id
inner join sims.education_programs_offerings epo on epo.id = sa.offering_id
where
epo.offering_intensity = 'Full Time'
and dr.disburse_date between '2024-01-01'
and '2025-01-01'
union
all
select distinct
to_char(dr.disburse_date, 'YYYY-MM-DD') as "Date of Disbursement",
dr.student_sin as "SIN",
app.application_number as "Application Number",
ds.document_number as "Certificate Number",
dv.value_code as "Funding Code",
dv.value_amount as "Disbursement Amount"
from
sims.disbursement_receipts dr
inner join sims.disbursement_schedules ds on ds.id = dr.disbursement_schedule_id
inner join sims.disbursement_values dv on dv.disbursement_schedule_id = ds.id
inner join sims.student_assessments sa on sa.id = ds.student_assessment_id
inner join sims.applications app on app.id = sa.application_id
inner join sims.education_programs_offerings epo on epo.id = sa.offering_id
where
epo.offering_intensity = 'Full Time'
and dv.value_type = 'BC Grant'
and dr.disburse_date between '2024-01-01'
and '2025-01-01'
)
order by
"Date of Disbursement",
"Certificate Number"

Execution plan:
image

@guru-aot guru-aot changed the title Feature/#3946 update bc grants displayed #3946-Update BC Grants displayed Dec 30, 2024
@guru-aot guru-aot self-assigned this Dec 30, 2024
@guru-aot guru-aot added the DB DB migration involved label Dec 30, 2024
@guru-aot guru-aot marked this pull request as ready for review December 30, 2024 21:02
Copy link
Collaborator

@bidyashish bidyashish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

Thanks for making changes.

One point:
After using Migration
Date is different format. please make it same format as without Union date

image

CSV

2024-01-30,399800069,2024000011,279,CSL,1540.00
2024-01-30,399800069,2024000011,279,CSGP,200.00
 2024 - 01 - 31 ,000000001,2023000463,262,BGPD,420.00
 2024 - 01 - 31 ,000000001,2023000463,262,SBSD,800.00
 2024 - 01 - 31 ,399800069,2024000011,279,BGPD,660.00
 2024 - 01 - 31 ,399800069,2024000011,279,SBSD,400.00
 2024 - 01 - 31 ,742853146,2023000516,293,BCAG,2118.00

Copy link

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.2% ( 3783 / 17038 )
Methods: 10.19% ( 219 / 2150 )
Lines: 25.65% ( 3278 / 12781 )
Branches: 13.57% ( 286 / 2107 )

Copy link

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.59% ( 589 / 898 )
Methods: 59.63% ( 65 / 109 )
Lines: 68.72% ( 468 / 681 )
Branches: 51.85% ( 56 / 108 )

Copy link

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 86.14% ( 1249 / 1450 )
Methods: 82.42% ( 136 / 165 )
Lines: 88.51% ( 1032 / 1166 )
Branches: 68.07% ( 81 / 119 )

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the changes. Looks good 👍

Copy link

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.41% ( 5923 / 8787 )
Methods: 65.09% ( 729 / 1120 )
Lines: 71.33% ( 4647 / 6515 )
Branches: 47.48% ( 547 / 1152 )

@guru-aot guru-aot added this pull request to the merge queue Dec 31, 2024
Merged via the queue into main with commit 64ea48f Dec 31, 2024
21 checks passed
@guru-aot guru-aot deleted the feature/#3946-Update_BC_Grants_Displayed branch December 31, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB DB migration involved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants