-
Notifications
You must be signed in to change notification settings - Fork 22.2k
fix(Invoice Ninja Node): Fix assigning an invoice to a payment #9590
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
fix(Invoice Ninja Node): Fix assigning an invoice to a payment #9590
Conversation
@Joffcom Can this PR please get a review asap? It's broken functionality that's not working with the latest InvoiceNinja software and should be fixed. I made the changes as minimal invasive as possible as not to break v4 functionality. Thank you. Same applies to #9589. As it seems InvoiceNinja v5 isn't working for 1.5 years when I look at the history of #4807 . So, I would really appreciate having this reviewed and merged asap. If there's anything I can do to speed this up, please let me know. |
Hey @CodeShakingSheep, Sorry I had a week off so wasn't able to get to this one, This PR is on my list to check tomorrow morning which is one of 2 review sessions I do each week. |
Hey @Joffcom, I made the changes in my Invoice Ninja PRs as small as possible. I'd appreciate a review of these PRs asap when you have your next review session. Thank you 🙏 |
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.
Thanks for this the change looks good.
4 flaky tests on run #5773 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
Undo/Redo > should undo/redo renaming node using NDV |
Test Replay
Screenshots
Video
|
5-ndv.cy.ts • 2 flaky tests
Test | Artifacts | |
---|---|---|
NDV > should not retrieve remote options when required params throw errors |
Screenshots
Video
|
|
NDV > Stop listening for trigger event from NDV |
Screenshots
Video
|
20-workflow-executions.cy.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
Current Workflow Executions > should auto load more items if there is space and auto scroll |
Test Replay
Screenshots
Video
|
Review all test suite changes for PR #9590 ↗︎
Got released with |
Summary
Currently, when creating a payment and specifying an invoice ID for it, the invoice isn't assigned to the payment. Instead, an unapplied payment is created in InvoiceNinja. This is because the body for the payment create request has changed in API v5, see https://api-docs.invoicing.co/#post-/api/v1/payments.
This PR fixes this by keeping the current request body for API version 4 and changes adds an invoices array to the request body for API version 5.
Related tickets and issues
None available. I just used the Invoice Ninja API node and figured that a payment is never assigned to an invoice although an
invoice_id
has been specified.Review / Merge checklist
(no-changelog)
otherwise. (conventions)