Find function itemized(PostTicketId) in my PMS Integration topic.
It will need some adapting…
Few parts will be irrelevant.
Also note there are a couple of dependent scripts which are being loaded at the top of the script, you will also need these either as part of it or dependent like mine.