R35450 ExciseStampOperations - The Excise Stamp Range Does Not Overlap With Previously Used Ranges

Name Value
Code R35450
Entity Finance.Excise.ExciseStampOperations Entity
Name TheExciseStampRangeDoesNotOverlapWithPreviouslyUsedRanges
Attribute StartNumber, EndNumber
Layer Back-End
Events Releasing +
Priority Normal
Modify NO
Applicable Legislations ALL // no condition needed
Action 1. For each line of the operation, the first 100 lines of operations are loaded for the combination of Excise Stamp Lot and Excise Stamp Operation Type, EnterpriseCompany and TaxWarehouse which are the same as in the current line and document and are released and not void.

2. If the records are exactly 100, it returns an error informational message:
"More than 100 sequences from one combination of Excise Stamp Lot and Excise Stamp Operation Type cannot be checked for overlapping. (R35450)".

3. If there are less than 100 records, we compare each line with the loaded lines and check the following:
For the current line of the ExciseStampOperation the StartNumber and EndNumber are smaller than StartNumber in every line in the already existing documents with same combination of Excise Stamp Lot and Excise Stamp Operation Type, or StartNumber and EndNumber are greater than any EndNumber for the same reference line.
(New.StartNumber < Exist.StartNumber and New.EndNumber<Exist.StartNumber) OR (StartNumber>Exist.EndNumber and EndNumber>Exist.EndNumber)
WhereExciseStampLot, ExciseStampOperationType, EnterpriseCompany and TaxWarehouseare the same as in the current line and document and the referenced document has Released+ status.
Description If the number of existing rows of operations with the same Excise Stamp Lot, Excise Stamp Operation Type EnterpriseCompany and TaxWarehouse as the current row is less than 100 then for each line in the document, it is checked whether the Excise Stamp numbers between the fields "From Number" and "To Number" have been used in other "Excise Stamp Operations" with a status of Released or higher for the same combination of Excise Stamp Lot and Excise Stamp Operation Type.
Message The series starting with '{ExciseStampOperationLine.StartNumber}' and ending with '{ExciseStampOperationLine.EndNumber}' overlaps with an already entered Excise Stamp Operation for the same Excise Stamp Lot and Excise Stamp Operation Type. The conflicting document is '{ExciseStampOperationLine}' with a Start Number of '{ExciseStampOperationLine.StartNumber}' and an End Number of '{ExciseStampOperationLine.EndNumber}'.
Introduced In Version Introduced: 2024
Updated: -
Revocable YES

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.