Calculating on a Dynamic Page

Hello there, for many days I am trying to solve this simple calculation issue but failed.
Last day I tried using a different approach (Example Image) with a repeater on a regular page and it worked fine.
But for my own website, I need to show similar calculations on a dynamic page. I tried using both the dynamic dataset and a dataset to populate the repeater but somehow it is not working. Although the code structure is the same.
In both cases, the mentioned functions run under on.Ready() function of the page.
How can I manage to solve this?

NB - On my website, ticketNo comes from the dropdown in the repeater. The value of the dropdown, however, is set to 1 by default. Even changing the value doesn’t work.

Hi,
You posted many screenshots but it’s not clear which of them is relevant and what exactly you were trying to achieve.
Please elaborate + post the relevant code as text (in a code block) and not as image.
Meanwhile, I can see the follwoing:
You shouldn’t put an event handler inside repeater.onReady (it might make problems if you filter or change the repeater data). You can go to the NPM package, look for ‘repeater-scope’, install the package and follow the instructions in the readme file.