Merge remote-tracking branch 'origin/develop' into develop

master
eason 7 years ago
commit a9be0b6811

@ -23,7 +23,12 @@ import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Created by yuan on 2018/6/5.
@ -68,13 +73,21 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
JSONObject params = queryBean.toParams();
orgManager.checkOrgIds(manager,params);
PageList<JSONObject> clientAmount = null;
List<JSONObject> clientAmountLastCycle = null;
if(params.containsKey("begin") && params.containsKey("end")){
if (params.getDate("end").after(new Date()) && params.getDate("begin").compareTo(DateUtils.addDays(params.getDate("end"), -1))==0){
clientAmount = transactionAnalysisMapper.getAreaMerchantAmountAnalysis(params,new PageBounds());
clientAmountLastCycle = transactionAnalysisMapper.getAreaMerchantAmountByCycle(params);
}else {
clientAmount = customerAndOrdersStatisticsMapper.getAreaMerchantTradeAnalysis(params,new PageBounds());
clientAmountLastCycle = customerAndOrdersStatisticsMapper.getAreaMerchantTradeByLastCycle(params);
}
}
Map<String, JSONObject> cycleMap = clientAmountLastCycle.stream().collect(
Collectors.toMap(cylce -> cylce.getString("client_moniker"), cylce -> cylce));
List<JSONObject> allAmount = clientAmount.stream().map(amount -> {return toAmount(cycleMap.get(amount.getString("client_moniker")), amount);}).collect(Collectors.toList());
HSSFWorkbook workbook = new HSSFWorkbook();
// 声明一个工作薄
// 生成一个表格
@ -111,6 +124,33 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
font2.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL);
// 把字体应用到当前的样式
style2.setFont(font2);
HSSFCellStyle style3 = workbook.createCellStyle();
style3.setFillForegroundColor(HSSFColor.WHITE.index);
style3.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
style3.setBorderBottom(HSSFCellStyle.BORDER_THIN);
style3.setBorderLeft(HSSFCellStyle.BORDER_THIN);
style3.setBorderRight(HSSFCellStyle.BORDER_THIN);
style3.setBorderTop(HSSFCellStyle.BORDER_THIN);
style3.setAlignment(HSSFCellStyle.ALIGN_CENTER);
HSSFFont font3 = workbook.createFont();
font3.setFontHeightInPoints((short) 12);
font3.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL);
font3.setColor(HSSFColor.RED.index);
style3.setFont(font3);
HSSFCellStyle style4 = workbook.createCellStyle();
style4.setFillForegroundColor(HSSFColor.WHITE.index);
style4.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
style4.setBorderBottom(HSSFCellStyle.BORDER_THIN);
style4.setBorderLeft(HSSFCellStyle.BORDER_THIN);
style4.setBorderRight(HSSFCellStyle.BORDER_THIN);
style4.setBorderTop(HSSFCellStyle.BORDER_THIN);
style4.setAlignment(HSSFCellStyle.ALIGN_CENTER);
HSSFFont font4 = workbook.createFont();
font4.setFontHeightInPoints((short) 12);
font4.setBoldweight(HSSFFont.BOLDWEIGHT_NORMAL);
font4.setColor(HSSFColor.GREEN.index);
style4.setFont(font4);
HSSFRow row0 = sheet.createRow(0);
HSSFCell cell00 = row0.createCell(0);
HSSFCell cell01 = row0.createCell(1);
@ -124,6 +164,9 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
HSSFCell cell09 = row0.createCell(9);
HSSFCell cell10 = row0.createCell(10);
HSSFCell cell11 = row0.createCell(11);
HSSFCell cell12 = row0.createCell(12);
HSSFCell cell13 = row0.createCell(13);
HSSFCell cell14 = row0.createCell(14);
cell00.setCellStyle(style);
cell01.setCellStyle(style);
cell02.setCellStyle(style);
@ -136,6 +179,9 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
cell09.setCellStyle(style);
cell10.setCellStyle(style);
cell11.setCellStyle(style);
cell12.setCellStyle(style);
cell13.setCellStyle(style);
cell14.setCellStyle(style);
HSSFRichTextString text00 = new HSSFRichTextString("Partner Code");
HSSFRichTextString text01 = new HSSFRichTextString("Short name");
@ -144,11 +190,14 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
HSSFRichTextString text04 = new HSSFRichTextString("Suburb");
HSSFRichTextString text05 = new HSSFRichTextString("Industry");
HSSFRichTextString text06 = new HSSFRichTextString("Amount");
HSSFRichTextString text07 = new HSSFRichTextString("Orders");
HSSFRichTextString text08 = new HSSFRichTextString("Alipay Amount");
HSSFRichTextString text09 = new HSSFRichTextString("Alipay Orders");
HSSFRichTextString text10 = new HSSFRichTextString("Wechat Amount");
HSSFRichTextString text11 = new HSSFRichTextString("Wechat Orders");
HSSFRichTextString text07 = new HSSFRichTextString("Last Cycle");
HSSFRichTextString text08 = new HSSFRichTextString("Orders");
HSSFRichTextString text09 = new HSSFRichTextString("Alipay Amount");
HSSFRichTextString text10 = new HSSFRichTextString("Last Cycle");
HSSFRichTextString text11 = new HSSFRichTextString("Alipay Orders");
HSSFRichTextString text12 = new HSSFRichTextString("Wechat Amount");
HSSFRichTextString text13 = new HSSFRichTextString("Last Cycle");
HSSFRichTextString text14 = new HSSFRichTextString("Wechat Orders");
cell00.setCellValue(text00);
cell01.setCellValue(text01);
cell02.setCellValue(text02);
@ -161,10 +210,13 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
cell09.setCellValue(text09);
cell10.setCellValue(text10);
cell11.setCellValue(text11);
cell12.setCellValue(text12);
cell13.setCellValue(text13);
cell14.setCellValue(text14);
JSONObject sysConfig = sysConfigManager.getSysConfig();
String json = sysConfig.getString("royalpayindustry.json");
JSONArray jsonArray = JSONObject.parseArray(json);
for (int i = 0; i < clientAmount.size(); i++) {
for (int i = 0; i < allAmount.size(); i++) {
HSSFRow row = sheet.createRow(i + 1);
HSSFCell cell0 = row.createCell(0);
HSSFCell cell1 = row.createCell(1);
@ -178,6 +230,9 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
HSSFCell cell9 = row.createCell(9);
HSSFCell cel10 = row.createCell(10);
HSSFCell cel11 = row.createCell(11);
HSSFCell cel12 = row.createCell(12);
HSSFCell cel13 = row.createCell(13);
HSSFCell cel14 = row.createCell(14);
cell0.setCellStyle(style2);
cell1.setCellStyle(style2);
cell2.setCellStyle(style2);
@ -185,24 +240,94 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
cell4.setCellStyle(style2);
cell5.setCellStyle(style2);
cell6.setCellStyle(style2);
cell7.setCellStyle(style2);
cell8.setCellStyle(style2);
cell9.setCellStyle(style2);
cel10.setCellStyle(style2);
cel11.setCellStyle(style2);
String industry = getRoyalpayIindustry(clientAmount.get(i).getString("royalpayindustry"),jsonArray);
HSSFRichTextString text0 = new HSSFRichTextString(clientAmount.get(i).getString("client_moniker"));
HSSFRichTextString text1 = new HSSFRichTextString(clientAmount.get(i).getString("short_name"));
HSSFRichTextString text2 = new HSSFRichTextString(clientAmount.get(i).getString("bd_user_name"));
HSSFRichTextString text3 = new HSSFRichTextString(clientAmount.get(i).getString("state"));
HSSFRichTextString text4 = new HSSFRichTextString(clientAmount.get(i).getString("suburb"));
cel12.setCellStyle(style2);
cel14.setCellStyle(style2);
JSONObject thisAmount =clientAmount.get(i);
NumberFormat percent = NumberFormat.getPercentInstance();
BigDecimal lastTotal = new BigDecimal(1);
BigDecimal alipayTotal = new BigDecimal(1);
BigDecimal wechatToatl = new BigDecimal(1);
if(thisAmount.containsKey("old_total")){
if(thisAmount.getBigDecimal("total").compareTo(BigDecimal.ZERO)==0){
lastTotal = new BigDecimal(-1);
if(thisAmount.getBigDecimal("old_total").compareTo(BigDecimal.ZERO) == 0){
lastTotal = BigDecimal.ZERO;
}
}
if(thisAmount.getBigDecimal("total").compareTo(BigDecimal.ZERO)>0 && thisAmount.getBigDecimal("old_total").compareTo(BigDecimal.ZERO)>0) {
lastTotal = (thisAmount.getBigDecimal("total").subtract(thisAmount.getBigDecimal("old_total"))).divide(thisAmount.getBigDecimal("old_total"), 4, BigDecimal.ROUND_HALF_UP);
}
}else {
if(thisAmount.getBigDecimal("total").compareTo(BigDecimal.ZERO) == 0){
lastTotal = BigDecimal.ZERO;
}
}
if(thisAmount.containsKey("old_alipay_total")){
if(thisAmount.getBigDecimal("alipay_total").compareTo(BigDecimal.ZERO)==0){
alipayTotal = new BigDecimal(-1);
if(thisAmount.getBigDecimal("old_alipay_total").compareTo(BigDecimal.ZERO) == 0){
alipayTotal = BigDecimal.ZERO;
}
}
if(thisAmount.getBigDecimal("alipay_total").compareTo(BigDecimal.ZERO)>0 && thisAmount.getBigDecimal("old_alipay_total").compareTo(BigDecimal.ZERO)>0){
alipayTotal = (thisAmount.getBigDecimal("alipay_total").subtract(thisAmount.getBigDecimal("old_alipay_total"))).divide(thisAmount.getBigDecimal("old_alipay_total"),4,BigDecimal.ROUND_HALF_UP);
}
}else {
if(thisAmount.getBigDecimal("alipay_total").compareTo(BigDecimal.ZERO) == 0){
alipayTotal = BigDecimal.ZERO;
}
}
if(thisAmount.containsKey("old_wechat_toatl")){
if(thisAmount.getBigDecimal("wechat_toatl").compareTo(BigDecimal.ZERO)==0){
wechatToatl = new BigDecimal(-1);
if(thisAmount.getBigDecimal("old_wechat_toatl").compareTo(BigDecimal.ZERO) == 0){
wechatToatl = BigDecimal.ZERO;
}
}
if(thisAmount.getBigDecimal("wechat_toatl").compareTo(BigDecimal.ZERO)>0 && thisAmount.getBigDecimal("old_wechat_toatl").compareTo(BigDecimal.ZERO)>0){
wechatToatl = (thisAmount.getBigDecimal("wechat_toatl").subtract(thisAmount.getBigDecimal("old_wechat_toatl"))).divide(thisAmount.getBigDecimal("old_wechat_toatl"),4,BigDecimal.ROUND_HALF_UP);
}
}else {
if(thisAmount.getBigDecimal("wechat_toatl").compareTo(BigDecimal.ZERO) == 0){
wechatToatl = BigDecimal.ZERO;
}
}
if(lastTotal.compareTo(BigDecimal.ZERO)>=0){
cell7.setCellStyle(style4);
}else {
cell7.setCellStyle(style3);
}
if(alipayTotal.compareTo(BigDecimal.ZERO)>=0){
cel10.setCellStyle(style4);
}else {
cel10.setCellStyle(style3);
}
if(wechatToatl.compareTo(BigDecimal.ZERO)>=0){
cel13.setCellStyle(style4);
}else {
cel13.setCellStyle(style3);
}
String industry = getRoyalpayIindustry(thisAmount.getString("royalpayindustry"),jsonArray);
HSSFRichTextString text0 = new HSSFRichTextString(thisAmount.getString("client_moniker"));
HSSFRichTextString text1 = new HSSFRichTextString(thisAmount.getString("short_name"));
HSSFRichTextString text2 = new HSSFRichTextString(thisAmount.getString("bd_user_name"));
HSSFRichTextString text3 = new HSSFRichTextString(thisAmount.getString("state"));
HSSFRichTextString text4 = new HSSFRichTextString(thisAmount.getString("suburb"));
HSSFRichTextString text5 = new HSSFRichTextString(industry == null?"":industry);
HSSFRichTextString text6 = new HSSFRichTextString(clientAmount.get(i).getString("total"));
HSSFRichTextString text7 = new HSSFRichTextString(clientAmount.get(i).getString("orders"));
HSSFRichTextString text8 = new HSSFRichTextString(clientAmount.get(i).getString("alipay_total"));
HSSFRichTextString text9 = new HSSFRichTextString(clientAmount.get(i).getString("alipay_order"));
HSSFRichTextString text_10 = new HSSFRichTextString(clientAmount.get(i).getString("wechat_toatl"));
HSSFRichTextString text_11 = new HSSFRichTextString(clientAmount.get(i).getString("wechat_order"));
HSSFRichTextString text6 = new HSSFRichTextString(thisAmount.getString("total"));
HSSFRichTextString text7 = new HSSFRichTextString(percent.format(lastTotal.doubleValue()));
HSSFRichTextString text8 = new HSSFRichTextString(thisAmount.getString("orders"));
HSSFRichTextString text9 = new HSSFRichTextString(thisAmount.getString("alipay_total"));
HSSFRichTextString text_10 = new HSSFRichTextString(percent.format(alipayTotal.doubleValue()));
HSSFRichTextString text_11 = new HSSFRichTextString(thisAmount.getString("alipay_order"));
HSSFRichTextString text_12 = new HSSFRichTextString(thisAmount.getString("wechat_toatl"));
HSSFRichTextString text_13 = new HSSFRichTextString(percent.format(wechatToatl.doubleValue()));
HSSFRichTextString text_14 = new HSSFRichTextString(thisAmount.getString("wechat_order"));
cell0.setCellValue(text0);
cell1.setCellValue(text1);
cell2.setCellValue(text2);
@ -215,6 +340,9 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
cell9.setCellValue(text9);
cel10.setCellValue(text_10);
cel11.setCellValue(text_11);
cel12.setCellValue(text_12);
cel13.setCellValue(text_13);
cel14.setCellValue(text_14);
}
JSONObject parmerters = new JSONObject();
parmerters.put("dateFrom", StringUtils.isNotBlank(queryBean.getBegin()) ? queryBean.getBegin() : "");
@ -232,7 +360,12 @@ public class AreaMerchantTradeAnalysisImpl implements AreaMerchantTradeAnalysis{
e.printStackTrace();
}
}
private JSONObject toAmount(JSONObject cycle, JSONObject amount) {
if(amount != null && cycle!= null){
amount.putAll(cycle);
}
return amount;
}
private String getRoyalpayIindustry(String industryMccCode,JSONArray jsonArray) {
String industry = null;
for(int i = 0;i<jsonArray.size();i++){

@ -53,4 +53,6 @@ public interface CustomerAndOrdersStatisticsMapper {
PageList<JSONObject> getAreaMerchantTradeAnalysis(JSONObject params, PageBounds pageBounds);
List<JSONObject> countTradedClientsByDate(JSONObject parasm);
List<JSONObject> getAreaMerchantTradeByLastCycle(JSONObject parasm);
}

@ -74,4 +74,6 @@ public interface TransactionAnalysisMapper {
JSONObject getClientTransaction(JSONObject params);
PageList<JSONObject> getAreaMerchantAmountAnalysis(JSONObject params,PageBounds pagination);
List<JSONObject> getAreaMerchantAmountByCycle(JSONObject params);
}

@ -358,10 +358,15 @@
<select id="getAreaMerchantTradeAnalysis" resultType="com.alibaba.fastjson.JSONObject">
SELECT sum(s.total) total,sum(s.orders) orders,c.client_moniker,c.short_name,c.bd_user_name,c.suburb,c.state,c.royalpayindustry,sum(if(s.channel='Alipay',s.total,0)) alipay_total,
sum(if(s.channel='Alipay'OR s.channel='AlipayOnline',s.orders,0)) alipay_order,sum(if(s.channel='Wechat',s.total,0)) wechat_toatl,sum(if(s.channel='Wechat',s.orders,0)) wechat_order
<![CDATA[
SELECT ifnull(sum(s.total),0) total,ifnull(sum(s.orders),0) orders,c.client_moniker,c.short_name,c.bd_user_name,c.suburb,c.state,c.royalpayindustry,
ifnull(sum(if(s.channel='Alipay'OR s.channel='AlipayOnline',s.total,0)),0) alipay_total,
ifnull(sum(if(s.channel='Alipay'OR s.channel='AlipayOnline',s.orders,0)),0) alipay_order,
ifnull(sum(if(s.channel='Wechat',s.total,0)),0) wechat_toatl,
ifnull(sum(if(s.channel='Wechat',s.orders,0)),0) wechat_order
FROM statistics_customer_order s
RIGHT JOIN sys_clients c ON c.client_id = s.client_id and c.is_valid=1
]]>
<if test="bd_user!=null">
INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= #{begin} and (d.end_date is null or date(d.end_date)&gt;= #{end}) and
@ -386,6 +391,39 @@
</select>
<select id="getAreaMerchantTradeByLastCycle" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT c.client_moniker,
ifnull(sum(s.total),0) old_total,
ifnull(sum(if(s.channel='Alipay'OR s.channel='AlipayOnline',s.total,0)),0) old_alipay_total,
ifnull(sum(if(s.channel='Wechat',s.total,0)),0) old_wechat_toatl
FROM statistics_customer_order s
RIGHT JOIN sys_clients c ON c.client_id = s.client_id and c.is_valid=1
]]>
<if test="bd_user!=null">
INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= #{begin} and (d.end_date is null or date(d.end_date)&gt;= #{end}) and
d.is_valid=1
</if>
<where>
<if test="begin!=null">and s.date &gt;= DATE_ADD(#{begin},INTERVAL -datediff( #{end},#{begin}) DAY)</if>
<if test="end!=null">and s.date &lt; #{begin}</if>
<if test="org_id!=null">and c.org_id = #{org_id}</if>
<if test="state!=null">and c.state = #{state}</if>
<if test="org_id!=null and org_ids==null">and c.org_id=#{org_id}</if>
<if test="org_ids!=null">and c.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
<if test="client_monikers!=null">
AND c.client_moniker IN
<foreach collection="client_monikers" open="(" close=")" separator="," item="client_moniker">
#{client_moniker}
</foreach>
</if>
</where>
GROUP BY s.client_id ORDER BY old_total DESC
</select>
<select id="countTradedClientsByDate" resultType="com.alibaba.fastjson.JSONObject">
SELECT date_format(s.date,'%d-%m-%Y') datelist,COUNT(DISTINCT s.client_id) num
FROM statistics_customer_order s

@ -798,8 +798,8 @@
<select id="getAreaMerchantAmountAnalysis" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.client_moniker,c.short_name,c.bd_user_name,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) total,
COUNT(DISTINCT t.order_id) orders,
c.suburb,c.state,c.royalpayindustry,sum(if(t.channel='Alipay',t.clearing_amount,0)) alipay_total,
sum(if(t.channel='Alipay'AND t.channel='AlipayOnline',1,0)) alipay_order,sum(if(t.channel='Wechat',t.clearing_amount,0)) wechat_toatl,
c.suburb,c.state,c.royalpayindustry,sum(if(t.channel='Alipay' OR t.channel='AlipayOnline',t.clearing_amount,0)) alipay_total,
sum(if(t.channel='Alipay'OR t.channel='AlipayOnline',1,0)) alipay_order,sum(if(t.channel='Wechat',t.clearing_amount,0)) wechat_toatl,
sum(if(t.channel='Wechat',1,0)) wechat_order
FROM pmt_transactions t
INNER JOIN pmt_orders ord on ord.order_id = t.order_id
@ -824,4 +824,33 @@
</if>
GROUP BY c.client_id order by total desc
</select>
<select id="getAreaMerchantAmountByCycle" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.client_moniker,sum(if(t.transaction_type='Credit',t.clearing_amount,0)) old_total,
sum(if(t.channel='Alipay'OR t.channel='AlipayOnline',t.clearing_amount,0)) old_alipay_total,
sum(if(t.channel='Wechat',t.clearing_amount,0)) old_wechat_toatl
FROM pmt_transactions t
INNER JOIN pmt_orders ord on ord.order_id = t.order_id
RIGHT JOIN sys_clients c on t.client_id = c.client_id and c.is_valid = 1
<if test="bd_user!=null">
INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= DATE_ADD(#{begin},INTERVAL -datediff( #{end},#{begin}) DAY) and (d.end_date is null or date(d.end_date)&gt;= #{begin}) and
d.is_valid=1
</if>
where (t.transaction_type = 'Credit')
<if test="begin!=null">and t.transaction_time &gt;= DATE_ADD(#{begin},INTERVAL -datediff( #{end},#{begin}) DAY)</if>
<if test="end!=null">and t.transaction_time &lt;= #{begin}</if>
<if test="state!=null">and c.state &lt;= #{state}</if>
<if test="org_id!=null and org_ids==null">and c.org_id=#{org_id}</if>
<if test="org_ids!=null">and c.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
<if test="client_monikers!=null">
AND c.client_moniker IN
<foreach collection="client_monikers" open="(" close=")" separator="," item="client_moniker">
#{client_moniker}
</foreach>
</if>
GROUP BY c.client_id order by old_total desc
</select>
</mapper>

@ -15,7 +15,7 @@
<maxFileSize>200MB</maxFileSize>
</rollingPolicy>
<encoder>
<Pattern>${FILE_LOG_PATTERN}</Pattern>
<Pattern>[ Server--${ROYALOS_NODE_IP} ] ${FILE_LOG_PATTERN}</Pattern>
<charset>UTF-8</charset>
</encoder>
</appender>

@ -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)'}];

@ -32,11 +32,6 @@
height: 100px;
margin-left: 20px;
}
.star_position{
position: absolute;
right: 0px;
top: -1px;
}
</style>
<section class="content-header">
<h1>
@ -520,12 +515,7 @@
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">E-mail
<span ng-if="('10'|withRole)">
<i style="cursor: pointer" ng-click="addSub()" ng-if="!partner.unsubscribe" class="fa fa-star text-yellow star_position"></i>
<i style="cursor: pointer" ng-click="removeSub()" ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow star_position"></i>
</span>
</label>
<label class="control-label col-sm-4">E-mail</label>
<div class="col-sm-8">
<p class="form-control-static">
@ -534,6 +524,10 @@
ng-click="resendApproveEmail()">
<i class="fa fa-envelope"></i> Resend Email
</a>
<span ng-if="('10'|withRole)">
<i style="cursor: pointer" ng-click="addSub()" ng-if="!partner.unsubscribe" class="fa fa-star text-yellow"></i>
<i style="cursor: pointer" ng-click="removeSub()" ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow"></i>
</span>
</p>
</div>
</div>

Loading…
Cancel
Save