Totaling amount of certain ingredient used every time recipe is logged

Hi Guys
I need a hand.
I’m building an ingredient inventory tracker (here) and I need to calculate the total amount each of each ingredient used every time the recipe is logged.
I’ve got the other half of the tracker working fine, adding in ingredients every time an order is logged.
Any insight would be greatly appreciated.