diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java index 8bba8302a..4432474f4 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java @@ -244,17 +244,14 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT params.put("end",DateUtils.addDays(params.getDate("end"),-1)); JSONObject yes = getTransJSONO(params); res.put("today",today); - BigDecimal not_settled = new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)); - res.put("not_settled", not_settled); + res.put("not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params))); JSONObject object = new JSONObject(); object.put("client_id", partner.getIntValue("client_id")); PageList logs = transactionMapper.listSettlementLog(object, new PageBounds(1, 1, Order.formString("clearing_time.desc"))); - BigDecimal latest_settle = logs.isEmpty()?BigDecimal.ZERO:logs.get(0).getBigDecimal("income"); - res.put("latest_settle",latest_settle); + res.put("latest_settle",logs.isEmpty()?BigDecimal.ZERO:logs.get(0).getBigDecimal("income")); res.put("trade_amount_rise",yes.getBigDecimal("trade_amount").compareTo(BigDecimal.ZERO)>0 ? (today.getBigDecimal("trade_amount").subtract(yes.getBigDecimal("trade_amount"))).divide(yes.getBigDecimal("trade_amount"),4):BigDecimal.ZERO); res.put("trade_count_rise", yes.getIntValue("trade_count") > 0 ? (today.getIntValue("trade_count")-yes.getIntValue("trade_count"))/yes.getIntValue("trade_count") : 0); res.put("new_customers_rise", yes.getIntValue("new_customers") > 0 ? (today.getIntValue("new_customers")-yes.getIntValue("new_customers"))/yes.getIntValue("new_customers") : 0); - res.put("not_settled_rise",not_settled.compareTo(BigDecimal.ZERO)>0 ? (not_settled.subtract(latest_settle)).divide(latest_settle,4):BigDecimal.ZERO); res.put("yes",yes); return res; } diff --git a/src/main/ui/static/dashboard/partner-dashboard.js b/src/main/ui/static/dashboard/partner-dashboard.js index 469c75db6..7a2aed827 100644 --- a/src/main/ui/static/dashboard/partner-dashboard.js +++ b/src/main/ui/static/dashboard/partner-dashboard.js @@ -1082,7 +1082,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct $scope.loadSettlementLogs = function (page) { var params = angular.copy($scope.params); params.page = page || $scope.pagination.page || 1; - params.limit = 8; + params.limit = 10; $http.get('/dashboard/partner/' + $scope.clientMoniker + '/settlement_logs', {params: params}).then(function (resp) { $scope.settlementLogs = resp.data.data; $scope.pagination = resp.data.pagination; @@ -1284,7 +1284,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct }]); app.filter('abs', function () { return function (value) { - return Math.abs(value); + return Math.abs(value*100); } }); return app; diff --git a/src/main/ui/static/dashboard/templates/partner_dashboard.html b/src/main/ui/static/dashboard/templates/partner_dashboard.html index 811238c8a..91da75b2e 100644 --- a/src/main/ui/static/dashboard/templates/partner_dashboard.html +++ b/src/main/ui/static/dashboard/templates/partner_dashboard.html @@ -215,7 +215,7 @@

Yesterday: {{transcommon.yes.trade_count}} - {{transcommon.trade_count_rise|number:2|abs}}%

+ {{transcommon.trade_count_rise|abs}}%

@@ -235,15 +235,13 @@
- 20544 + + {{transcommon.not_settled|currency:'AUD '}} + + UNSETTLED
-

Latest: {{transcommon.latest_settle|currency:'AUD '}} - - - {{transcommon.not_settled_rise|number:2|abs}}% - - +

Latest settlement: {{transcommon.latest_settle|currency:'AUD '}}

@@ -321,7 +319,12 @@
-

Settlement Logs

+

+ Settlement Logs + + more +

+ +
@@ -350,22 +353,6 @@
-