fix: preventing naming gaps now validates each series individually#103
Conversation
…en using more than one naming series
|
👀 |
There was a problem hiding this comment.
Pull request overview
This pull request fixes a validation issue in the transaction deletion prevention logic. Previously, when "prevent gaps in transaction naming" was enabled, the validation checked for newer documents globally across all naming series, incorrectly blocking deletion of documents from one series if a newer document existed in a different series. Now, the validation is performed independently for each naming series, allowing proper deletion of the most recent document within its own series.
Changes:
- Modified
is_not_latestfunction tois_not_latest_in_seriesto filter by naming series - Added
naming_seriesparameter to the validation logic - Updated error message to clarify that validation is per-series
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 15.22.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
@Mergifyio backport version-16-hotfix |
✅ Backports have been createdDetails
|
) Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com> (cherry picked from commit fe3d314)
) (#113) Co-authored-by: worcworc <34313456+worcworc@users.noreply.github.com> Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
## [15.22.1](alyf-de/erpnext_germany@v15.22.0...v15.22.1) (2026-01-30) ### Bug Fixes * preventing naming gaps now validates each series individually ([alyf-de#103](alyf-de#103)) ([fe3d314](alyf-de@fe3d314))
# [15.23.0](alyf-de/erpnext_germany@v15.22.1...v15.23.0) (2026-01-30) ### Bug Fixes * **Business Trip Region:** import current data (backport [alyf-de#111](alyf-de#111)) ([alyf-de#112](alyf-de#112)) ([7d446ff](alyf-de@7d446ff)) * **Business Trip:** filter by valid_from ([alyf-de#109](alyf-de#109)) ([8022ff2](alyf-de@8022ff2)) * preventing naming gaps now validates each series individually ([alyf-de#103](alyf-de#103)) ([12c945c](alyf-de@12c945c)) ### Features * **Business Trip Region:** adjust the data structure to retrieve date specific allowance rates ([alyf-de#106](alyf-de#106)) ([4b09b64](alyf-de@4b09b64))
# [16.1.0](alyf-de/erpnext_germany@v16.0.0...v16.1.0) (2026-01-30) ### Bug Fixes * **Business Trip Region:** import current data ([alyf-de#111](alyf-de#111)) ([609d5c9](alyf-de@609d5c9)) * **Business Trip:** no allowance for single-day trip with less than 8h ([alyf-de#114](alyf-de#114)) ([579e360](alyf-de@579e360)) * preventing naming gaps now validates each series individually ([alyf-de#103](alyf-de#103)) ([alyf-de#113](alyf-de#113)) ([2763b17](alyf-de@2763b17)) ### Features * **Business Trip Region:** adjust the data structure to retrieve date specific allowance rates (backport [alyf-de#106](alyf-de#106)) ([alyf-de#108](alyf-de#108)) ([7193b3f](alyf-de@7193b3f))
…when using more than one naming series such as "RE-" and "GU-" for sales invoice.
When using more than one naming series (for example, "RE-" and "GU-") for Sales Invoices, the “prevent gaps in transaction naming” validation previously blocked deletion of newer documents even if they belonged to different naming series.
With this update, the validation now checks for gaps within each naming series independently — allowing you to delete the newest document of a given series, even if there are newer documents with another prefix.
Example:
RE-0005
GU-0007
Previously, if RE-0005 was newer, you couldn’t delete GU-0007.
Now, each series (RE- and GU-) is validated separately, so you can safely delete the newest document of either series.