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

19336 - EFT Payment details #1389

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Conversation

ochiu
Copy link
Collaborator

@ochiu ochiu commented Jan 29, 2024

Issue #:
bcgov/entity#19336

Description of changes:

  • EFT Short name search updates
  • EFT transactions by short name route
  • Add deposit date and transaction date to eft_transactions table

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).

- EFT Short name search updates
- EFT transactions by short name route
@ochiu ochiu requested review from seeker25 and Jxio as code owners January 29, 2024 21:00
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 117 lines in your changes are missing coverage. Please review.

Comparison is base (79924ce) 91.45% compared to head (da3da1c) 92.12%.
Report is 88 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1389      +/-   ##
==========================================
+ Coverage   91.45%   92.12%   +0.67%     
==========================================
  Files         186      192       +6     
  Lines       11319    12693    +1374     
==========================================
+ Hits        10352    11694    +1342     
- Misses        967      999      +32     
Flag Coverage Δ
bcolapi ?
eventlistenerqueue 82.00% <100.00%> (+0.18%) ⬆️
payadmin ∅ <ø> (?)
payapi 93.71% <92.46%> (-0.03%) ⬇️
paymentjobs 84.45% <96.36%> (+4.23%) ⬆️
paymentreconciliationsqueue 92.38% <93.90%> (+0.93%) ⬆️
reportapi ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
jobs/payment-jobs/tasks/common/dataclasses.py 100.00% <100.00%> (ø)
jobs/payment-jobs/tasks/common/enums.py 100.00% <ø> (ø)
jobs/payment-jobs/tasks/distribution_task.py 97.70% <100.00%> (-0.06%) ⬇️
...ayment-jobs/tasks/ejv_partner_distribution_task.py 99.17% <100.00%> (+0.03%) ⬆️
jobs/payment-jobs/tasks/ejv_payment_task.py 96.61% <100.00%> (+0.14%) ⬆️
.../payment-jobs/tasks/statement_notification_task.py 79.74% <100.00%> (+47.92%) ⬆️
jobs/payment-jobs/tasks/statement_task.py 91.39% <100.00%> (+10.96%) ⬆️
pay-api/src/pay_api/config.py 99.35% <100.00%> (+<0.01%) ⬆️
pay-api/src/pay_api/models/__init__.py 100.00% <100.00%> (ø)
pay-api/src/pay_api/models/custom_query.py 100.00% <100.00%> (ø)
... and 71 more

... and 23 files with indirect coverage changes

@ochiu ochiu removed the DoNotMerge label Jan 29, 2024
Copy link
Collaborator

@seeker25 seeker25 left a comment

Choose a reason for hiding this comment

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

looks great

deposit_date=string_to_date(deposit_date) if deposit_date else None,
deposit_amount=Decimal(deposit_amount) * Decimal(100) if deposit_amount else None,
short_name=short_name,
transaction_date=string_to_date(transaction_date) if transaction_date else None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

change string_to_date to return None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was an existing utility function I re-used. I will take a look at some of the existing usages and see if it impacts it.

Copy link
Collaborator

@seeker25 seeker25 Jan 30, 2024

Choose a reason for hiding this comment

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

it would throw a runtime error if None was put in there fairly certain, I don't think you'd be impacting anything

image

RoutingSlipDate would fail the schema on the API endpoint before hitting that line I think

paymentDate they did the same thing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated utils function and any usages.

EFTTransactionModel.deposit_date,
EFTTransactionModel.deposit_amount_cents,
EFTTransactionModel.short_name_id,
func.row_number().over(partition_by=EFTTransactionModel.short_name_id,
Copy link
Collaborator

Choose a reason for hiding this comment

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

cool haven't see partition by much

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@Jxio Jxio left a comment

Choose a reason for hiding this comment

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

LGTM

@ochiu ochiu merged commit 6d4a94c into bcgov:main Jan 30, 2024
22 checks passed
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