diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml index 0b74cb7a7..0cc9af372 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml @@ -746,8 +746,8 @@ select IFNULL(sum(if(l.transaction_type='credit',l.clearing_amount,0)),0) trade_amount, ifnull(sum(if(l.refund_id>0,l.clearing_amount,0)),0) refund_amount, - sum(if(l.transaction_type='Credit',1,0)) trade_count, - sum(if(l.refund_id>0,1,0)) refund_orders + ifnull(sum(if(l.transaction_type='Credit',1,0)),0) trade_count, + ifnull(sum(if(l.refund_id>0,1,0)),0) refund_orders FROM pmt_transactions l where l.channel!='Settlement' and l.system_generate=0