|
|
|
@ -1484,6 +1484,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', function ($scope, $rootScope, $http, $uibModal, commonDialog) {
|
|
|
|
|
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};
|
|
|
|
|
$scope.init = {skip_clearing:false,tax_in_surcharge:false,customer_tax_free:false};
|
|
|
|
|
$scope.getBankAccount = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bank_account').then(function (resp) {
|
|
|
|
|
$scope.bankaccount = resp.data;
|
|
|
|
@ -1501,17 +1502,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.skipClearing = function (skipClearing) {
|
|
|
|
|
if (!$scope.init.skip_clearing) {
|
|
|
|
|
$scope.init.skip_clearing = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) {
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.taxInSurcharge = function (taxInSurcharge) {
|
|
|
|
|
if (!$scope.init.tax_in_surcharge) {
|
|
|
|
|
$scope.init.tax_in_surcharge = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/tax_in_surcharge', {tax_in_surcharge: taxInSurcharge}).then(function (resp) {
|
|
|
|
|
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.customerTaxFree = function (customerTaxFree) {
|
|
|
|
|
if (!$scope.init.customer_tax_free) {
|
|
|
|
|
$scope.init.customer_tax_free = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_tax_free', {customer_tax_free: customerTaxFree}).then(function (resp) {
|
|
|
|
|
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.settleHours = [{value: undefined, label: 'Default(24:00, GMT+10)'}];
|
|
|
|
|