Index: APPS/VisiDot/impl/Tech.cls.xml =================================================================== diff -u -r57604 -r57606 --- APPS/VisiDot/impl/Tech.cls.xml (.../Tech.cls.xml) (revision 57604) +++ APPS/VisiDot/impl/Tech.cls.xml (.../Tech.cls.xml) (revision 57606) @@ -6,6 +6,21 @@ 1 APPS.VisiDot.Tech + +%Numeric +999999 + + + +%Numeric +9999999 + + + +%Numeric +100000 + + 1 List:%ListOfObjects,Sleutel:%String @@ -93,19 +108,22 @@ Batch:%Integer,VHossSeqNr:%List,VHossZijkant:APPS.VisiDot.enu.Zijkant,Product:%Integer %String 999999 { + If Batch > ..#MaximumBatchId { Do ##class(TECH.Exceptions.InvalidInputException).Throw("BatchId '"_Batch_"' mag niet groter zijn dan 999999 (i.e. max 6 cijfers).") } - If Product > 9999999 { + If Product > ..#MaximumProductId { Do ##class(TECH.Exceptions.InvalidInputException).Throw("ProductId '"_Product_"' mag niet groter zijn dan 9999999 (i.e. max 7 cijfers).") } - + + // Als BatchId de 100000 overschrijdt, dan het Honderdduizendtal afsplitsen, en op positie 9 van de LadeID invoegen. + // Dit om backward compatibel te blijven met de huidige LadeIDs. #dim BatchVanMax5cijfers As %Integer = Batch #dim BatchHonderdduizendtal As %Integer = 0 - If Batch > 99999 { - Set BatchHonderdduizendtal = (Batch \ 100000) - Set BatchVanMax5cijfers = (Batch # 100000) + If Batch > (..#Honderdduizend - 1) { + Set BatchHonderdduizendtal = (Batch \ ..#Honderdduizend) + Set BatchVanMax5cijfers = (Batch # ..#Honderdduizend) } + Quit ..Justify(BatchVanMax5cijfers,5)_..Justify(VHossSeqNr,2)_..Justify(VHossZijkant,1)_..Justify(BatchHonderdduizendtal,1)_..Justify(Product,7) ]]> @@ -132,7 +150,7 @@ 1 LadeID:%String %Integer -