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

Nl r 007 creditnote fix #128

Merged

Conversation

tjeb
Copy link
Contributor

@tjeb tjeb commented Sep 20, 2023

This is a PR for a fix in country-specific rule NL-R-007; this rule checks that a PaymentMeans is present if the payable amount is positive.

The original rule also fired on CreditNote documents, which should not happen.

In case of UBL, this is a change in the context (Invoice only); in case of CII, the assertion also succeeds if the typecode is 381.

Added a testcase for creditnotes to the unit tests as well, but I don't think I have a way to verify the unit tests themselves.

Jelte Jansen added 4 commits September 20, 2023 14:52
NL-R-007 requires that a payment means is provided, which only makes sense if there is a payment, i.e. for positive invoices.
NL-R-007 requires that a payment means is provided, which only makes sense if there is a payment, i.e. for positive invoices (typecode != 381).
@tjeb
Copy link
Contributor Author

tjeb commented Sep 25, 2023

This PR triggered some discussion about negative creditnotes, and whether those should require payment means. I'm inclined to amend the PR to add that, so please don't merge just yet.

Jelte Jansen added 3 commits September 25, 2023 16:01
Addendum to the fix in a7a6898, in case the CreditNote itself is negative, the payment means should be required.
Addendum to the fix in 5cc83d5, in case the CreditNote itself is negative, the payment means should be required.
Add additional error cases for the fixes in commits 7b5032f and edc5743
@tjeb
Copy link
Contributor Author

tjeb commented Sep 25, 2023

Additional checks added; paymentmeans is now mandatory for invoices with a positive amount and creditnotes with a negative amount.

@jerouris jerouris changed the base branch from master to 2024-q2-dev March 27, 2024 07:27
@jerouris jerouris merged commit 0045b9d into OpenPEPPOL:2024-q2-dev Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants