select sum(total) from fin_ledger where and vid='' and isdel=0 and type='DISCOUNT' and (src='INV' or src='CSL' or src='SCN') failed: