I have a detail table and I need to calculate the GST (10%) on the sum of a particular field’s (amount) values.
However, GST only applies if another field (typecode) is equal to 5,6,7,8 or 12. There are many other typecode’s but most are exempt from GST. If none of the aforementioned typecodes exist in the record then GST will be equal to 0.00
Thank you so much for the script, however I don’t wish to add the calculation to the detail table, but rather display the GST in another location on the document. Is that possible?
Of course. Store the result in a variable, that variable will be available to the second script. You just have to make sure the script that calculates the value runs before the one that displays it (scripts are executed from top to bottom in the list).