-
Notifications
You must be signed in to change notification settings - Fork 40
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
22391 - EFT Multi Account under payment #1738
Conversation
- short name service refactor for eft credit balance to avoid cyclic issue
@@ -75,16 +75,6 @@ class EFTShortnamesSearch: # pylint: disable=too-many-instance-attributes | |||
class EFTShortnames: # pylint: disable=too-many-instance-attributes | |||
"""Service to manage EFT short name model operations.""" | |||
|
|||
@staticmethod | |||
def get_eft_credit_balance(short_name_id: int) -> Decimal: |
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.
Moved to model due to cyclic issues with statement service.
As previously discussed we will be refactoring this service to split it out later. Depending on the query some of these functions are probably better in the model.
InvoiceModel.invoice_status_code.in_([InvoiceStatus.APPROVED.value, | ||
InvoiceStatus.OVERDUE.value]))) | ||
.filter( | ||
InvoiceModel.payment_account_id.in_(accounts_query)).subquery()) |
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.
Tested against several large accounts for this in clause, at once. Results came back in about 100ms
Hold off for release |
Working on a test to set up multi account link to trigger under payment flag. |
@classmethod | ||
def find_by_short_name_id(cls, short_name_id: int): | ||
def find_by_short_name_id(cls, short_name_id: int) -> Self: |
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.
cool I think I was using futures, but this looks better
Issue #:
bcgov/entity#22391
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).