-
Notifications
You must be signed in to change notification settings - Fork 14
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
#1715 COE and Tuition Remittance - e-Cert Adjustments #1840
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...apps/db-migrations/src/migrations/1679688897417-AddTuitionRemittanceEffectiveAmountCol.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
import { getSQLFileData } from "../utilities/sqlLoader"; | ||
|
||
export class AddTuitionRemittanceEffectiveAmountCol1679688897417 | ||
implements MigrationInterface | ||
{ | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
getSQLFileData( | ||
"Add-tuition-remittance-effective-amount-col.sql", | ||
"DisbursementSchedules", | ||
), | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
getSQLFileData( | ||
"Remove-tuition-remittance-effective-amount-col.sql", | ||
"DisbursementSchedules", | ||
), | ||
); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...-migrations/src/sql/DisbursementSchedules/Add-tuition-remittance-effective-amount-col.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Add tuition_remittance_effective_amount to disbursement_schedules table. | ||
ALTER TABLE | ||
sims.disbursement_schedules | ||
ADD | ||
COLUMN IF NOT EXISTS tuition_remittance_effective_amount NUMERIC(8, 2); | ||
|
||
COMMENT ON COLUMN sims.disbursement_schedules.tuition_remittance_effective_amount IS 'Effective tuition remittance considered for the disbursement evaluated based on awards effective values.'; |
3 changes: 3 additions & 0 deletions
3
...grations/src/sql/DisbursementSchedules/Remove-tuition-remittance-effective-amount-col.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Drop tuition_remittance_effective_amount from sims.disbursement_schedules. | ||
ALTER TABLE | ||
sims.disbursement_schedules DROP COLUMN IF EXISTS tuition_remittance_effective_amount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,10 +55,12 @@ export class CancelApplicationAssessmentProcessor { | |
} | ||
|
||
if ( | ||
assessment.application.applicationStatus !== ApplicationStatus.Cancelled | ||
![ApplicationStatus.Cancelled, ApplicationStatus.Overwritten].includes( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for doing the fix 😉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
assessment.application.applicationStatus, | ||
) | ||
) { | ||
await job.discard(); | ||
const errorMessage = `Application must be in the ${ApplicationStatus.Cancelled} state to have the assessment cancelled.`; | ||
const errorMessage = `Application must be in the ${ApplicationStatus.Cancelled} or ${ApplicationStatus.Overwritten} state to have the assessment cancelled.`; | ||
this.logger.error(errorMessage); | ||
throw new Error(errorMessage); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be not a part of the PR or may be. The effective_amount and the awards(which are money values) are NUMERIC(8 , 2) but the tuition_remittance and tuition_remittance_effective_value are INT. Don't we eventually have one data type for the the amounts? @ann-aot @andrewsignori-aot @guru-aot @andrepestana-aot @sh16011993
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had some back and forth about the money values actually having decimals or not. I would say that we can ensure that every money amount on DB has the ability to receive the decimals.
We also have different NUMERIC precisions (e.g.
NUMERIC(8, 2)
andNUMERIC(7, 2)
).I would say that we should normalize them all as
NUMERIC(8, 2)
which should allow 999,999.99.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can create a ticket to have this tracked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ticket created https://app.zenhub.com/workspaces/student-information-management-system-5fce9df5aa1b45000e937014/issues/gh/bcgov/sims/1859