fix clearing date display

master
yixian 6 years ago
parent f0616d9323
commit 55eb47b8f7

@ -283,8 +283,8 @@
SELECT t.client_id,DATE(t.transaction_time) clearing_time,
ifnull(cd.report_date,date(t.transaction_time)) report_date,
SUM(t.clearing_amount) total,
sum(if(LOCATE('MERCHANT',t.system_transaction_id),clearing_amount,0)) income,
sum(if(LOCATE('SURCHARGE',t.system_transaction_id),clearing_amount,0)) fee,
sum(if(LOCATE('MERCHANT',t.system_transaction_id),t.clearing_amount,0)) income,
sum(if(LOCATE('SURCHARGE',t.system_transaction_id),t.clearing_amount,0)) fee,
(SELECT min(r.rate_value) FROM sys_client_rates r WHERE r.client_id = t.client_id
AND date(r.expiry_time) >= DATE(t.clearing_time)
AND date(r.active_time) <= DATE(t.clearing_time)) rate,

Loading…
Cancel
Save