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

[16.0][FIX] l10n_es_aeat_mod303: Avoid negatives in fee to compensate #4048

Conversation

pedrobaeza
Copy link
Member

If the previous 303 report has remaining fee to compensate, and the result of the report is positive and bigger than the fee to compensate, when computing the current one, the constraint

"The fee to compensate must be indicated as a positive number."

will raise always.

To avoid it, two changes have been done:

  1. Only substract report result if it's of type C.
  2. Nullify any possible result when it's less than 0.

Amendment of 4bd1c02

@Tecnativa TT55245

@pedrobaeza pedrobaeza added this to the 16.0 milestone Feb 26, 2025
@EmilioPascual
Copy link
Contributor

Hay que corregir los tests del 303 y del 390

@pedrobaeza
Copy link
Member Author

Sí, tengo que ver qué están haciendo esos tests y por qué fallan. Creo que es porque simplemente comprueba los valores que tocaban antes según la expresión aritmética, pero tal vez hay un caso legítimo que me estoy dejando.

@pedrobaeza pedrobaeza force-pushed the 16.0-fix-l10n_es_aeat_mod303-potential_cuota_compensar branch from 5d3c7a7 to 8af639e Compare February 26, 2025 19:25
If the previous 303 report has remaining fee to compensate, and the
result of the report is positive and bigger than the fee to compensate,
when computing the current one, the constraint

  "The fee to compensate must be indicated as a positive number."

will raise always.

To avoid it, two changes have been done:

1. Only substract report result if it's of type C.
2. Nullify any possible result when it's less than 0.

Amendment of 4bd1c02

TT55245
@pedrobaeza pedrobaeza force-pushed the 16.0-fix-l10n_es_aeat_mod303-potential_cuota_compensar branch from 8af639e to d150e2d Compare February 26, 2025 20:24
@pedrobaeza
Copy link
Member Author

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-4048-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Feb 26, 2025
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-4048-by-pedrobaeza-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@pedrobaeza
Copy link
Member Author

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-4048-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 5dda18a into OCA:16.0 Feb 27, 2025
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 8f1e36c. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-fix-l10n_es_aeat_mod303-potential_cuota_compensar branch February 27, 2025 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants