Your are correct the script is on the calculate event of a numeric field. No errors with Debugger. I put a message box in several areas of the code, it triggers properly, and the first line is calculated. Nothing afterwards.
I added a button that recalculates the form xfa.form.recalculate(1); when I click this button the form is calculated correctly, multiple dynamic lines and all.
Just not sure why the original code is not doing it automatically. Can I post anything else that would help? Not being a JS expert all I can say is logically the script works, short of sum action, just not recognizing the dynamically added lines as additional fields to calculate.