商户管理增加merchangt pay gst开关选项,fix bug

master
yuan 7 years ago
parent ceafd8b858
commit 1c8cb8714e

@ -199,6 +199,8 @@ public interface ClientManager {
void setClientTaxInSurcharge(String clientMoniker, boolean taxInSurcharge);
void setClientCustomerTaxFree(String clientMoniker, boolean customerTaxFree);
List<JSONObject> listClientsForSettlement();
List<JSONObject> listClientsDetailsForSettlement();

@ -2324,6 +2324,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(clientId);
}
@Override
public void setClientCustomerTaxFree(String clientMoniker, boolean customerTaxFree) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
update.put("customer_tax_free", customerTaxFree);
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
}
@Override
public List<JSONObject> listClientsForSettlement() {
return clientMapper.listClientsForSettlement();

@ -198,6 +198,11 @@ public class PartnerManageController {
clientManager.setClientTaxInSurcharge(clientMoniker, config.getBooleanValue("tax_in_surcharge"));
}
@ManagerMapping(value = "/{clientMoniker}/customer_tax_free", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void setClientCustomerTaxFree(@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setClientCustomerTaxFree(clientMoniker, config.getBooleanValue("customer_tax_free"));
}
@ManagerMapping(value = "/{clientMoniker}/credential_code", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void updateCredentialCode(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.refreshClientCredentialCode(manager, clientMoniker);

@ -374,8 +374,9 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
return function (channel) {
switch (channel) {
case 'Alipay':
case 'AlipayOnline':
return '/static/images/alipay_sign_lg.png';
case 'AlipayOnline':
return '/static/images/alipay_online.png';
case 'System':
return '/static/images/royalpay_sign.png';
case 'Bestpay':

@ -30,7 +30,7 @@
</li>
<li ng-class="{active:ctrl.channel=='AlipayOnline'}" ng-if="report.channels.AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline'" title="AlipayOnline">
<img src="/static/images/alipay_sign_lg.png" class="channel-icon-lg">
<img src="/static/images/alipay_online.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Bestpay'}" ng-if="report.channels.Bestpay">

@ -1,7 +1,7 @@
/**
* Created by davep on 2016-08-15.
*/
define(['../app'], function (app) {
define(['../app','decimal'], function (app,Decimal) {
'use strict';
app.factory('clearingDetailService', ['$uibModal', function ($uibModal) {
function openDetail(url, is_partner) {
@ -28,14 +28,16 @@ define(['../app'], function (app) {
app.controller('clearingDetailCtrl', ['$scope', 'detail', 'is_partner', function ($scope, detail, is_partner) {
$scope.ctrl = {channel: null};
$scope.report = detail.data;
$scope.report.total_charge = Decimal.add($scope.report.total_charge,$scope.report.tax_amount).toFixed(2);
$scope.is_partner = is_partner;
}]);
app.filter('channel_image', function () {
return function (channel) {
switch (channel) {
case 'Alipay':
case 'AlipayOnline':
return '/static/images/alipay_sign_lg.png';
case 'AlipayOnline':
return '/static/images/alipay_online.png';
case 'System':
return '/static/images/royalpay_sign.png';
case 'Bestpay':

@ -317,8 +317,9 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) {
return function (channel) {
switch (channel) {
case 'Alipay':
case 'AlipayOnline':
return '/static/images/alipay_sign_lg.png';
case 'AlipayOnline':
return '/static/images/alipay_online.png';
case 'System':
return '/static/images/royalpay_sign.png';
case 'Bestpay':

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -1359,6 +1359,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
$scope.customerTaxFree = function (customerTaxFree) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_tax_free', {customer_tax_free: customerTaxFree}).then(function (resp) {
})
};
$scope.settleHours = [{value: undefined, label: 'Default(24:00, GMT+10)'}];
for (var h = 24; h > 0; h--) {
$scope.settleHours.push({value: h, label: ('00' + h).substr(-2) + ':00, ' + $scope.partner.timezone});
@ -2485,6 +2490,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
app.controller('managerClearingDetailCtrl', ['$scope', 'detail', function ($scope, detail) {
$scope.ctrl = {channel: null};
$scope.report = detail.data;
$scope.report.total_charge = Decimal.add($scope.report.total_charge,$scope.report.tax_amount).toFixed(2);
}]);
app.controller('productCtrl', ['$scope', '$http', '$uibModal', 'commonDialog', '$state', 'Upload', 'industryMap', function ($scope, $http, $uibModal, commonDialog, $state, Upload, industryMap) {

@ -20,6 +20,13 @@
switch-change="taxInSurcharge(partner.tax_in_surcharge)">
</div>
</div>
<div class="form-group" ng-if="('10'|withRole)">
<label class="col-sm-4">Merchant Pay GST &ensp;<small><em>(消费者承担手续费时生效)</em></small></label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.customer_tax_free" bs-switch
switch-change="customerTaxFree(partner.customer_tax_free)">
</div>
</div>
<div class="form-group" ng-if="'modify_skip_clear'|withFunc">
<label class="col-sm-4">Skip Clearing</label>
<div class="col-sm-6">

@ -22,7 +22,7 @@
</li>
<li ng-class="{active:ctrl.channel=='AlipayOnline'}" ng-if="report.channels.AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline'" title="AlipayOnline">
<img src="/static/images/alipay_sign_lg.png" class="channel-icon-lg">
<img src="/static/images/alipay_online.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Bestpay'}" ng-if="report.channels.Bestpay">

Loading…
Cancel
Save