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

22672 - Fix missing Approved invoices on get_invoices_owing_amount #1682

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

Jxio
Copy link
Collaborator

@Jxio Jxio commented Aug 14, 2024

Issue #:
bcgov/entity#22672

Description of changes:

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).

@Jxio Jxio self-assigned this Aug 14, 2024
@ochiu
Copy link
Collaborator

ochiu commented Aug 14, 2024

Thanks Jia, can we add / expand on an existing test to check on this invoices amount owing please?

@@ -248,6 +248,7 @@ def get_invoices_owing_amount(auth_account_id: str):
.filter(InvoiceModel.invoice_status_code.in_((InvoiceStatus.SETTLEMENT_SCHEDULED.value,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need an EFT filter here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we do

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, let's do that to make this more clean/safe. Only EFT uses the statement summary right now. We can consider expanding this by adding a payment method query parameter in the future if needed.

@@ -248,6 +248,7 @@ def get_invoices_owing_amount(auth_account_id: str):
.filter(InvoiceModel.invoice_status_code.in_((InvoiceStatus.SETTLEMENT_SCHEDULED.value,
InvoiceStatus.PARTIAL.value,
InvoiceStatus.CREATED.value,
Copy link
Collaborator

@seeker25 seeker25 Aug 14, 2024

Choose a reason for hiding this comment

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

I think we need to take out CREATED, CREATED applies to NSF invoices and other payment methods.. EFT doesn't have CREATED anymore

Copy link
Collaborator

Choose a reason for hiding this comment

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

The parent function doesn't have CREATED:

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah I think so, taking out

@seeker25 seeker25 changed the title Fix missing Approved invoices on get_invoices_owing_amount 22672 - Fix missing Approved invoices on get_invoices_owing_amount Aug 14, 2024
@seeker25
Copy link
Collaborator

Associated this to the correct ticket 22672

@Jxio Jxio merged commit 2ac81ff into bcgov:main Aug 14, 2024
4 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