There is no option to perform calculations in the detail table fields and show the result in the master table.
Eg. In an invoice, the items and its quantity, rate and amount are the detail table. The calculation (mostly addition an multiplication) of columns of all rows of the details table have to be stored in the master table.
An image is shared for clarity.
All that we are told is to write a script.
So we write a script with no clue as to where to put it in phpMaker.
We have created the script and Total Amount is being displayed correctly. However, when a row in detail is deleted, the amount has to be recalculated in real time. We understand that a script for onclick of the delete button will have to be written. But where in phpMaker should we write the script (the same script written for Adding the Amount and storing in Total Amount) and how do we get the delete button’s id.
You may just right click the button in your browser and inspect the element to find the id. Then you can add your JavaScript to Client Script or Startup Script of the page.