rymghosn opened a new pull request, #6289:
URL: https://github.com/apache/fineract/pull/6289
What's the issue?
TaxValidator.validateForTaxGroupUpdate() required every
taxComponents[].endDate submitted with a tax group update to be strictly in the
future —
including for an existing, already-linked component that had already ended
and was simply being resubmitted unchanged as part of editing
something else about the group (renaming it, adding a new component,
etc.). Since clients typically resubmit the full taxComponents array on
update to avoid dropping existing mappings, this made a Tax Group
permanently un-editable once any one of its linked components passed its end
date, even when that end date wasn't being changed.
What's the fix?
The future-end-date check now only applies to newly added components (no
existing mapping id yet). Existing mappings continue to be validated by
validateTaxGroupEndDateAndTaxComponent(), which already correctly allows
an unchanged end date to pass through and only rejects an actual attempt
to modify it.
Incidental fix
While tracing the new-vs-existing distinction, found taxMappingId was
being extracted using the taxComponentId JSON key instead of id — a
pre-existing bug (predates this change) that made the new/existing branch
a no-op. Corrected the key so the distinction — and this fix — actually
works.
PR:(https://issues.apache.org/jira/browse/FINERACT-2768)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]