master
yuan 7 years ago
parent 8fc003f87e
commit f44036b04c

@ -703,10 +703,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
BigDecimal net_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("settle_amount")).map(t-> t.getBigDecimal("settle_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal tax_amount_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal tax_amount_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("tax_amount")).map(t-> t.getBigDecimal("tax_amount")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal wechat_charge_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("wechat_charge")).map(t-> t.getBigDecimal("wechat_charge")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal wechat_charge_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("wechat_charge")).map(t-> t.getBigDecimal("wechat_charge")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal royalpay_charge_credit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Credit")).filter(t->t.containsKey("royal_surcharge")).map(t-> t.getBigDecimal("royal_surcharge")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal royalpay_charge_debit = transactionsOfDay.stream().filter(t->t.getString("transaction_type").equals("Debit")).filter(t->t.containsKey("royal_surcharge")).map(t-> t.getBigDecimal("royal_surcharge")).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal tax_amount = tax_amount_credit.subtract(tax_amount_debit);
analysis.put("total_credit",total_credit.setScale(2,BigDecimal.ROUND_HALF_UP));
@ -715,8 +711,6 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
analysis.put("tax_amount",tax_amount.setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("total_charge",total_charge_credit.subtract(total_charge_debit).add(tax_amount).setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("gross_amount",total_credit.subtract(total_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("wechat_charge",wechat_charge_credit.subtract(wechat_charge_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
analysis.put("royalpay_charge",royalpay_charge_credit.subtract(royalpay_charge_debit).setScale(2,BigDecimal.ROUND_HALF_UP));
dayAnalysisMap.put(entry.getKey(),analysis);
}
return dayAnalysisMap;

@ -211,14 +211,14 @@
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="analysis.total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<!-- <div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span class="col-xs-6" ng-bind="analysis.wechat_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="analysis.royalpay_charge|currency:''"></span>
</div>
</div>-->
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6" ng-bind="analysis.net_amount|currency:''"></span>

@ -79,6 +79,10 @@ define(['angular','decimal'], function (angular,decimal) {
alert("请选择结束时间");
return;
}
/* if(getTime2Time()>30){
alert("开始时间与结束时间不得超过三十天");
return;
}*/
params.page = page || $scope.pagination.page || 1;
$http.get('/partner/invoice/trans_flow', {params: params}).then(function (resp) {
$scope.tradeLogs = resp.data.data;
@ -95,6 +99,14 @@ define(['angular','decimal'], function (angular,decimal) {
commonDialog.alert({title: 'Search failed', content: resp.data.message, type: 'error'});
});
};
/* var getTime2Time = function () {
var time = angular.copy($scope.params);
var from = time.datefrom = $filter('date')(time.datefrom, 'yyyy-MM-dd');
var to = time.dateto = $filter('date')(time.dateto, 'yyyy-MM-dd');
var longTime = new Date(to).getTime() - new Date(from).getTime() ;
var day = Math.floor(longTime/(24*60*60*1000));
return day;
};*/
$scope.export = function (type,page) {
var url='/partner/invoice/trans_flow/pdf';

Loading…
Cancel
Save