add mw合规文件、财务报表相关

master
luoyang 5 years ago
parent a382441bf2
commit 982f24c64a

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
@ -22,5 +23,5 @@ public interface ClientMWFilesMapper {
@AutoSql(SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid = 1")
List<JSONObject> findClientFile(@Param("client_id") int clientId);
List<JSONObject> findClientFile(@Param("client_id") int clientId, PageBounds pageBounds);
}

@ -7,11 +7,16 @@ import org.apache.commons.lang3.StringUtils;
* Created by yishuqian on 07/03/2017.
*/
public class ClientMWAuthFilesInfo {
private String upay_application_form;
private String upay_agreement_file;
private String client_bank_file;
private String client_company_file;
private String refund_exchange_policy;
private String upay_privacy_policy;
private String card_security_policy;
private String upay_promotional_offer;
private String upay_terms_conditions;
private String upay_offer_letter;
private String upay_driver_license;
private String upay_residence_certificate;
private String kyc_utility_bill_file;
private String upay_risk_level;
private String upay_risk_remark;
@ -30,14 +35,6 @@ public class ClientMWAuthFilesInfo {
return params;
}
public String getUpay_agreement_file() {
return upay_agreement_file;
}
public String getUpay_application_form() {
return upay_application_form;
}
public String getUpay_driver_license() {
return upay_driver_license;
}
@ -46,18 +43,6 @@ public class ClientMWAuthFilesInfo {
return upay_offer_letter;
}
public void setUpay_agreement_file(String upay_agreement_file) {
this.upay_agreement_file = upay_agreement_file;
}
public void setUpay_application_form(String upay_application_form) {
this.upay_application_form = upay_application_form;
}
public String getUpay_residence_certificate() {
return upay_residence_certificate;
}
public String getUpay_risk_level() {
return upay_risk_level;
}
@ -70,10 +55,6 @@ public class ClientMWAuthFilesInfo {
this.upay_offer_letter = upay_offer_letter;
}
public void setUpay_residence_certificate(String upay_residence_certificate) {
this.upay_residence_certificate = upay_residence_certificate;
}
public String getUpay_risk_remark() {
return upay_risk_remark;
}
@ -85,4 +66,68 @@ public class ClientMWAuthFilesInfo {
public void setUpay_risk_remark(String upay_risk_remark) {
this.upay_risk_remark = upay_risk_remark;
}
public String getCard_security_policy() {
return card_security_policy;
}
public String getClient_bank_file() {
return client_bank_file;
}
public String getClient_company_file() {
return client_company_file;
}
public String getUpay_privacy_policy() {
return upay_privacy_policy;
}
public String getUpay_promotional_offer() {
return upay_promotional_offer;
}
public void setCard_security_policy(String card_security_policy) {
this.card_security_policy = card_security_policy;
}
public String getUpay_terms_conditions() {
return upay_terms_conditions;
}
public void setClient_bank_file(String client_bank_file) {
this.client_bank_file = client_bank_file;
}
public void setClient_company_file(String client_company_file) {
this.client_company_file = client_company_file;
}
public void setUpay_privacy_policy(String upay_privacy_policy) {
this.upay_privacy_policy = upay_privacy_policy;
}
public void setUpay_promotional_offer(String upay_promotional_offer) {
this.upay_promotional_offer = upay_promotional_offer;
}
public void setUpay_terms_conditions(String upay_terms_conditions) {
this.upay_terms_conditions = upay_terms_conditions;
}
public String getRefund_exchange_policy() {
return refund_exchange_policy;
}
public void setRefund_exchange_policy(String refund_exchange_policy) {
this.refund_exchange_policy = refund_exchange_policy;
}
public String getKyc_utility_bill_file() {
return kyc_utility_bill_file;
}
public void setKyc_utility_bill_file(String kyc_utility_bill_file) {
this.kyc_utility_bill_file = kyc_utility_bill_file;
}
}

@ -438,7 +438,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
client.putAll(clientConfig);
JSONObject upayInfo = sysClientUpayProfileMapper.findInfo(client.getIntValue("client_id"));
if(null != upayInfo){
if (upayInfo != null) {
client.putAll(upayInfo);
}
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true);
@ -3435,7 +3435,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> files = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"));
List<JSONObject> files = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"), new PageBounds(1, 999999, Order.formString("last_update_date.asc")));
if (files != null && files.size() > 0) {
List<String> filePaths = new ArrayList<>();
for (JSONObject file : files) {
@ -3641,7 +3641,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
params.put("client_id", client.getIntValue("client_id"));
clientConfigMapper.update(params);
JSONObject upayInfo = sysClientUpayProfileMapper.findInfo(clientId);
if (upayInfo == null) {
sysClientUpayProfileMapper.save(params);
}else {
sysClientUpayProfileMapper.update(params);
}
}
@Override
@ -3759,7 +3764,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> clientFiles = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"));
List<JSONObject> clientFiles = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"), new PageBounds(1,999999, Order.formString("last_update_date.asc")));
JSONObject fileJson = new JSONObject();
for (JSONObject file : clientFiles) {
fileJson.put(file.getString("file_name"), file.getString("file_value"));
@ -3917,11 +3922,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
int clientId = client.getIntValue("client_id");
try {
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_APPLICATION_FORM.getFileName(), filesInfo.getUpay_application_form());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_AGREEMENT_FILE.getFileName(), filesInfo.getUpay_agreement_file());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_OFFER_LETTER.getFileName(), filesInfo.getUpay_offer_letter());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.CLIENT_BANK_FILE.getFileName(), filesInfo.getClient_bank_file());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.CLIENT_COMPANY_FILE.getFileName(), filesInfo.getClient_company_file());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_DRIVER_LICENSE.getFileName(), filesInfo.getUpay_driver_license());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_RESIDENCE_CERTIFICATE.getFileName(), filesInfo.getUpay_residence_certificate());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.REFUND_EXCHANGE_POLICY.getFileName(), filesInfo.getRefund_exchange_policy());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_PRIVACY_POLICY.getFileName(), filesInfo.getUpay_privacy_policy());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.CARD_SECURITY_POLICY.getFileName(), filesInfo.getCard_security_policy());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_OFFER_LETTER.getFileName(), filesInfo.getUpay_offer_letter());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_PROMOTIONAL_OFFER.getFileName(), filesInfo.getUpay_promotional_offer());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_TERMS_CONDITIONS.getFileName(), filesInfo.getUpay_terms_conditions());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.KYC_UTILITY_BILL_FILE.getFileName(), filesInfo.getKyc_utility_bill_file());
} catch (Exception e) {
logger.error("上传合规文件失败", e);
}

@ -2,11 +2,16 @@ package au.com.royalpay.payment.manage.merchants.enums;
public enum UPayAuthFileEnum {
ALL(""),
UPAY_APPLICATION_FORM("upay_application_form"),
UPAY_AGREEMENT_FILE("upay_agreement_file"),
UPAY_OFFER_LETTER("upay_offer_letter"),
CLIENT_BANK_FILE("client_bank_file"),
CLIENT_COMPANY_FILE("client_company_file"),
UPAY_DRIVER_LICENSE("upay_driver_license"),
UPAY_RESIDENCE_CERTIFICATE("upay_residence_certificate");
REFUND_EXCHANGE_POLICY("refund_exchange_policy"),
UPAY_PRIVACY_POLICY("upay_privacy_policy"),
CARD_SECURITY_POLICY("card_security_policy"),
UPAY_OFFER_LETTER("upay_offer_letter"),
UPAY_PROMOTIONAL_OFFER("upay_promotional_offer"),
UPAY_TERMS_CONDITIONS("upay_terms_conditions"),
KYC_UTILITY_BILL_FILE("kyc_utility_bill_file");
private final String fileName;
@ -19,10 +24,15 @@ public enum UPayAuthFileEnum {
}
public String[] getFileNameArrays() {
return new String[]{UPAY_APPLICATION_FORM.getFileName(),
UPAY_AGREEMENT_FILE.getFileName(),
return new String[]{CLIENT_BANK_FILE.getFileName(),
CLIENT_COMPANY_FILE.getFileName(),
UPAY_OFFER_LETTER.getFileName(),
REFUND_EXCHANGE_POLICY.getFileName(),
UPAY_PRIVACY_POLICY.getFileName(),
CARD_SECURITY_POLICY.getFileName(),
UPAY_OFFER_LETTER.getFileName(),
UPAY_DRIVER_LICENSE.getFileName(),
UPAY_RESIDENCE_CERTIFICATE.getFileName()};
UPAY_PROMOTIONAL_OFFER.getFileName(),
UPAY_TERMS_CONDITIONS.getFileName(),
KYC_UTILITY_BILL_FILE.getFileName()};
}
}

@ -36,6 +36,8 @@ public interface TradeLogService {
void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;
void exportUpayTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;
void exportTransFlowApi(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;
void exportExcel(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;

@ -136,6 +136,8 @@ public class TradeLogServiceImpl implements TradeLogService {
private org.springframework.core.io.Resource trans_flow;
@Value("classpath:/jasper/incremental_partner_invoice_gst.jasper")
private org.springframework.core.io.Resource incremental_trans_flow;
@Value("classpath:/jasper/partner_upay_invoice_gst.jasper")
private org.springframework.core.io.Resource upay_trans_flow;
@Value("classpath:/jasper/royalpay_logo.png")
private org.springframework.core.io.Resource logo;
@Value("classpath:/jasper/trans_excel.jasper")
@ -573,6 +575,30 @@ public class TradeLogServiceImpl implements TradeLogService {
return result;
}
private JSONObject listPartnerTransFlowByExportPdf(TradeLogQuery query, JSONObject partner, String[] channels) throws Exception {
int clientId = partner.getIntValue("client_id");
String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = query.toParams(timezone);
params.put("channel", channels);
clientManager.validateClients(clientId, params);
params.put("client_id", clientId);
clientManager.queryModifyClientIds(clientId, params);
List<JSONObject> logs = transactionMapper.listTransFlow(params);
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time"));
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy", Collections.singletonList("clearing_time"));
final JSONObject analysis = analysisTransLogs(logs);
JSONObject result = new JSONObject();
result.put("data", logs);
analysis.put("balance", transactionMapper.analysisBalance(params));
if (analysis.containsKey("paid_fee") && analysis.containsKey("refund_fee")) {
analysis.put("actual_fee", analysis.getBigDecimal("paid_fee").add(analysis.getBigDecimal("refund_fee")));
}
result.put("analysis", analysis);
return result;
}
private JSONObject analysisTransLogs(List<JSONObject> logs) {
final JSONObject analysis = new JSONObject();
analysis.put("order_count", logs.size());
@ -633,10 +659,18 @@ public class TradeLogServiceImpl implements TradeLogService {
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_transaction_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("transaction_fee")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_incremental_tax", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP)))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_transaction_fee_tax", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP)))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_surcharge", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("total_surcharge").add(log.getBigDecimal("tax_amount"))))
@ -679,7 +713,7 @@ public class TradeLogServiceImpl implements TradeLogService {
@Override
public void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
JSONObject transFlow = listPartnerTransFlow(query, partner);
JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner,new String[]{"Wechat","Alipay","AlipayOnline"});
JSONObject analysis = transFlow.getJSONObject("analysis");
JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id"));
if (!transFlow.getJSONArray("data").isEmpty()) {
@ -736,7 +770,7 @@ public class TradeLogServiceImpl implements TradeLogService {
});
JRDataSource jrDataSource = new JRBeanCollectionDataSource(dataList);
response.setContentType("application/pdf");
String fileName = client.getString("client_moniker") + "_" + parmerters.getString("dateRange").replaceAll("/", "");
String fileName = client.getString("client_moniker") + "_Cross_Border_" + parmerters.getString("dateRange").replaceAll("/", "");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
OutputStream outs = response.getOutputStream();
JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
@ -752,6 +786,84 @@ public class TradeLogServiceImpl implements TradeLogService {
}
}
@Override
public void exportUpayTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner,new String[]{"rpaypmt_card","rpaypmt_dd"});
JSONObject analysis = transFlow.getJSONObject("analysis");
JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id"));
if (!transFlow.getJSONArray("data").isEmpty()) {
try {
List<JSONObject> dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class);
JSONObject parmerters = new JSONObject();
parmerters.put("dateFrom", StringUtils.isNotBlank(query.getDatefrom())
? DateFormatUtils.format(DateUtils.parseDate(query.getDatefrom(), "yyyyMMdd"), "dd/MM/yyyy") : "");
parmerters.put("dateTo",
StringUtils.isNotBlank(query.getDateto())
? DateFormatUtils.format(DateUtils.parseDate(query.getDateto(), "yyyyMMdd"), "dd/MM/yyyy")
: DateFormatUtils.format(new Date(), "dd/MM/yyyy"));
parmerters.put("dateRange", (StringUtils.isNotBlank(parmerters.getString("dateFrom")) ? parmerters.getString("dateFrom") : "") + "~"
+ parmerters.getString("dateTo"));
parmerters.put("partnerCode", client.getString("client_moniker"));
parmerters.put("clientName", client.getString("company_name"));
parmerters.put("clientAddress", client.getString("address"));
parmerters.put("balance", analysis.getDoubleValue("balance"));
parmerters.put("logo", logo.getInputStream());
parmerters.put("actual_fee", takeDecimalOrDefault(analysis, "actual_fee", BigDecimal.ZERO));
parmerters.put("totalSettledAmount", takeDecimalOrDefault(analysis, "total_settle_amount", BigDecimal.ZERO));
parmerters.put("royalpay_charge", takeDecimalOrDefault(analysis, "total_royal_surcharge", BigDecimal.ZERO));
parmerters.put("total_fee", takeDecimalOrDefault(analysis, "total_surcharge", BigDecimal.ZERO));
parmerters.put("alipay_fee", takeDecimalOrDefault(analysis, "alipay_fee", BigDecimal.ZERO));
parmerters.put("wechat_fee", takeDecimalOrDefault(analysis, "wechat_fee", BigDecimal.ZERO));
parmerters.put("bestpay_fee", takeDecimalOrDefault(analysis, "bestpay_fee", BigDecimal.ZERO));
parmerters.put("jd_fee", takeDecimalOrDefault(analysis, "jd_fee", BigDecimal.ZERO));
parmerters.put("alipay_online_fee", takeDecimalOrDefault(analysis, "alipay_online_fee", BigDecimal.ZERO));
parmerters.put("gst", takeDecimalOrDefault(analysis, "tax_amount", BigDecimal.ZERO));
parmerters.put("royalpay_fee", takeDecimalOrDefault(analysis, "total_royalpay_fee", BigDecimal.ZERO));
parmerters.put("incremental_fee", takeDecimalOrDefault(analysis, "total_incremental_surcharge", BigDecimal.ZERO));
parmerters.put("incremental_gst", takeDecimalOrDefault(analysis, "total_incremental_tax", BigDecimal.ZERO));
parmerters.put("royalpay_gst", analysis.getBigDecimal("tax_amount").subtract(analysis.getBigDecimal("total_incremental_tax")).setScale(2,RoundingMode.HALF_UP));
parmerters.put("total_transaction_fee", analysis.getBigDecimal("total_transaction_fee").add(analysis.getBigDecimal("total_transaction_fee_tax")).setScale(2,RoundingMode.HALF_UP));
parmerters.put("total_royalpay_fee", analysis.getBigDecimal("total_surcharge").subtract(parmerters.getBigDecimal("total_transaction_fee")).setScale(2,RoundingMode.HALF_UP));
dataList.parallelStream().forEach(item -> {
BigDecimal incrementalSurcharge = item.containsKey("incremental_surcharge") ? item.getBigDecimal("incremental_surcharge") : BigDecimal.ZERO;
BigDecimal taxAmount = item.containsKey("tax_amount") ? item.getBigDecimal("tax_amount") : BigDecimal.ZERO;
BigDecimal royalpaySurhcarge = item.containsKey("royal_surcharge") ? item.getBigDecimal("royal_surcharge") : BigDecimal.ZERO;
BigDecimal surhcargeBack = item.containsKey("surcharge_cashback") ? item.getBigDecimal("surcharge_cashback") : BigDecimal.ZERO;
BigDecimal channelSurcharge = item.containsKey("channel_surcharge") ? item.getBigDecimal("channel_surcharge") : BigDecimal.ZERO;
BigDecimal incrementalTax = incrementalSurcharge.divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal transactionFee = item.getBigDecimal("transaction_fee");
BigDecimal transactionFeeTax = item.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal royalpayTax = taxAmount.subtract(incrementalTax).subtract(transactionFeeTax);
BigDecimal realRoyalpayCharge = item.getBigDecimal("total_surcharge").add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax);
item.put("incremental_surcharge", incrementalSurcharge.add(incrementalTax).setScale(2, RoundingMode.HALF_UP));
item.put("total_surcharge_intax", realRoyalpayCharge.setScale(2, RoundingMode.HALF_UP));
item.put("transaction_fee_intax", transactionFee.add(transactionFeeTax).setScale(2,RoundingMode.HALF_UP));
scaleDecimalVal(item, "display_amount", item.getString("currency"));
String platformCurrency = PlatformEnvironment.getEnv().getForeignCurrency();
scaleDecimalVal(item, "clearing_amount", platformCurrency);
scaleDecimalVal(item, "settle_amount", platformCurrency);
scaleDecimalVal(item, "total_surcharge", platformCurrency);
});
JRDataSource jrDataSource = new JRBeanCollectionDataSource(dataList);
response.setContentType("application/pdf");
String fileName = client.getString("client_moniker") + "_Card_Payment_" + parmerters.getString("dateRange").replaceAll("/", "");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
OutputStream outs = response.getOutputStream();
// JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
// InputStream jasper = clientIncrement == null ? trans_flow.getInputStream() : incremental_trans_flow.getInputStream();
InputStream jasper = upay_trans_flow.getInputStream();
byte[] bytes = JasperRunManager.runReportToPdf(jasper, parmerters, jrDataSource);
outs.write(bytes, 0, bytes.length);
outs.flush();
outs.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override
public void exportTransFlowApi(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
query.setClearing_status(-1);

@ -39,6 +39,12 @@ public class TradeFlowController {
tradeLogService.exportTransFlow(query, partner, httpResponse);
}
@PartnerMapping(value = "/report/upay_pdf", method = RequestMethod.GET)
@ReadOnlyConnection
public void exportUpayPDF(TradeLogQuery query, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse httpResponse) throws Exception {
tradeLogService.exportUpayTransFlow(query, partner, httpResponse);
}
@PartnerMapping(value = "/report/excel", method = RequestMethod.GET)
@ReadOnlyConnection
public void exportExcel(TradeLogQuery query, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse httpResponse) throws Exception {

@ -576,9 +576,11 @@
(SELECT min(r.rate_value) FROM sys_client_rates r WHERE r.client_id = t.client_id
AND date(r.expiry_time) >= DATE(t.clearing_time)
AND date(r.active_time) &lt;= DATE(t.clearing_time)) rate,
t.clearing_order clear_detail_id
t.clearing_order clear_detail_id,
lc.balance_group
FROM pmt_transactions t
left join log_clearing_detail cd on cd.clear_detail_id=t.clearing_order
left join log_clearing lc on cd.clearing_id = lc.clearing_id
left join sys_clients sc on t.client_id = sc.client_id
WHERE t.channel='Settlement'

@ -556,6 +556,10 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
return '/static/images/yeepay_sign_lg.png';
case 'LakalaPay':
return '/static/images/lakalapay_sign_lg.png';
case 'rpaypmt_card':
return '/static/images/card_payment_sign_lg.png';
case 'rpaypmt_dd':
return '/static/images/direct_debit_sign_lg.png';
}
}
});

@ -53,6 +53,16 @@
<img src="/static/images/rpayplus_sign_lg.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_card'}" ng-if="report.channels.rpaypmt_card">
<a role="button" ng-click="ctrl.channel='rpaypmt_card';channelAndDayOfAnalysis()" title="rpaypmt_card">
<img src="/static/images/card_payment_sign_lg.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_dd'}" ng-if="report.channels.rpaypmt_dd">
<a role="button" ng-click="ctrl.channel='rpaypmt_dd';channelAndDayOfAnalysis()" title="rpaypmt_dd">
<img src="/static/images/direct_debit_sign_lg.png" class="channel-icon-lg">
</a>
</li>
</ul>
</div>
</div>

@ -87,6 +87,10 @@ define(['../app','decimal'], function (app,Decimal) {
return '/static/images/hf_sign_lg.png';
case 'Rpay':
return '/static/images/rpayplus_sign_lg.png';
case 'rpaypmt_card':
return '/static/images/card_payment_sign_lg.png';
case 'rpaypmt_dd':
return '/static/images/direct_debit_sign_lg.png';
}
}
});

@ -415,6 +415,10 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) {
return '/static/images/yeepay_sign_lg.png';
case 'LakalaPay':
return '/static/images/lakalapay_sign_lg.png';
case 'rpaypmt_card':
return '/static/images/card_payment_sign_lg.png';
case 'rpaypmt_dd':
return '/static/images/direct_debit_sign_lg.png';
}
}
});

@ -3658,9 +3658,53 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
app.controller('partnerMWAuthFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
$scope.id_info_form = {edit: false};
$scope.file = file.data || {};
$scope.uploadFile = {};
$scope.file.upay_risk_level = $scope.partner.upay_risk_level;
$scope.file.upay_risk_remark = $scope.partner.upay_risk_remark;
$scope.uploadApplyFile = function (file) {
$scope.bankIsImage = true;
$scope.asicIsImage = true;
$scope.idIsImage = true;
$scope.utilityIsImage = true;
$scope.refundIsImage = true;
$scope.privacyIsImage = true;
$scope.cardIsImage = true;
$scope.letterIsImage = true;
$scope.promotionalIsImage = true;
$scope.termsIsImage = true;
if ($scope.file.client_bank_file && $scope.file.client_bank_file.endsWith('pdf')) {
$scope.bankIsImage = false;
}
if ($scope.file.client_company_file && $scope.file.client_company_file.endsWith('pdf')) {
$scope.asicIsImage = false;
}
if ($scope.file.upay_driver_license && $scope.file.upay_driver_license.endsWith('pdf')) {
$scope.idIsImage = false;
}
if ($scope.file.kyc_utility_bill_file && $scope.file.kyc_utility_bill_file.endsWith('pdf')) {
$scope.utilityIsImage = false;
}
if ($scope.file.refund_exchange_policy && $scope.file.refund_exchange_policy.endsWith('pdf')) {
$scope.refundIsImage = false;
}
if ($scope.file.upay_privacy_policy && $scope.file.upay_privacy_policy.endsWith('pdf')) {
$scope.privacyIsImage = false;
}
if ($scope.file.card_security_policy && $scope.file.card_security_policy.endsWith('pdf')) {
$scope.cardIsImage = false;
}
if ($scope.file.upay_offer_letter && $scope.file.upay_offer_letter.endsWith('pdf')) {
$scope.letterIsImage = false;
}
if ($scope.file.upay_promotional_offer && $scope.file.upay_promotional_offer.endsWith('pdf')) {
$scope.promotionalIsImage = false;
}
if ($scope.file.upay_terms_conditions && $scope.file.upay_terms_conditions.endsWith('pdf')) {
$scope.termsIsImage = false;
}
$scope.uploadBankFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
@ -3670,10 +3714,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.uploadFile = {};
delete $scope.bankFileProgress;
$scope.file.upay_application_form = resp.data.url;
$scope.file.client_bank_file = resp.data.url;
$scope.uploadFile.client_bank_file = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_application_form.endsWith('pdf')) {
if ($scope.file.client_bank_file.endsWith('pdf')) {
$scope.bankIsImage = false;
} else {
$scope.bankIsImage = true;
@ -3687,136 +3733,268 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
};
$scope.agreeIsImage = true;
if ($scope.file.file_agreement_info && $scope.file.file_agreement_info.endsWith('pdf')) {
$scope.agreeIsImage = false;
}
$scope.bankIsImage = true;
if ($scope.file.upay_application_form && $scope.file.upay_application_form.endsWith('pdf')) {
$scope.bankIsImage = false;
}
$scope.companyIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
}
$scope.applyIsImage = true;
if ($scope.file.file_apply_info && $scope.file.file_apply_info.endsWith('pdf')) {
$scope.applyIsImage = false;
}
$scope.idIsImage = true;
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.uploadAgreementFile = function (file) {
$scope.uploadASICFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.companyFileProgress = {value: 0};
$scope.ASICProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.companyFileProgress;
$scope.file.upay_agreement_file = resp.data.url;
$scope.uploadFile = {};
delete $scope.ASICProgress;
$scope.file.client_company_file = resp.data.url;
$scope.uploadFile.client_company_file = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_agreement_file.endsWith('pdf')) {
$scope.companyIsImage = false;
if ($scope.file.client_company_file.endsWith('pdf')) {
$scope.bankIsImage = false;
} else {
$scope.companyIsImage = true;
$scope.bankIsImage = true;
}
}, function (resp) {
delete $scope.companyFileProgress;
delete $scope.ASICProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
$scope.ASICProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadOfferFile = function (file) {
$scope.uploadIdFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.idFileProgress = {value: 0};
$scope.idProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.idFileProgress;
$scope.file.upay_offer_letter = resp.data.url;
$scope.uploadFile = {};
delete $scope.idProgress;
$scope.file.upay_driver_license = resp.data.url;
$scope.uploadFile.upay_driver_license = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_offer_letter.endsWith('pdf')) {
if ($scope.file.upay_driver_license.endsWith('pdf')) {
$scope.idIsImage = false;
} else {
$scope.idIsImage = true;
}
}, function (resp) {
delete $scope.idFileProgress;
delete $scope.idProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
$scope.idProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadDriverFile = function (file) {
$scope.uploadResidenceFile = function (file) {
if (file != null) {
if (file.size > 10 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过10MB请压缩后重试', type: 'error'})
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.agreementFileProgress = {value: 0};
$scope.residenceFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.agreementFileProgress;
$scope.file.upay_driver_license = resp.data.url;
$scope.uploadFile = {};
delete $scope.residenceFileProgress;
$scope.file.kyc_utility_bill_file = resp.data.url;
$scope.uploadFile.kyc_utility_bill_file = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_driver_license.endsWith('pdf')) {
$scope.agreeIsImage = false;
if ($scope.file.kyc_utility_bill_file.endsWith('pdf')) {
$scope.utilityIsImage = false;
} else {
$scope.agreeIsImage = true;
$scope.utilityIsImage = true;
}
}, function (resp) {
delete $scope.agreementFileProgress;
delete $scope.residenceFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total);
$scope.residenceFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadResidenceFile = function (file) {
$scope.uploadRefundPolicyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.applyFileProgress = {value: 0};
$scope.refundPolicyFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.applyFileProgress;
$scope.file.upay_residence_certificate = resp.data.url;
$scope.uploadFile = {};
delete $scope.refundPolicyFileProgress;
$scope.file.refund_exchange_policy = resp.data.url;
$scope.uploadFile.refund_exchange_policy = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_residence_certificate.endsWith('pdf')) {
$scope.applyIsImage = false;
if ($scope.file.refund_exchange_policy.endsWith('pdf')) {
$scope.utilityIsImage = false;
} else {
$scope.applyIsImage = true;
$scope.utilityIsImage = true;
}
}, function (resp) {
delete $scope.applyFileProgress;
delete $scope.refundPolicyFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
$scope.refundPolicyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadPrivacyPolicyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.privacyFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.uploadFile = {};
delete $scope.privacyFileProgress;
$scope.file.upay_privacy_policy = resp.data.url;
$scope.uploadFile.upay_privacy_policy = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_privacy_policy.endsWith('pdf')) {
$scope.privacyIsImage = false;
} else {
$scope.privacyIsImage = true;
}
}, function (resp) {
delete $scope.privacyFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.privacyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadCardPolicyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.cardFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.uploadFile = {};
delete $scope.cardFileProgress;
$scope.file.card_security_policy = resp.data.url;
$scope.uploadFile.card_security_policy = resp.data.url;
$scope.updateFile();
if ($scope.file.card_security_policy.endsWith('pdf')) {
$scope.privacyIsImage = false;
} else {
$scope.privacyIsImage = true;
}
}, function (resp) {
delete $scope.cardFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.cardFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadLetterOfOfferFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.letterFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.uploadFile = {};
delete $scope.letterFileProgress;
$scope.file.upay_offer_letter = resp.data.url;
$scope.uploadFile.upay_offer_letter = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_offer_letter.endsWith('pdf')) {
$scope.letterIsImage = false;
} else {
$scope.letterIsImage = true;
}
}, function (resp) {
delete $scope.letterFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.letterFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadPromotionalFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.promotionalFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.uploadFile = {};
delete $scope.promotionalFileProgress;
$scope.file.upay_promotional_offer = resp.data.url;
$scope.uploadFile.upay_promotional_offer = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_promotional_offer.endsWith('pdf')) {
$scope.promotionalIsImage = false;
} else {
$scope.promotionalIsImage = true;
}
}, function (resp) {
delete $scope.promotionalFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.promotionalFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadTermsFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.termsFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
$scope.uploadFile = {};
delete $scope.termsFileProgress;
$scope.file.upay_terms_conditions = resp.data.url;
$scope.uploadFile.upay_terms_conditions = resp.data.url;
$scope.updateFile();
if ($scope.file.upay_terms_conditions.endsWith('pdf')) {
$scope.termsIsImage = false;
} else {
$scope.termsIsImage = true;
}
}, function (resp) {
delete $scope.termsFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.termsFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.saveIdInfo = function () {
if (!$scope.file.upay_risk_level) {
commonDialog.alert({title: 'Error', content: '请选择商户风险等级', type: 'error'});
@ -3844,34 +4022,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return url;
};
$scope.deleteComplianceFiles = function (file_id) {
commonDialog.confirm({
title: 'Warning',
content: 'This operation will delete the file, Are you sure?'
}).then(function () {
$http.put('/sys/partners/auth_file/' + file_id + '/delete').then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Delete Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
$scope.updateFile = function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/mw_file', $scope.file).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/mw_file', $scope.uploadFile).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Upload Successful',
type: 'success'
});
$state.reload();
$state.go('partners.detail.files.MW_files', {reload: true});
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})

@ -1290,7 +1290,7 @@
</div>
<div class="form-group" ng-if="partner.client_type=='card-payment'"
<div class="form-group" ng-if="partner.client_type=='card-payment' || partner.client_type=='all'"
ng-class="{'has-error':partnerForm.mw-industry.$invalid && partnerForm.mw-industry.$dirty}">
<label class="control-label col-sm-2" for="mw-industry-input">
*Merchant Warrior Industry</label>

@ -3,18 +3,21 @@
width: 100%;
}
</style>
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active">
<a ui-sref="partners.detail.files.CP_files"><span>跨境支付合规文件|Cross-border Payment Compliance Files</span></a>
</li>
<li ui-sref-active="active">
<a ui-sref="partners.detail.files.MW_files"> <span>卡支付合规文件|Card Payment Compliance Files</span></a>
</li>
</ul>
<div class="panel panel-default">
<div class="panel-heading" style="padding: 10px 15px 0 15px;">
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active">
<a ui-sref="partners.detail.files.CP_files"><span>跨境支付合规文件|Cross-border Payment Compliance Files</span></a>
</li>
<li ui-sref-active="active">
<a ui-sref="partners.detail.files.MW_files"> <span>卡支付合规文件|Card Payment Compliance Files</span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="panel-body" ui-view>
</div>
</div>
<div class="panel panel-default" ui-view>
</div>

@ -4,7 +4,7 @@
}
</style>
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<div class="panel-heading" style="padding: 0">Audit Files &nbsp;&nbsp;&nbsp;
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank">
<i class="fa fa-cloud-download">一键下载</i>
</a>

@ -474,13 +474,11 @@
ui-sref="partners.edit({clientMoniker:partner.client_moniker})">
<i class="fa fa-edit"></i> Edit
</a>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10">
<p class="form-control-static">
<span id="parent_code">{{partner.client_moniker}}</span>
@ -527,6 +525,12 @@
<p class="form-control-static" ng-bind="partner.business_name"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Card Acceptor Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.acceptor_name"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Store Name</label>
<div class="col-sm-10">
@ -815,6 +819,20 @@
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Expected credit card monthly revenue ($)</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.expected_card_revenue"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Average credit card transaction value ($)</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.average_card_transaction"></p>
</div>
</div>
</div>
</div>
</div>
@ -1238,6 +1256,36 @@
ng-if="$root.complianceCheck.clientInfo"></i>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Merchant Warrior Industry</label>
<div class="col-sm-10">
<p class="form-control-static industry-p" ng-if="partner.mw_industry">
{{partner.mw_industry}}
</p>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.clientInfo"></i>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Card Service Selection</label>
<div class="col-sm-8">
<span class="checkbox-inline">
<label>
<input type="checkbox" checked disabled ng-if="partner.mw_industry">
<input type="checkbox" disabled ng-if="!partner.mw_industry">
Australia Credit Card Payment|澳大利亚信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-if="partner.enable_international_card" checked disabled>
<input type="checkbox" ng-if="!partner.enable_international_card" disabled>
International Credit Card Payment|国际信用卡支付
</label>
</span>
</div>
</div>
</div>
</div>
</div>

@ -1195,7 +1195,7 @@
</div>
</div>
<div class="form-group" ng-if="partner.client_type=='card-payment'"
<div class="form-group" ng-if="partner.client_type=='card-payment' || partner.client_type=='all'"
ng-class="{'has-error':partnerForm.mw-industry.$invalid && partnerForm.mw-industry.$dirty}">
<label class="control-label col-sm-2" for="mw-industry-input">
*Merchant Warrior Industry</label>

@ -3,7 +3,7 @@
width: 100%;
}
</style>
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<div class="panel-heading" style="padding: 0">Audit Files &nbsp;&nbsp;&nbsp;
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank">
<i class="fa fa-cloud-download">一键下载</i>
</a>
@ -66,126 +66,173 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Merchant Warrior申请表</label>
<label class="control-label col-sm-2">* Six Months Bank Statement | 六个月银行对账单</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadApplyFile($file)">
ngf-select="uploadBankFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_application_form}}" ><i class="fa fa-download"></i></a>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.client_bank_file}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<table>
<tbody>
<tr>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file.upay_application_form}}">
<img ng-src="{{file.upay_application_form}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</td>
</tr>
</tbody>
</table>
<a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_bank_file}}">
<img ng-src="{{file.client_bank_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Letter of Offer邀约信 </label>
<label class="control-label col-sm-2">* ASIC Current Company Extract | ASIC 当前公司信息摘录</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadOfferFile($file)">
ngf-select="uploadASICFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_offer_letter}}" ><i class="fa fa-download"></i></a>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.client_company_file}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar>
<table>
<tbody>
<tr>
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_offer_letter}}">
<img ng-src="{{file.upay_offer_letter}}"class="col-sm-6"onerror="this.src='/static/images/file_close.png'">
</a>
</td>
</tr>
</tbody></table>
<uib-progressbar value="ASICProgress.value" ng-if="ASICProgress"></uib-progressbar>
<a ng-if="asicIsImage" target="_blank" ng-href="{{file.client_company_file}}">
<img ng-src="{{file.client_company_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Merchant Warrior商户签署协议</label>
<label class="control-label col-sm-2">* ID of Legal Representative 法人身份证明</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadAgreementFile($file)">
ngf-select="uploadIdFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_agreement_file}}" ><i class="fa fa-download"></i></a>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_driver_license}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar>
<table><tbody>
<tr>
<td><a ng-if="companyIsImage" target="_blank" ng-href="{{file.upay_agreement_file}}">
<img ng-src="{{file.upay_agreement_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</td>
</tr>
</tbody></table>
<uib-progressbar value="idProgress.value" ng-if="idProgress"></uib-progressbar>
<a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_driver_license}}">
<img ng-src="{{file.upay_driver_license}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* 最终受益人驾驶执照</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadDriverFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_driver_license}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar>
<table>
<tbody>
<tr>
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_driver_license}}">
<img ng-src="{{file.upay_driver_license}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</td>
</tr>
</tbody></table>
<div class="form-group">
<label class="control-label col-sm-2">* Proof of Residential Address (One Utilities Bill) | 家庭住址证明 (一个水电煤网账单)</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadResidenceFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.kyc_utility_bill_file}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="residenceFileProgress.value" ng-if="residenceFileProgress"></uib-progressbar>
<a ng-if="utilityIsImage" target="_blank" ng-href="{{file.kyc_utility_bill_file}}">
<img ng-src="{{file.kyc_utility_bill_file}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* 受益人居住证明文件</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadResidenceFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_residence_certificate}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="applyFileProgress"></uib-progressbar>
<table>
<tbody>
<tr>
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_residence_certificate}}">
<img ng-src="{{file.upay_residence_certificate}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</td>
</tr>
</tbody></table>
<div class="form-group">
<label class="control-label col-sm-2">* Refund and Exchange Policy | 退款和换货政策</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadRefundPolicyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.refund_exchange_policy}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="refundPolicyFileProgress.value" ng-if="refundPolicyFileProgress"></uib-progressbar>
<a ng-if="refundIsImage" target="_blank" ng-href="{{file.refund_exchange_policy}}">
<img ng-src="{{file.refund_exchange_policy}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Privacy Policy | 隐私政策</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadPrivacyPolicyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_privacy_policy}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="privacyFileProgress.value" ng-if="privacyFileProgress"></uib-progressbar>
<a ng-if="privacyIsImage" target="_blank" ng-href="{{file.upay_privacy_policy}}">
<img ng-src="{{file.upay_privacy_policy}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Card information Security Policy | 卡信息安全政策</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCardPolicyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.card_security_policy}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="cardFileProgress.value" ng-if="cardFileProgress"></uib-progressbar>
<a ng-if="cardIsImage" target="_blank" ng-href="{{file.card_security_policy}}">
<img ng-src="{{file.card_security_policy}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Letter of Offer | 邀约信 </label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadLetterOfOfferFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_offer_letter}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="letterFileProgress.value" ng-if="letterFileProgress"></uib-progressbar>
<a ng-if="letterIsImage" target="_blank" ng-href="{{file.upay_offer_letter}}">
<img ng-src="{{file.upay_offer_letter}}"class="col-sm-6"onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Promotional Offer | 优惠费率信 </label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadPromotionalFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_promotional_offer}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="promotionalFileProgress.value" ng-if="promotionalFileProgress"></uib-progressbar>
<a ng-if="promotionalIsImage" target="_blank" ng-href="{{file.upay_promotional_offer}}">
<img ng-src="{{file.upay_promotional_offer}}"class="col-sm-6"onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Terms and Conditions | 条款</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadTermsFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_terms_conditions}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="termsFileProgress.value" ng-if="termsFileProgress"></uib-progressbar>
<a ng-if="termsIsImage" target="_blank" ng-href="{{file.upay_terms_conditions}}">
<img ng-src="{{file.upay_terms_conditions}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
</div>

@ -220,6 +220,7 @@
<thead>
<tr>
<th>Settle Time</th>
<th>Settle Version</th>
<th>Transaction Amount</th>
<th>to Merchant</th>
<th>Service Fee</th>
@ -229,11 +230,15 @@
<tbody>
<tr ng-repeat="log in settlementLogs">
<td>
{{log.report_date}}
{{log.report_date|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red">
<i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i>
</span>
</td>
<td>
<span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span>
<span ng-if="log.balance_group!='RPAY_SVC_CARD'">Cross-border Payment</span>
</td>
<td ng-bind="log.total"></td>
<td ng-bind="log.income"></td>
<td ng-bind="log.fee"></td>

@ -389,7 +389,8 @@
</button>
<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button"
style="min-width: 80px">
<li><a target="_blank" ng-href="{{export('pdf')}}">PDF</a></li>
<li><a target="_blank" ng-href="{{export('pdf')}}">Cross-border Payment PDF</a></li>
<li><a target="_blank" ng-href="{{export('upay-pdf')}}">Card Payment PDF</a></li>
<li><a target="_blank" ng-href="{{export('excel')}}">EXCEL</a></li>
<li><a target="_blank"
ng-href="{{export('excel_detail')}}">EXCEL(Detail)</a></li>

@ -55,6 +55,17 @@
<img src="/static/images/lakalapay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_card'}" ng-if="report.channels.rpaypmt_card">
<a role="button" ng-click="ctrl.channel='rpaypmt_card';channelAndDayOfAnalysis()" title="rpaypmt_card">
<img src="/static/images/card_payment_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_dd'}" ng-if="report.channels.rpaypmt_dd">
<a role="button" ng-click="ctrl.channel='rpaypmt_dd';channelAndDayOfAnalysis()" title="rpaypmt_dd">
<img src="/static/images/direct_debit_sign_lg.png">
</a>
</li>
</ul>
</div>
</div>

@ -271,6 +271,7 @@
<thead>
<tr>
<th>Date</th>
<th>Settle Version</th>
<th>Transaction Amount(AUD)</th>
<th>Transfer to Merchant(AUD)</th>
<th>GST(AUD)</th>
@ -285,6 +286,10 @@
{{log.clearing_time|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red"><i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i></span>
</td>
<td>
<span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span>
<span ng-if="log.balance_group!='RPAY_SVC_CARD'">Cross-border Payment</span>
</td>
<td ng-bind="log.total"></td>
<td ng-bind="log.income"></td>
<td ng-bind="log.tax_amount"></td>

@ -219,6 +219,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
if (type=='pdf'){
url = '/client/trans_flow/report/pdf';
}
if (type=='upay-pdf'){
url = '/client/trans_flow/report/upay_pdf';
}
if (type=='excel'){
url='/client/trans_flow/report/excel';
}

Loading…
Cancel
Save