Wow amazing, this is exactly what I need. Ill have a proper look on my next day off but this is very appreciated!
Using my method might cause you problems with Out-Of-Memory exceptions, or at the very least you might find that SambaPOS slows down A LOT…
The issues are discussed in the following topics, but until this memory issue is addressed calling jScript to process some logic is probably not a good idea.
It seems like these issues have been pretty well explained by @philbkk so hopefully they will be addressed by the team in the very near futue.