Fixed bug in purchase total query.

The LEFT JOIN on the custdata table in the "purchase total" query
was only checking against the custdata.id field. As a consequence,
if a member was in more than one account this query was showing multiple
redundant rows. The problem was solved by checking against both
custdata.id AND custdata.CardNo.