If you have child records with the Ref field, you should have a virtual list column named like “Related Childs”. That’s a list of key values from related child records. If you want to sum all prices from those records, you can do that like…
One way is like SUM([Related Childs][Price1])+SUM([Related Childs][Price2]). Or you can first sum prices in the child record and then calculate the total like SUM([Related Childs][TotalPrice])