|
|
|
@ -98,7 +98,7 @@
|
|
|
|
|
refund_fee,
|
|
|
|
|
sum(if(t.transaction_type='Debit' AND t.refund_id is NOT NULL and o.pre_authorization=1,t.clearing_amount,0))
|
|
|
|
|
pre_refund_fee,
|
|
|
|
|
|
|
|
|
|
sum(t.tax_amount) tax_amount,
|
|
|
|
|
ifnull(sum(if(t.transaction_type = 'Credit' and t.channel != 'Settlement',t.settle_amount,if(t.channel !=
|
|
|
|
|
'Settlement',-t.settle_amount,0))),0) total_settle_amount,
|
|
|
|
|
ifnull(sum(if(t.transaction_type = 'Credit' and t.channel != 'Settlement',t.royal_surcharge,if(t.channel !=
|
|
|
|
@ -115,6 +115,7 @@
|
|
|
|
|
'Bestpay',-t.channel_surcharge,0))),0) bestpay_fee,
|
|
|
|
|
ifnull(sum(if(t.transaction_type = 'Credit' and t.channel = 'AlipayOnline',t.channel_surcharge,if(t.channel =
|
|
|
|
|
'AlipayOnline',-t.channel_surcharge,0))),0) alipay_online_fee
|
|
|
|
|
|
|
|
|
|
FROM pmt_transactions t
|
|
|
|
|
left JOIN pmt_orders o on o.order_id=t.order_id
|
|
|
|
|
<where>
|
|
|
|
|