Sum individual discounts from line items to the quote level

Sum individual discounts from line items to the quote level

Hello! I created a new field (of type Currency) in Quote - called "SumDiscount". I'm trying to sum up all the discount from all the line items into that field. Every time the discount value is modified on one of the existing line items or if a new line item is added that has discount on it - the value of SumDiscount should change. I tried multiple ways to get that to work but it is not working. Can someone help me figure out what code should I put in to get this to work? (Btw, I changed the Quote module name to "Bookings"). Thanks!!!