-
-
Notifications
You must be signed in to change notification settings - Fork 748
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
Round 1 changes for 1952 #2022
Round 1 changes for 1952 #2022
Conversation
@@ -521,14 +521,14 @@ public List<InvoiceItemModelDao> inTransaction(final EntitySqlDaoWrapperFactory | |||
} | |||
|
|||
@Override | |||
public List<InvoiceModelDao> getInvoicesBySubscription(final UUID subscriptionId, final InternalTenantContext context) { | |||
public List<InvoiceModelDao> getInvoicesBySubscription(final UUID subscriptionId, final InternalTenantContext context) { //TODO_1952 - This method is used only by tests, so passing includeTrackingIds=false. Can we delete this method? |
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.
I think deleting would be great - if not passing false
is good.
@@ -1316,7 +1316,7 @@ public InvoiceModelDao getParentDraftInvoice(final UUID parentAccountId, final I | |||
final InvoiceSqlDao invoiceSqlDao = entitySqlDaoWrapperFactory.become(InvoiceSqlDao.class); | |||
final InvoiceModelDao invoice = invoiceSqlDao.getParentDraftInvoice(parentAccountId.toString(), context); | |||
if (invoice != null) { | |||
invoiceDaoHelper.populateChildren(invoice, invoicesTags, false, entitySqlDaoWrapperFactory, context); | |||
invoiceDaoHelper.populateChildren(invoice, invoicesTags, false, false, entitySqlDaoWrapperFactory, context); //TODO_1952 - Passing includeTrackingIds=false, revisit to confirm if this is correct |
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.
Yes, passing false
is correct - this is only used internally. The rule is that if the invoice (or list of invoices) are not returned to the client (jaxrs or plugins), we can pass false
.
@@ -281,7 +285,7 @@ public List<InvoiceModelDao> getAllInvoicesByAccountFromTransaction(final Boolea | |||
.filter(invoice -> includeVoidedInvoices || !InvoiceStatus.VOID.equals(invoice.getStatus())) | |||
.collect(Collectors.toUnmodifiableList()); | |||
if (includeInvoiceComponents) { | |||
populateChildren(filtered, invoicesTags, false, entitySqlDaoWrapperFactory, context); | |||
populateChildren(filtered, invoicesTags, false, true, entitySqlDaoWrapperFactory, context); |
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.
Good. For pass #2, this probably one option where we could optimize based on use cases, internal vs externals.
Round 1 changes for #1952:
I will implement the following as part of Round 2: