Skip to content

[CCFPCM-0393] non CAD cash#64

Merged
chelsea-EYDS merged 2 commits intomainfrom
CCFPCM-0393
Mar 2, 2023
Merged

[CCFPCM-0393] non CAD cash#64
chelsea-EYDS merged 2 commits intomainfrom
CCFPCM-0393

Conversation

@chelsea-EYDS
Copy link
Contributor

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

@ApiProperty()
@IsNumber()
@IsOptional()
adjusted_amount?: number;
Copy link

Choose a reason for hiding this comment

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

this should be renamed to cad_amount

it cannot be optional

}

public get payment_amount(): number {
return this.adjusted_amount ?? this.amount;
Copy link

Choose a reason for hiding this comment

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

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",
Copy link

Choose a reason for hiding this comment

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

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?

"adjusted_amount": 20.12,
"currency": "USD",
"exchange_rate": 1.34,
"payment_method": "US_FUNDS",
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

@chelsea-EYDS chelsea-EYDS merged commit 7753706 into main Mar 2, 2023
@chelsea-EYDS chelsea-EYDS deleted the CCFPCM-0393 branch March 22, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants