-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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 payment types #10196
Merged
Joffcom
merged 3 commits into
n8n-io:master
from
CodeShakingSheep:invoiceninja-fix-payment-types
Aug 7, 2024
Merged
fix(Invoice Ninja Node): Fix payment types #10196
Joffcom
merged 3 commits into
n8n-io:master
from
CodeShakingSheep:invoiceninja-fix-payment-types
Aug 7, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n8n-assistant
bot
added
community
Authored by a community member
node/improvement
New feature or request
in linear
Issue or PR has been created in Linear for internal review
labels
Jul 25, 2024
3 tasks
Joffcom
approved these changes
Aug 1, 2024
Merged
Got released with |
MiloradFilipovic
added a commit
that referenced
this pull request
Aug 7, 2024
* master: refactor(core): Centralize scaling mode (no-changelog) (#9835) fix(editor): Remove body padding from storybook previews (no-changelog) (#10317) feat(MySQL Node): Return decimal types as numbers (#10313) 🚀 Release 1.54.0 (#10315) feat(Elasticsearch Node): Add bulk operations for Elasticsearch (#9940) feat(Stripe Trigger Node): Add Stripe webhook descriptions based on the workflow ID and name (#9956) feat(MongoDB Node): Add projection to query options on Find (#9972) fix(Invoice Ninja Node): Fix payment types (#10196) feat(HTTP Request Tool Node): Use DynamicStructuredTool with models supporting it (no-changelog) (#10246) feat: Return scopes on executions (no-changelog) (#10310) feat(Webflow Node): Update to use the v2 API (#9996) feat(Lemlist Trigger Node): Update Trigger events (#10311) feat(Calendly Trigger Node): Update event names (no-changelog) (#10129) refactor(core): Reorganize webhook related components under src/webhooks (no-changelog) (#10296) docs: Fix links to license files in readme (no-changelog) (#10257) fix(editor): Update design system Avatar component to show initials also when only firstName or lastName is given (#10308) fix(editor): Update tags filter/editor to not show non existing tag as a selectable option (#10297) fix(editor): Update project tabs test (no-changelog) (#10300) fix(core): VM2 sandbox should not throw on `new Promise` (#10298) # Conflicts: # packages/design-system/src/components/N8nAvatar/Avatar.vue
Hi @Joffcom , It says that |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
community
Authored by a community member
in linear
Issue or PR has been created in Linear for internal review
node/improvement
New feature or request
Released
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently, a payment's payment type is not assigned correctly as the payment type constants have changed from version 4 to version 5. The current constants can be found here: https://github.com/invoiceninja/invoiceninja/blob/v5-stable/app/Models/PaymentType.php#L37
Those constants don't match the current payment type constants which are defined in n8n's Invoice Ninja Node. See https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/InvoiceNinja/PaymentDescription.ts#L97
E.g. in v4 Bank Transfer has value 2 whereas in v5 Bank Transfer has value 1. In one of my workflows this resulted in a payment being created as cash although it was a bank transfer (because in v5 value 1 is assigned to Cash whereas in v4 is was assigned to Bank Transfer). The number constants changed for many other payment types as well. So, I updated them for v5 for Payments and Expenses and kept compatibility with v4 by adding a
displayOption
based on the API version in use.Related Linear tickets, Github issues, and Community forum posts
None.
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)