diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml index a5969ea3a..1fd1d1ca4 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml @@ -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 diff --git a/src/main/ui/static/payment/tradelog/templates/balance_report.html b/src/main/ui/static/payment/tradelog/templates/balance_report.html index 78d9aa39c..87700885c 100644 --- a/src/main/ui/static/payment/tradelog/templates/balance_report.html +++ b/src/main/ui/static/payment/tradelog/templates/balance_report.html @@ -245,7 +245,7 @@ clearing amount - ( clearing fee: {{analysis.total_surcharge|currency:'AUD '}} ) + ( clearing fee: {{analysis.total_surcharge + analysis.tax_amount|currency:'AUD '}} )