Try this basic formula:

=SUMIF($A$2:$A$30,"CASH",$D$2:$D$30)

You can adapt it easily for other criteria.