Merge branch 'develop'

master
taylor.dang 6 years ago
commit 4050e36b3f

@ -16,12 +16,15 @@ public interface ClearingDistributedSurchargeMapper {
List<JSONObject> findTransactions(@Param("client_id") int clientId);
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject transaction);
@AutoSql(type = SqlType.INSERT)
void save(JSONObject transactions);
List<JSONObject> getMonthDetailByClientId(@Param("datefrom") Date datefrom, @Param("dateto") Date dateto);
List<JSONObject> findTransactionsByDate(JSONObject params);
List<JSONObject> findSurchargeTransactionsByDetailId(@Param("client_id") int clientId, @Param("detailId") String detailId);
List<JSONObject> listUnClearedByMonth(@Param("dateto") DateTime dateTo);
}

@ -3,33 +3,23 @@ package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRateConfig;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.beans.SubMerchantIdApply;
import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* Created by yixian on 2016-06-25.
*/
@ -287,7 +277,7 @@ public interface ClientManager {
List<JSONObject> getAccountDetailByMonths(JSONObject account,String clientMoniker);
List<JSONObject> getAccountTransactionsByDate(JSONObject account,String clientMoniker, String date);
List<JSONObject> getAccountTransactionsByDetailId(JSONObject account,String clientMoniker, String detailId);
List<JSONObject> getAccountMonthDetails(JSONObject account,String clientMoniker);

@ -3495,24 +3495,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public List<JSONObject> getAccountTransactionsByDate(JSONObject account, String clientMoniker, String date) {
public List<JSONObject> getAccountTransactionsByDetailId(JSONObject account, String clientMoniker, String detailId) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject params = new JSONObject();
params.put("client_id", client.getIntValue("client_id"));
params.put("year", date.substring(0, 4));
params.put("month", date.substring(date.length() - 2, date.length()));
List<JSONObject> transactions = clearingDistributedSurchargeMapper.findTransactionsByDate(params);
transactions.forEach(e -> {
if ("Credit".equals(e.getString("type"))) {
JSONObject manager = managerMapper.findDetail(e.getString("operation"));
e.put("operator_displayname", manager.getString("display_name"));
}
});
return transactions;
return clearingDistributedSurchargeMapper.findSurchargeTransactionsByDetailId(client.getIntValue("client_id"),detailId);
}
@Override
@ -3521,8 +3509,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> details = financialSurchargeAccountDetailMapper.findDetailsByClientId(client.getIntValue("client_id"));
return details;
return financialSurchargeAccountDetailMapper.findDetailsByClientId(client.getIntValue("client_id"));
}
@Override
@ -3540,19 +3527,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new ServerErrorException("Processing task, wait for a moment");
}
try {
JSONObject surcharge_account = clientsSurchargeAccountsMapper.find(client.getIntValue("client_id"));
JSONObject surchargeAccount = clientsSurchargeAccountsMapper.find(client.getIntValue("client_id"));
transaction.put("client_id", client.getIntValue("client_id"));
transaction.put("type", "Credit");
transaction.put("total_surcharge", BigDecimal.ZERO);
transaction.put("tax_amount", BigDecimal.ZERO);
transaction.put("post_balance", surcharge_account.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
transaction.put("post_balance", surchargeAccount.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
transaction.put("operation", account.getString("manager_id"));
transaction.put("create_time", new Date());
clearingDistributedSurchargeMapper.save(transaction);
surcharge_account.put("balance", surcharge_account.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
clientsSurchargeAccountsMapper.update(surcharge_account);
surchargeAccount.put("balance", surchargeAccount.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
clientsSurchargeAccountsMapper.update(surchargeAccount);
} finally {
locker.unlock(clientMoniker + "_surcharge_account_save");

@ -1,13 +1,7 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRateConfig;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.beans.SubMerchantIdApply;
import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
@ -19,21 +13,14 @@ import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
/**
* Created by yixian on 2016-06-27.
@ -415,9 +402,10 @@ public class PartnerManageController {
public List<JSONObject> accountTransactions(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
return clientManager.getAccountTransactions(manager, clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/account/transactions/date", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public List<JSONObject> accountTransactionsByDate(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker,@RequestParam String date) {
return clientManager.getAccountTransactionsByDate(manager, clientMoniker, date);
public List<JSONObject> accountTransactionsByDate(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker, @RequestParam String detailId) {
return clientManager.getAccountTransactionsByDetailId(manager, clientMoniker, detailId);
}
@ManagerMapping(value = "/{clientMoniker}/account/save", method = RequestMethod.POST, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})

@ -7,7 +7,6 @@ import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
import au.com.royalpay.payment.manage.support.wechatclients.KangaLandWechatApiImpl;
@ -21,31 +20,21 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.permission.wechat.WechatMapping;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
/**
* view for partner client
@ -197,7 +186,7 @@ public class PartnerViewController {
@PartnerMapping(value = "/{clientMoniker}/account/transactions/date", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public List<JSONObject> accountTransactionsByDate(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker,@RequestParam String date) {
return clientManager.getAccountTransactionsByDate(manager, clientMoniker, date);
return clientManager.getAccountTransactionsByDetailId(manager, clientMoniker, date);
}
@PartnerMapping(value = "/{clientMoniker}/account/months", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ -254,7 +243,7 @@ public class PartnerViewController {
return "wechat_bind";
}
@RequestMapping(value = "/account_receive_notice", method = RequestMethod.PUT)
@PutMapping(value = "/account_receive_notice")
@ResponseBody
public JSONObject toggleReceiveNotice(@ModelAttribute(CommonConsts.WECHATINFO) JSONObject user, @RequestBody JSONObject enable) {
if (user == null) {

@ -2,7 +2,6 @@ package au.com.royalpay.payment.manage.surchargeAccount.core;
import com.alibaba.fastjson.JSONObject;
import java.util.Date;
import java.util.List;
public interface SurchargeAccountService {
@ -11,6 +10,6 @@ public interface SurchargeAccountService {
List<JSONObject> listSettledDatesInMonth(String mon);
void fillMothsSurcharge(JSONObject manager, String detail_id);
void fillMothsSurcharge(JSONObject manager, String detailId);
}

@ -11,8 +11,6 @@ import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -21,7 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
@ -39,12 +36,11 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
private Locker locker;
@Resource
private ClientsSurchargeAccountsMapper clientsSurchargeAccountsMapper;
Logger logger = LoggerFactory.getLogger(ClientContractServiceImpl.class);
private Logger logger = LoggerFactory.getLogger(ClientContractServiceImpl.class);
@Override
@Transactional
@Transactional(rollbackFor = Exception.class)
public void generatorMonthDetail() {
DateTime dateTo = DateTime.now().withMillisOfDay(0).withDayOfMonth(1);
logger.info("===============Start generator surcharge account month detail==============={}", new Date());
@ -67,6 +63,7 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
detail.put("credit_amount", creditAmount);
detail.put("debit_amount", debitAmount);
detail.put("total_surcharge", creditAmount.add(debitAmount));
JSONObject lastTrans = surchargeTrans.stream().max(Comparator.comparing(trans -> trans.getDate("create_time")))
.orElse(null);
BigDecimal postBalance;
@ -80,8 +77,13 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
detail.put("send_mail", 0);
detail.put("wx_send", 0);
detail.put("create_time", new Date());
detail.put("is_valid", 0);
detail.put("checkout", 0);
financialSurchargeAccountDetailMapper.save(detail);
//更新手续费明细中的账单id
surchargeTrans.forEach(trans -> {
trans.put("bill_id", detail.getString("detail_id"));
clearingDistributedSurchargeMapper.update(trans);
});
}
logger.info("===============generator OVER==============={}", new Date());
}
@ -92,35 +94,36 @@ public class SurchargeAccountServiceImpl implements SurchargeAccountService {
}
@Override
public void fillMothsSurcharge(JSONObject manager, String detail_id) {
public void fillMothsSurcharge(JSONObject manager, String detailId) {
if (!(ManagerRole.ADMIN.hasRole(manager.getIntValue("role")) || ManagerRole.OPERATOR.hasRole(manager.getIntValue("role")) || ManagerRole.FINANCIAL_STAFF.hasRole(manager.getIntValue("role")))) {
throw new ForbiddenException("无法执行平账操作,权限不足");
}
JSONObject detail = financialSurchargeAccountDetailMapper.findByDetailId(detail_id);
if (detail.getBooleanValue("is_valid")) {
JSONObject detail = financialSurchargeAccountDetailMapper.findByDetailId(detailId);
if (detail.getBooleanValue("checkout")) {
throw new BadRequestException("该记录已结清");
}
if (!locker.lock(detail.getIntValue("client_id") + "_" + detail.getString("settle_month") + "_fill", 120_000)) {
throw new ServerErrorException("Processing task, wait for a moment");
}
try {
JSONObject surcharge_account = clientsSurchargeAccountsMapper.find(detail.getIntValue("client_id"));
JSONObject surchargeAccount = clientsSurchargeAccountsMapper.find(detail.getIntValue("client_id"));
JSONObject transaction = new JSONObject();
transaction.put("client_id", detail.getIntValue("client_id"));
transaction.put("type", "Credit");
transaction.put("bill_id", detailId);
transaction.put("total_surcharge", BigDecimal.ZERO);
transaction.put("tax_amount", BigDecimal.ZERO);
transaction.put("amount", detail.getBigDecimal("debit_amount").negate());
transaction.put("post_balance", surcharge_account.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
transaction.put("post_balance", surchargeAccount.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
transaction.put("operation", manager.getString("manager_id"));
transaction.put("create_time", new Date());
transaction.put("remark", detail.getString("settle_month") + "冲正");
clearingDistributedSurchargeMapper.save(transaction);
surcharge_account.put("balance", surcharge_account.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
clientsSurchargeAccountsMapper.update(surcharge_account);
detail.put("is_valid", 1);
detail.put("operator_id", manager.getString("manager_id"));
surchargeAccount.put("balance", surchargeAccount.getBigDecimal("balance").add(transaction.getBigDecimal("amount")));
clientsSurchargeAccountsMapper.update(surchargeAccount);
detail.put("checkout", 1);
detail.put("operator_id", manager.getString("display_name"));
financialSurchargeAccountDetailMapper.update(detail);
} finally {
locker.unlock(detail.getIntValue("client_id") + "_" + detail.getString("settle_month") + "_fill");

@ -3,16 +3,11 @@ package au.com.royalpay.payment.manage.surchargeAccount.web;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.surchargeAccount.core.SurchargeAccountService;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@RequestMapping("/sys/surcharge_account")
@ -27,8 +22,8 @@ public class SurchargeAccountController {
return surchargeAccountService.listSettledDatesInMonth(month);
}
@ManagerMapping(value = "/fill/{detail_id}", role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF}, method = RequestMethod.PUT)
public void fillMothsSurcharge(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String detail_id) {
surchargeAccountService.fillMothsSurcharge(manager, detail_id);
@ManagerMapping(value = "/fill/{detailId}", role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF}, method = RequestMethod.PUT)
public void fillMothsSurcharge(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String detailId) {
surchargeAccountService.fillMothsSurcharge(manager, detailId);
}
}

@ -1183,7 +1183,7 @@ public class TradeLogServiceImpl implements TradeLogService {
String preRefundDataStr = stringRedisTemplate.boundValueOps("payment:pre_refund_data").get();
if (StringUtils.isEmpty(preRefundDataStr)) {
JSONObject preRefundData = PageListUtils.buildPageListResult(transactionMapper.listPreRefundClients(new PageBounds(params.getPage(), params.getLimit())));
stringRedisTemplate.boundValueOps("payment:pre_refund_data").set(preRefundData.toJSONString(), 6, TimeUnit.HOURS);
stringRedisTemplate.boundValueOps("payment:pre_refund_data").set(preRefundData.toJSONString(), 1, TimeUnit.HOURS);
return preRefundData;
} else {
return JSONObject.parseObject(preRefundDataStr);

@ -2,48 +2,40 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ClearingDistributedSurchargeMapper">
<select id="getMonthDetailByClientId" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT d.client_id,
c.client_moniker,
c.company_name,
SUM(IF(d.type = 'Debit', total_surcharge, -total_surcharge)) total_surcharge,
SUM(IF(d.type = 'Credit', amount, 0)) credit_amount,
SUM(IF(d.type = 'Debit', amount, 0)) debit_amount,
SUM(IF(d.type = 'Debit', total_surcharge, 0)) total_surcharge
FROM log_clearing_distributed_surcharge d
INNER JOIN sys_clients c ON c.client_id = d.client_id
WHERE d.create_time >= #{datefrom}
AND d.create_time < #{dateto}
AND c.is_valid = 1
GROUP BY d.client_id
]]>
SELECT d.client_id,
c.client_moniker,
c.company_name,
SUM(IF(d.type = 'Debit', total_surcharge, -total_surcharge)) total_surcharge,
SUM(IF(d.type = 'Credit', amount, 0)) credit_amount,
SUM(IF(d.type = 'Debit', amount, 0)) debit_amount,
SUM(IF(d.type = 'Debit', total_surcharge, 0)) total_surcharge
FROM log_clearing_distributed_surcharge d
INNER JOIN sys_clients c ON c.client_id = d.client_id
WHERE d.create_time >= #{datefrom}
AND #{dateto} > d.create_time
AND c.is_valid = 1
GROUP BY d.client_id
</select>
<select id="findTransactions" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT *
FROM log_clearing_distributed_surcharge
WHERE client_id = #{client_id}
ORDER BY create_time DESC
]]>
SELECT *
FROM log_clearing_distributed_surcharge
WHERE client_id = #{client_id}
ORDER BY create_time DESC
</select>
<select id="findTransactionsByDate" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT *
FROM log_clearing_distributed_surcharge
WHERE client_id = #{client_id}
AND year(create_time) = #{year}
AND month(create_time) = #{month}
ORDER BY create_time DESC
]]>
<select id="findSurchargeTransactionsByDetailId" resultType="com.alibaba.fastjson.JSONObject">
SELECT clearing_detail_id, settle_date,total_surcharge,tax_amount, type, amount,create_time,operation,remark
FROM log_clearing_distributed_surcharge
WHERE client_id = #{client_id}
AND bill_id = #{detailId}
ORDER BY create_time
DESC
</select>
<select id="listUnClearedByMonth" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
select d.*
from log_clearing_distributed_surcharge d
where d.bill_id is null
and d.create_time < #{dateto}
]]>
select d.*
from log_clearing_distributed_surcharge d
where d.bill_id is null
and #{dateto} > d.create_time
</select>
</mapper>

@ -2,37 +2,35 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.FinancialSurchargeAccountDetailMapper">
<select id="findDetailsByMonth" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT d.*,c.client_moniker,c.short_name,c.company_name
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
WHERE d.settle_month = #{settle_month}
]]>
SELECT d.*,c.client_moniker,c.short_name,c.company_name
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
WHERE d.settle_month = #{settle_month}
</select>
<select id="findDetailsByClientId" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT d.*,c.client_moniker,c.short_name,c.company_name
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
WHERE d.client_id = #{client_id} ORDER BY create_time desc
]]>
SELECT d.*,c.client_moniker,c.short_name,c.company_name
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
WHERE d.client_id = #{client_id} ORDER BY create_time desc
</select>
<select id="listSettlementDatesInMonth" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT d.*,c.client_moniker,c.short_name,c.company_name,s.balance
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
LEFT JOIN sys_clients_surcharge_accounts s ON s.client_id = d.client_id
WHERE
d.settle_month= #{month}
ORDER BY s.balance ASC
]]>
SELECT fsad.detail_id,
fsad.settle_month,
fsad.total_surcharge,
fsad.credit_amount,
fsad.debit_amount,
sc.client_moniker,
sc.short_name,
sc.company_name
FROM financial_surcharge_account_detail fsad,
sys_clients sc
WHERE fsad.client_id = sc.client_id
AND fsad.settle_month = #{month}
</select>
<select id="listSettlementDatesByClientId" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT d.*,c.client_moniker,c.short_name,c.company_name,s.balance
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
LEFT JOIN sys_clients_surcharge_accounts s ON s.client_id = d.client_id
WHERE
s.client_id = #{client_id}
ORDER BY s.create_time DESC
]]>
SELECT d.*,c.client_moniker,c.short_name,c.company_name,s.balance
FROM financial_surcharge_account_detail d INNER JOIN sys_clients c ON c.client_id=d.client_id
LEFT JOIN sys_clients_surcharge_accounts s ON s.client_id = d.client_id
WHERE
s.client_id = #{client_id}
ORDER BY s.create_time DESC
</select>
</mapper>

@ -605,7 +605,7 @@ margin-bottom: 10%;"/>
</li>
<li ui-sref-active="active" ng-if="('preRefund'|withModule)">
<a ui-sref="analysis_monitoring.pre_refund" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>授信退款|Credit refund/span>
<i class="fa fa-tv"></i> <span>授信退款|Credit refund</span>
</a>
</li>
<li ui-sref-active="active">

@ -2307,7 +2307,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
};
$scope.getBankInfo = function (bsb_no) {
if (bsb_no != null && bsb_no != "") {
if (bsb_no != null && bsb_no !== "") {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bank_account/bank_info/' + bsb_no).then(function (resp) {
$scope.bankInfo = resp.data;
$scope.bankaccount.bank = $scope.bankInfo.bank;

@ -3,7 +3,6 @@
*/
define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angular) {
'use strict';
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
var app = angular.module('surchargeAccountApp', ['ui.bootstrap', 'ui.router', 'ngEcharts']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('surcharge_account', {
@ -25,22 +24,13 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
$scope.partner = angular.copy(partner.data);
$scope.getBalance = function () {
$scope.surcharge = {};
if ($scope.partner.surcharge_mode != undefined && $scope.partner.surcharge_mode == "distributed") {
if ($scope.partner.surcharge_mode !== undefined && $scope.partner.surcharge_mode === "distributed") {
$http.get('/client/partner_info/' + $scope.partner.client_moniker + '/surcharge_account').then(function (resp) {
$scope.surcharge = resp.data;
})
}
};
$scope.getTransactions = function () {
$http.get('/client/partner_info/' + $scope.partner.client_moniker + '/account/transactions').then(function (resp) {
$scope.transactions = resp.data;
})
}
$scope.getBalance();
$scope.getTransactions();
$scope.getDetailByMonths = function () {
$http.get('/client/partner_info/' + $scope.partner.client_moniker + '/account/months').then(function (resp) {
$scope.report = resp.data;
@ -93,20 +83,17 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
};
})
};
$scope.surchargeAccountDetail = function (client_moniker,mon) {
$scope.surchargeAccountDetail = function (detail) {
$uibModal.open({
templateUrl: '/static/payment/surchargeaccount/templates/partner_surcharge_account_month_dialog.html',
controller: 'accountDetailCtrl',
size: 'lg',
resolve: {
client_moniker: function () {
return client_moniker;
detail: function(){
return detail;
},
month: function () {
return mon;
},
transactions: ['$http', function ($http) {
return $http.get('/sys/partners/' + client_moniker + '/account/transactions/date?date='+mon);
surchargeDetailData: ['$http', function ($http) {
return $http.get('/sys/partners/' + detail.client_moniker + '/account/transactions/date?detailId=' + detail.detail_id);
}]
}
}).result.then(function () {
@ -115,9 +102,8 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
$scope.loadReport($scope.report.month);
});
};
$scope.fillMonthsSurcharge = function (details) {
var contentHtml = $sce.trustAsHtml('即将为[' + details.short_name + ']冲正,<span style="color: red">请确认商户信息</span>');
$scope.fillMonthsSurcharge = function (detail) {
var contentHtml = $sce.trustAsHtml('请确认商户[' + detail.short_name + ']已线下付款,再执行此操作</span>');
commonDialog.confirm({
title: '后付费账户冲正',
content: '',
@ -125,7 +111,7 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
{label: 'Cancel', className: 'btn-danger', key: '2', dismiss: true}],
contentHtml: contentHtml
}).then(function () {
$http.put('/sys/surcharge_account/fill/' + details.detail_id).then(function () {
$http.put('/sys/surcharge_account/fill/' + detail.detail_id).then(function () {
commonDialog.alert({title: 'Success', content: '冲正成功', type: 'success'});
$scope.loadReport($scope.report.month);
}, function (resp) {
@ -136,26 +122,10 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
};
}]);
app.controller('accountDetailCtrl', ['$scope','$http','transactions','client_moniker','commonDialog','month', function ($scope, $http, transactions,client_moniker,commonDialog,month) {
$scope.transactions = angular.copy(transactions.data);
$scope.params = {};
$scope.month = angular.copy(month);
$scope.getBalance = function () {
$http.get('/sys/partners/' + client_moniker + '/surcharge_account').then(function (resp) {
$scope.surcharge = resp.data;
})
};
$scope.getBalance();
$scope.getTransactions = function () {
$http.get('/sys/partners/' + client_moniker + '/account/transactions/date?date=' + $scope.month).then(function (resp) {
$scope.transactions = resp.data;
});
}
app.controller('accountDetailCtrl', ['$scope', '$http', 'detail', 'surchargeDetailData', function ($scope, $http, detail, surchargeDetailData) {
$scope.surchargeDetailData = angular.copy(surchargeDetailData.data);
$scope.month = angular.copy(detail.settle_month);
}]);
return app;
});

@ -20,7 +20,7 @@
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-3" ng-repeat="mon in months">
<div class="col-xs-1" ng-repeat="mon in months">
<a class="text-success" role="button" ng-click="loadReport(mon)" ng-if="hasReport(mon)">
<h2 ng-bind="mon.substring(5,7)"></h2>
</a>
@ -37,41 +37,32 @@
<table class="table table-striped">
<thead>
<tr>
<th>商户编号</th>
<th>Short Name</th>
<th>Total Surcharge</th>
<!--<th>充值总额</th>-->
<!--<th>支出总额</th>-->
<th>商户编码</th>
<th>商户简称</th>
<th>总手续费</th>
<th>是否结清</th>
<!--<th>余额</th>-->
<th>操作</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="details in report.details">
<tr ng-repeat="detail in report.details">
<td style="vertical-align:middle">
<a class="text-primary" role="button" title="Detail"
ui-sref="partners.detail({clientMoniker:details.client_moniker})">
<span ng-bind="details.client_moniker"></span></a>
ui-sref="partners.detail({clientMoniker:detail.client_moniker})">
<span ng-bind="detail.client_moniker"></span></a>
</td>
<td ng-bind="details.short_name" style="vertical-align:middle"></td>
<td ng-bind="details.total_surcharge | currency:'$'"></td>
<!--<td ng-bind="details.credit_amount|currency:'$'" style="color: green;vertical-align:middle" ></td>-->
<!--<td ng-bind="details.debit_amount|currency:'$'" style="color: red;vertical-align:middle"></td>-->
<td ng-bind="detail.short_name" style="vertical-align:middle"></td>
<td ng-bind="detail.total_surcharge | currency:'AUD'"></td>
<td style="vertical-align:middle">
<span ng-if="details.is_valid">已结清</span>
<span ng-if="!details.is_valid">未付款</span>
<span ng-if="detail.checkout">已结清</span>
<span ng-if="!detail.checkout">未付款</span>
</td>
<!--<td>-->
<!--<span ng-if="details.balance>=0" style="color: green">{{details.balance|currency:'$'}}</span>-->
<!--<span ng-if="details.balance<0" style="color: red">{{details.balance|currency:'$'}}</span>-->
<!--</td>-->
<td style="vertical-align:middle">
<!-- 等待邮件和微信推送模板 -->
<!--<a style="cursor: pointer" > 催款</a>-->
<!--<a style="cursor: pointer" ng-click="showDetail()">充值</a>-->
<button class="btn btn-warning" ng-if="!details.is_valid" type="button" ng-click="fillMonthsSurcharge(details)">冲正</button>
<i class="fa fa-bars" style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px" ng-click="surchargeAccountDetail(details.client_moniker,details.settle_month)"></i>
<button class="btn btn-warning" ng-if="!detail.checkout" type="button"
ng-click="fillMonthsSurcharge(detail)">冲正
</button>
<i class="fa fa-bars" style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px"
ng-click="surchargeAccountDetail(detail)"></i>
</td>
</tr>
</tbody>

@ -1,110 +1,8 @@
<section class="content-header">
<h1>
Client Surcharge Account
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Surcharge Account</li>
</ol>
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<div class="form-horizontal col-sm-8" style="margin-top: 30px">
<div class="form-group">
<label class="control-label col-xs-4 col-sm-3">手续费账户余额</label>
<div class="col-sm-6" style="font-size: 25px">
<p>{{surcharge.balance|currency:'AUD'}}</p>
</div>
</div>
<!--<div class="form-group" ng-if="partner.surcharge_mode=='distributed'">-->
<!--<label class="control-label col-xs-4 col-sm-3">允许手续费账户欠款</label>-->
<!--<div class="col-sm-6">-->
<!--<input type="checkbox" ng-model="partner.allow_surcharge_credit" bs-switch-->
<!--switch-change="allowSurchargeCredit(partner.allow_surcharge_credit)" switch-readonly="true">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-4 col-sm-3" style="padding-top:0px">Surcharge Mode:</label>-->
<!--<div class="col-xs-8 col-sm-6">-->
<!--<span class="control-label" ng-bind="partner.surcharge_mode"></span>-->
<!--<p class="text-info">-->
<!--<i class="fa fa-info"></i>启用到收支分离(distributed)模式,将使消费者支付手续费模式失效-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
</div>
<div class="box">
<div class="box box-default">
<div class="box-header">Credits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Create Time</th>
<th>Amount</th>
<th>Remark</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Credit',create_time:ctrl.day}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.create_time|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.remark"></td>
<td ng-bind="tr.operator_displayname"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box box-default">
<div class="box-header">Debits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Debit',create_time:ctrl.day}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.total_surcharge|currency:'AUD'"></td>
<td ng-bind="tr.tax_amount|currency:'AUD'"></td>
<td ng-bind="tr.remark"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<section class="content-header">
<h1>
每月手续费
Monthly Surcharge
<span style="float: right">Merchant Surcharge (<span
style="color: red">{{surcharge.balance|currency:'AUD'}}</span>)</span>
</h1>
</section>
<div class="content">
@ -115,22 +13,20 @@
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>清算月份</th>
<th>Settle Month</th>
<th>Total Surcharge</th>
<th>支出总额</th>
<th>是否结清</th>
<th>操作</th>
<th>Whether Settle</th>
<th>Detail</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="details in report">
<td ng-bind="details.settle_month"></td>
<td ng-bind="details.total_surcharge | currency:'$'"></td>
<td ng-bind="details.debit_amount|currency:'$'"
<td ng-bind="details.total_surcharge|currency:'$'"
style="color: red;vertical-align:middle"></td>
<td style="vertical-align:middle">
<span ng-if="details.is_valid">已结清</span>
<span ng-if="!details.is_valid">未付款</span>
<span ng-if="details.is_valid">Yes</span>
<span ng-if="!details.is_valid">No</span>
</td>
<td style="vertical-align:middle">
<i class="fa fa-bars"

@ -1,38 +1,37 @@
<div class="modal-header">
<h4>Surcharge Account Detail{{partner.client_moniker?'('+partner.client_moniker+')':''}}</h4>
<h4>Surcharge Accountdddd Detail{{partner.client_moniker?'('+partner.client_moniker+')':''}}</h4>
</div>
<div class="modal-body">
<div class="box box-default">
<div class="box-header">Debits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Debit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.total_surcharge|currency:'AUD'"></td>
<td ng-bind="tr.tax_amount|currency:'AUD'"></td>
<td>
{{tr.remark}}
<a ng-href="/client/clean_logs/{{tr.client_id}}/settlement_logs/{{tr.clearing_detail_id}}/export" target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="detail in surchargeDetailData">
<td ng-bind="detail.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="detail.amount|currency:'AUD'"></td>
<td ng-bind="detail.total_surcharge|currency:'AUD'"></td>
<td ng-bind="detail.tax_amount|currency:'AUD'"></td>
<td>
{{detail.remark}}
<a ng-href="/client/clean_logs/{{tr.client_id}}/settlement_logs/{{tr.clearing_detail_id}}/export"
target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

@ -1,58 +1,29 @@
<div class="modal-header">
<h4>Surcharge Account Detail{{partner.client_moniker?'('+partner.client_moniker+')':''}}</h4>
<h4>Surcharge Account Detail</h4>
</div>
<div class="modal-body">
<div class="box box-warning">
<div class="box-body" style="font-size: 35px;text-align: right">
{{surcharge.balance|currency:'AUD'}}<i class="fa fa-plus-square-o" style="font-size: 15px;padding-left: 15px;cursor: pointer" ng-click="addDetail()"></i>
</div>
</div>
<div class="box box-warning" ng-if="canAddDetail">
<div class="box-body">
<div class="row" style="margin-left: 20px;">
<div class="form-group">
<label>
Amount:
</label>
<input type="number" ng-model="params.amount">
<label>
remark:
</label>
<input type="text" ng-model="params.remark">
<div class="btn-group">
<a class="btn btn-success" role="button" ng-click="save()">Submit</a>
</div>
<div class="btn-group">
<a class="btn btn-danger" ng-click="cancel()" >Cancel</a>
</div>
</div>
</div>
</div>
</div>
<div class="box box-default">
<div class="box-header">Credits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Create Time</th>
<th>Amount</th>
<th>Remark</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Credit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.create_time|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.remark"></td>
<td ng-bind="tr.operator_displayname"></td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Create Time</th>
<th>Amount</th>
<th>Remark</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="surcharge in surchargeDetailData|propsFilter:{type:'Credit'}:true">
<td ng-bind="surcharge.create_time|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="surcharge.amount|currency:'AUD'"></td>
<td ng-bind="surcharge.remark"></td>
<td ng-bind="surcharge.operator"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@ -60,33 +31,32 @@
<div class="box-header">Debits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Debit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.total_surcharge|currency:'AUD'"></td>
<td ng-bind="tr.tax_amount|currency:'AUD'"></td>
<td>
{{tr.remark}}
<a ng-href="/sys/clean_logs/{{tr.client_id}}/settlement_logs/{{tr.clearing_detail_id}}/export" target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="surcharge in surchargeDetailData|propsFilter:{type:'Debit'}:true">
<td ng-bind="surcharge.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="surcharge.amount|currency:'AUD'"></td>
<td ng-bind="surcharge.total_surcharge|currency:'AUD'"></td>
<td ng-bind="surcharge.tax_amount|currency:'AUD'"></td>
<td>
{{surcharge.remark}}
<a ng-href="/sys/clean_logs/{{surcharge.client_id}}/settlement_logs/{{surcharge.clearing_detail_id}}/export"
target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

@ -1,36 +1,30 @@
<div class="modal-header">
<h4>Surcharge Account Detail{{partner.client_moniker?'('+partner.client_moniker+')':''}}</h4>
<h4>Surcharge Account Detail</h4>
</div>
<div class="modal-body">
<div class="box box-warning">
<div class="box-body" style="font-size: 35px;text-align: right">
{{surcharge.balance|currency:'AUD'}}
</div>
</div>
<div class="box box-default">
<div class="box-header">Credits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Create Time</th>
<th>Amount</th>
<th>Remark</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Credit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.create_time|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.remark"></td>
<td ng-bind="tr.operator_displayname"></td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Create Time</th>
<th>Amount</th>
<th>Remark</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="surcharge in surchargeDetailData|propsFilter:{type:'Credit'}:true">
<td ng-bind="surcharge.create_time|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="surcharge.amount|currency:'AUD'"></td>
<td ng-bind="surcharge.remark"></td>
<td ng-bind="surcharge.operation"></td>
</tr>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@ -38,33 +32,33 @@
<div class="box-header">Debits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Debit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.total_surcharge|currency:'AUD'"></td>
<td ng-bind="tr.tax_amount|currency:'AUD'"></td>
<td>
{{tr.remark}}
<a ng-href="/sys/clean_logs/{{tr.client_id}}/settlement_logs/{{tr.clearing_detail_id}}/export" target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="surcharge in surchargeDetailData|propsFilter:{type:'Debit'}:true">
<td ng-bind="surcharge.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="surcharge.amount|currency:'AUD'"></td>
<td ng-bind="surcharge.total_surcharge|currency:'AUD'"></td>
<td ng-bind="surcharge.tax_amount|currency:'AUD'"></td>
<td ng-bind="surcharge.remark"></td>
<td>
<a ng-href="/sys/clean_logs/{{surcharge.client_id}}/settlement_logs/{{surcharge.clearing_detail_id}}/export"
target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

Loading…
Cancel
Save