No need to apologise - oversight on my part I think as this requirement is rather self evident!

You could perhaps try

Formula: copy to clipboard

D2:
=IF($C2>0,SUM($C2,IFERROR(LOOKUP(2,1/($B$1:$B1=$B2),$D$1:$D1*($A$1:$A1>EDATE($A2,-6))),0)),"")
copied down