Conversation
vyasraos
reviewed
Mar 1, 2023
| @ApiProperty() | ||
| @IsNumber() | ||
| @IsOptional() | ||
| adjusted_amount?: number; |
There was a problem hiding this comment.
this should be renamed to cad_amount
it cannot be optional
vyasraos
reviewed
Mar 1, 2023
| } | ||
|
|
||
| public get payment_amount(): number { | ||
| return this.adjusted_amount ?? this.amount; |
There was a problem hiding this comment.
I dont think this is right. both these fields could be of different currencies
| "adjusted_amount": 20.12, | ||
| "currency": "USD", | ||
| "exchange_rate": 1.34, | ||
| "payment_method": "US_FUNDS", |
There was a problem hiding this comment.
is this a new payment method because it exists in GARMS?
do we need US_FUNDS? then is CAD payments CAD_FUNDS?
if we say just CASH, is it CAD or any currency cash?
24fdf70 to
288f0ab
Compare
3e216e5 to
a79bd6b
Compare
vyasworks
approved these changes
Mar 2, 2023
| "adjusted_amount": 20.12, | ||
| "currency": "USD", | ||
| "exchange_rate": 1.34, | ||
| "payment_method": "US_FUNDS", |
Contributor
There was a problem hiding this comment.
What is the point of having Currency if we have US_FUNDS?
should CASH then be called CAD_FUNDS?
if no other currencies are accepted except CAD and USD, do we even need a currency column?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CCFPCM-0393
Objective:
Account for USD during reconciliation
Add column to record the calculated CAD amount in the case of non CAD payments (based on the provided exchange rate)
Write migrations to include this column with the proper amounts in the db
Write migration to update the current garms SBC exchange rate format to a standard exchange rate format. (Percentage, from foreign currency to CAD, not vice versa... ie: USD -> CAD = 1.34)
Update garms parsing for proper exchange rate format
Update API spec to validate proper exchange rate format
Update cash reconciliation to use the calculated amount
Add a getter to the payment class to return adjusted amount if it is exists, or, amount if not, and use this value for cash reconciliation