Script for Sub total and Totals in Subforms

Script for Sub total and Totals in Subforms

I've been trying to do a simple calculation using Sub form's workflow. Search through the KB but no answer using the new interfaces.



Just need
1) self-calculate the Sub total Price from ( Quantity * Price per unit)
2) Total up the sub total price to the Total Price 

Any help is appreciated.