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

Paid invoices and invoice lines data #1239

Merged
merged 9 commits into from
Oct 4, 2024
Merged

Paid invoices and invoice lines data #1239

merged 9 commits into from
Oct 4, 2024

Conversation

shelleydoljack
Copy link
Contributor

@shelleydoljack shelleydoljack commented Oct 3, 2024

Closes #1218
Closes #1209

@shelleydoljack shelleydoljack marked this pull request as ready for review October 3, 2024 23:22
Comment on lines +151 to +168
[
{
"fadacf66-8813-4759-b4d3-7d506db38f48": {
"fund_ids": [
"0e8804ca-0190-4a98-a88d-83ae77a0f8e3"
],
"poline_id": "b5ba6538-7e04-4be3-8a0e-c68306c355a2"
}
},
{
"a16030c1-66ca-44c1-b0a3-572cde626685": {
"fund_ids": [
"47e1fc24-300d-4817-a866-5c0a2f490522"
],
"poline_id": "5513c3d7-7c6b-45ea-a875-09798b368873"
}
}
]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I was writing the test, I started to wonder why we even want the invoice line UUID here as key. Maybe for troubleshooting? We could have invoice lines that do not have fundDistributions (it is not required per json schema docs) and also no po line ID. So if the fund ID is missing or po line is missing, we don't want that data. Currently, in those cases, the filter_invoice_lines list can include an object like:

{"a16030c1-66ca-44c1-b0a3-572cde626685": {}}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or maybe in reporting in an email?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we change this in a subsequent PR if unpacking this list is problematic with the empty objects for invoicelines that don't have funds or po lines.

retrieve_instances = instances_from_po_lines(
retrieve_paid_po_lines, retrieve_bookplate_fund_ids
)
retrieve_instances = instances_from_po_lines(retrieve_bookplate_fund_po_lines)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The instances_from_po_lines is missing a required funds parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest commit.

@jermnelson jermnelson self-requested a review October 4, 2024 17:15
@jermnelson jermnelson merged commit d7a1f24 into main Oct 4, 2024
4 checks passed
@jermnelson jermnelson deleted the t1218-paid-invoices branch October 4, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants