fix bug when both a payment type and date range are specified