Commit 788e5e22 authored by Anthony.Suerte's avatar Anthony.Suerte

Transaction History Export Function Enhancement

parent 76ffae30
<?php
header("Content-type: text/json");
require_once('config.php');
class UserTransaction extends System {
private $userAccount;
private $currency;
private $from;
private $to;
private $page;
public function __construct(){
parent::__construct();
$this -> init();
}
public function init(){
$this -> setParameter();
$this -> validation();
}
private function setParameter(){
$this -> userAccount = $this -> getUserData(PARAM_USER_ACCOUNT);
$this -> currency = $this -> getDataPost("cur");
$this -> from = $this -> getDataPost("from");
$this -> to = $this -> getDataPost("to");
$this -> page = $this -> getDataPost("page");
}
private function validation(){
if($_SERVER['REQUEST_METHOD'] != 'POST'){
die(json_encode([
"error_code" => 1,
"message" => "Invalid Request Method [{$_SERVER['REQUEST_METHOD']}]"
]));
}
if(empty($this -> getUserData(PARAM_USER_ACCOUNT))){
die(json_encode([
"error_code" => 2,
"message" => "No Site Session Found"
]));
}
}
/*-------------------------------------------------------------------------
* @function_name: 検索条件の取得
* @parameter : なし
* @return : 検索条件
-------------------------------------------------------------------------*/
private function getWhere() {
// 変数宣言部
$params = array();
$rtn = NO_STRING;
// 通貨指定
if($this -> currency != NO_STRING) {
$params[] = ' (trans.deposit_currency = (\')' . $this -> currency . '(\') OR trans.withdraw_currency = (\')' . $this -> currency . '(\') OR trans.transfer_currency = (\')' . $this -> currency . '(\'))';
}
// 日付指定(from)
if($this -> from != NO_STRING) {
$params[] = ' transaction_time >= (\')' . $this -> from . '(\')';
}
// 日付指定(to)
if($this -> to != NO_STRING) {
$params[] = ' transaction_time < DATE_ADD((\')' . $this -> to . '(\'), INTERVAL 1 DAY)';
}
// データが存在した場合
if($this -> isLoopData($params)) {
$rtn = DELIMIT_AND . implode(DELIMIT_AND, $params);
}
return $rtn;
}
private function getUserAccountData() {
// 変数宣言部
$rtn = array();
$rtn[] = $this -> userAccount; // ユーザアカウント
$rtn[] = $this -> currency;
$rtn[] = $this -> getWhere(); // 検索条件
$rtn[] = NO_STRING;
return $rtn;
}
public function result(){
$params = $this -> getUserAccountData();
$defaultPageCount = VAR_DEFAULT_PAGE_COUNT;
$countTransactions = $this -> getRowData($this -> accessSelect('SELECT_USER_TRANSACTION_ADMIN_COUNT', $params));
$totalPage = $this -> getTotalPageCommon($defaultPageCount, $countTransactions["overall_total"]);
$currentPage = empty($this -> page) || !is_numeric($this -> page) ? 1 : $this -> page;
if($currentPage > $totalPage)
$currentPage = $totalPage;
$start = ($currentPage - 1) * $defaultPageCount;
$params[3] = "DESC LIMIT {$start}, {$defaultPageCount}";
$list = $this -> accessSelect('LIST_USER_TRANSACTION', $params);
$start = ($currentPage - VAL_INT_1) * $defaultPageCount;
$result = [
"row_count" => $countTransactions["overall_total"],
"page_total" => $totalPage,
"current_page" => $currentPage,
"start_row" => $start + 1,
"result" => []
];
foreach($list as $transaction){
$result["result"][] = $transaction;
}
echo json_encode($result);
}
}
$trans = new UserTransaction();
$trans -> result();
\ No newline at end of file
...@@ -58,15 +58,11 @@ class UserTransactions extends OpenAPIAbstraction { ...@@ -58,15 +58,11 @@ class UserTransactions extends OpenAPIAbstraction {
} }
private function list(){ private function list(){
$countTransactions = $this -> getRowData($this -> accessSelect('SELECT_USER_TRANSACTION_COUNT', [ $params = $this -> getUserAccountData();
$this -> holder -> userAccount,
$this -> holder -> currency,
$this -> getWhereCount()
]));
$totalPage = $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $countTransactions["overall_total"]); $countTransactions = $this -> getRowData($this -> accessSelect('SELECT_USER_TRANSACTION_ADMIN_COUNT', $params));
$params = $this -> getUserAccountData(); $totalPage = $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $countTransactions["overall_total"]);
$currentPage = empty($this -> holder -> page) || !is_numeric($this -> holder -> page) ? 1 : $this -> holder -> page; $currentPage = empty($this -> holder -> page) || !is_numeric($this -> holder -> page) ? 1 : $this -> holder -> page;
...@@ -75,12 +71,11 @@ class UserTransactions extends OpenAPIAbstraction { ...@@ -75,12 +71,11 @@ class UserTransactions extends OpenAPIAbstraction {
$start = ($currentPage - 1) * VAR_DEFAULT_PAGE_COUNT; $start = ($currentPage - 1) * VAR_DEFAULT_PAGE_COUNT;
$params[3] = "LIMIT {$start}, ".VAR_DEFAULT_PAGE_COUNT; $params[3] = "DESC LIMIT {$start}, ".VAR_DEFAULT_PAGE_COUNT;
$list = $this -> accessSelect('LIST_USER_TRANSACTION', $params); $list = $this -> accessSelect('LIST_USER_TRANSACTION', $params);
$start = ($currentPage - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT; $start = ($currentPage - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$end = $currentPage * VAR_DEFAULT_PAGE_COUNT;
$result = [ $result = [
"row_count" => $countTransactions["overall_total"], "row_count" => $countTransactions["overall_total"],
...@@ -142,29 +137,6 @@ class UserTransactions extends OpenAPIAbstraction { ...@@ -142,29 +137,6 @@ class UserTransactions extends OpenAPIAbstraction {
return $rtn; return $rtn;
} }
public function getWhereCount(){
// 変数宣言部
$params = array();
$rtn = NO_STRING;
// 日付指定(from)
if($this -> holder -> dateFrom != NO_STRING) {
$params[] = ' create_time >= (\')' . $this -> holder -> dateFrom . '(\')';
}
// 日付指定(to)
if($this -> holder -> dateTo != NO_STRING) {
$params[] = ' create_time < DATE_ADD((\')' . $this -> holder -> dateTo . '(\'), INTERVAL 1 DAY)';
}
// データが存在した場合
if($this -> isLoopData($params)) {
$rtn = DELIMIT_AND . implode(DELIMIT_AND, $params);
}
return $rtn;
}
private function statusIndication(&$row){ private function statusIndication(&$row){
if($this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_1) { // 入金 if($this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_1) { // 入金
$row['type'] = VAL_STR_DEPOSIT; $row['type'] = VAL_STR_DEPOSIT;
......
...@@ -35,6 +35,8 @@ include_once('template/base_head.php'); ...@@ -35,6 +35,8 @@ include_once('template/base_head.php');
<?php <?php
} }
?> ?>
<br/>
<span class="hidediv" id="exp_progress">Exporting File...</span>
</div> </div>
<table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint"> <table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint">
<tr> <tr>
...@@ -66,6 +68,10 @@ include_once('template/base_head.php'); ...@@ -66,6 +68,10 @@ include_once('template/base_head.php');
<input type="button" id="dispPage" value="Display" class="btn bg-filter mb10"> <input type="button" id="dispPage" value="Display" class="btn bg-filter mb10">
</div> </div>
</form> </form>
<div class="hidediv">
<?php $this -> echoJavascriptLabels() ?>
</div>
</article> </article>
</div> </div>
</div> </div>
......
...@@ -28,6 +28,15 @@ include_once('template/base_head.php'); ...@@ -28,6 +28,15 @@ include_once('template/base_head.php');
<div class="filterPe"><span> - </span><input type="text" id="to" name="to" value="<?php $this -> echoTo();?>" class="px130 datepicker"></div> <div class="filterPe"><span> - </span><input type="text" id="to" name="to" value="<?php $this -> echoTo();?>" class="px130 datepicker"></div>
<div class="filterB"> <div class="filterB">
<input type="button" id="btnSearch" value="Cari" class="btn bg-filter"> <input type="button" id="btnSearch" value="Cari" class="btn bg-filter">
<?php
if($this -> getAccountType() == "1"){
?>
<input type="button" id="btnExport" value="Ekspor" class="btn bg-filter mb10">
<?php
}
?>
<br/>
<span class="hidediv" id="exp_progress">Mengekspor File...</span>
</div> </div>
<table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint"> <table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint">
<tr> <tr>
...@@ -59,6 +68,10 @@ include_once('template/base_head.php'); ...@@ -59,6 +68,10 @@ include_once('template/base_head.php');
<input type="button" id="dispPage" value="Tampilan" class="btn bg-filter mb10"> <input type="button" id="dispPage" value="Tampilan" class="btn bg-filter mb10">
</div> </div>
</form> </form>
<div class="hidediv">
<?php $this -> echoJavascriptLabels() ?>
</div>
</article> </article>
</div> </div>
</div> </div>
......
...@@ -35,6 +35,8 @@ include_once('template/base_head.php'); ...@@ -35,6 +35,8 @@ include_once('template/base_head.php');
<?php <?php
} }
?> ?>
<br/>
<span class="hidediv" id="exp_progress">ファイルをエクスポート中</span>
</div> </div>
<table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint"> <table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint">
<tr> <tr>
...@@ -66,6 +68,10 @@ include_once('template/base_head.php'); ...@@ -66,6 +68,10 @@ include_once('template/base_head.php');
<input type="button" id="dispPage" value="表示" class="btn bg-filter mb10"> <input type="button" id="dispPage" value="表示" class="btn bg-filter mb10">
</div> </div>
</form> </form>
<div class="hidediv">
<?php $this -> echoJavascriptLabels() ?>
</div>
</article> </article>
</div> </div>
</div> </div>
......
...@@ -66,11 +66,6 @@ $(function() { ...@@ -66,11 +66,6 @@ $(function() {
submitForm(); submitForm();
}); });
$('#btnExport').click(function() {
$('#type').val('export_common');
submitForm();
});
$('#from').datepicker({ $('#from').datepicker({
// カレンダーの設定 // カレンダーの設定
dateFormat : 'yy/mm/dd' dateFormat : 'yy/mm/dd'
...@@ -88,4 +83,226 @@ $(function() { ...@@ -88,4 +83,226 @@ $(function() {
if($('#to').val() == '') { if($('#to').val() == '') {
$('#to:text').datepicker().datepicker('setDate','today'); $('#to:text').datepicker().datepicker('setDate','today');
} }
});
$('#btnExport').click(function() {
var rows = [
[
$("#headId").val().trim(),
$("#headTransactionType").val().trim(),
$("#headUserAccount").val().trim(),
$("#headUserAccountName").val().trim(),
$("#headMoneyIn").val().trim(),
$("#headMoneyOut").val().trim(),
$("#headCurrency").val().trim(),
$("#headFee").val().trim(),
$("#headSubmissionRequested").val().trim(),
$("#headOperationDate").val().trim(),
$("#headReferenceNumber").val().trim(),
$("#headMessage").val().trim(),
$("#headStatus").val().trim(),
$("#headBalance").val().trim()
]
];
$("#exp_progress").show()
$("#btnSearch").prop({ "disabled" : true })
$("#btnExport").prop({ "disabled" : true })
$("#from").prop({ "disabled" : true })
$("#to").prop({ "disabled" : true })
recursiveFetch({
"page" : 1,
"build" : function(result, startRow){
result.forEach(function(item, index){
item = readableTransactionType(item);
item["id"] = startRow + index;
item["process_status"] = showTransactionOrigin(item["process_status"]);
item["account_number"] = item["account_number"].replace(/(<([^>]+)>)/ig, '')
rows.push([
item["id"],
item["transaction_type"],
item["account_number"],
item["account_name"],
item["deposit_amount"].replace(/,/g, ""),
item["withdraw_amount"].replace(/,/g, ""),
item["currency"],
item["fee"].replace(/,/g, ""),
item["transaction_time_string"],
item["process_time_string"],
item["transaction_number"],
item["message"],
item["status"],
item["balance"].replace(/,/g, "")
])
})
},
"release" : function(){
$("#exp_progress").hide()
$("#btnSearch").prop({ "disabled" : false })
$("#btnExport").prop({ "disabled" : false })
$("#from").prop({ "disabled" : false })
$("#to").prop({ "disabled" : false })
createHyperlinkDownload(rows)
}
})
})
})
function simpleDateFormat(d){
let ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(d);
let mo = new Intl.DateTimeFormat('en', { month: '2-digit' }).format(d);
let da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(d);
var formattedDate = `${ye}${mo}${da}`;
return formattedDate;
}
function createHyperlinkDownload(rows){
let csvContent = "data:text/csv;charset=utf-8,";
rows.forEach(function(rowArray) {
let row = rowArray.join(",");
csvContent += "\ufeff" + row + "\r\n";
});
var encodedUri = encodeURI(csvContent);
var formattedDates = simpleDateFormat(new Date($("#from").val()))+
"-"+simpleDateFormat(new Date($("#to").val()));
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "Transaction_List_"+formattedDates+"_"+$("select[name=currency]").val()+".csv");
document.body.appendChild(link); // Required for FF
link.click();
}
function recursiveFetch(prop){
let fd = searchFormData()
fd.page = prop.page;
pullTxns(fd, {
"exporting" : true,
"build" : function(result, pageTotal, startRow){
if(typeof prop.build !== 'undefined')
prop.build(result, startRow)
if(prop.page < pageTotal){
prop.page = prop.page + 1;
recursiveFetch(prop)
}else
prop.release()
}
})
}
function searchFormData(){
return {
"cur" : $("select[name=currency]").val(),
"from" : $("#from").val(),
"to" : $("#to").val(),
"page" : 1
}
}
function readableTransactionType(txn){
if(txn["transaction_type"] === '1'){
txn["transaction_type"] = $("#depositIndicator").val();
txn["status"] = $("#statusComplete").val();
}else if(txn["transaction_type"] === '2' && txn["type"] == '0'){
txn["transaction_type"] = $("#withdrawIndicator").val()+" ("+showWithdrawalStatus(txn["status"])+")";
txn["status"] = showWithdrawalStatus(txn["status"]);
}else if(txn["transaction_type"] === '2' && txn["type"] == '1'){
txn["transaction_type"] = $("#feeIndicator").val();
txn["status"] = $("#statusComplete").val();
txn["message"] = $("#monthlyFeeIndicator").val();
}else if(txn["transaction_type"] === '2' && txn["type"] == '3'){
txn["transaction_type"] = $("#cardDepositIndicator").val();
txn["status"] = $("statusComplete").val();
}else if(txn["transaction_type"] === '3' || txn["transaction_type"] === '4'){
txn["transaction_type"] = $("#exchangeIndicator").val();
txn["status"] = $("#statusComplete").val();
}else if(txn["transaction_type"] === '5' || txn["transaction_type"] === '6'){
txn["transaction_type"] = $("#internalTransfer").val();
txn["status"] = $("#statusComplete").val();
}else if(txn["transaction_type"] === '7' || txn["transaction_type"] === '8'){
txn["transaction_type"] = $("#requestIndicator").val();
txn["status"] = $("#statusComplete").val();
}else if(txn["transaction_type"] === '9' || txn["transaction_type"] === '10' || txn["transaction_type"] === '11' || txn["transaction_type"] === '12'){
txn["transaction_type"] = $("#withdrawIndicator").val()+" ("+showWithdrawalStatus(txn["status"])+")";
txn["status"] = $("#statusComplete").val();
}else if(txn["transaction_type"] === '11' && txn["status"] == '2'){
txn["transaction_type"] = $("#feeIndicator").val();
txn["status"] = $("#statusComplete").val();
txn["message"] = $("#dormantFeeIndicator").val();
}
return txn;
}
function showWithdrawalStatus(status){
const withdrawalStatus = [
$("#statusApply").val(),
$("#statusRemittanceAccepted").val(),
$("#statusRemittanceAlready").val(),
$("#statusDeficiencyChecking").val(),
$("#statusRefund").val(),
$("#statusCancellation").val(),
$("#statusCancel").val()
]
var transactionStatus;
withdrawalStatus.forEach(function(item, index){
if(status == index)
transactionStatus = item;
})
return transactionStatus;
}
function showTransactionOrigin(type){
var origin;
switch(type){
case '0':
origin = "User";
break;
case '1':
origin = "Admin";
break;
case '2':
origin = "API";
break;
case '3':
origin = "Batch";
break;
}
return origin;
}
function pullTxns(formData, config){
$.ajax({
"url" : "../api/userTransaction.php",
"type" : "POST",
"dataType" : "json",
"data" : formData,
"beforeSend" : function(){
},
"complete" : function(){
},
"error" : function(data){
alert("Something Wrong Happened")
}
}).done(function(data){
if(typeof config !== 'undefined')
config.build(data.result, data["page_total"], data["start_row"])
})
}
...@@ -30,11 +30,6 @@ class LogicHistory extends HistoryModelClass { ...@@ -30,11 +30,6 @@ class LogicHistory extends HistoryModelClass {
$this -> init(); $this -> init();
$this -> lists(); $this -> lists();
if($this -> getType() == TYPE_EXPORT_COMMON) { // エクスポート(共通)
$this -> export();
}
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }
...@@ -46,11 +41,9 @@ class LogicHistory extends HistoryModelClass { ...@@ -46,11 +41,9 @@ class LogicHistory extends HistoryModelClass {
* @return : なし * @return : なし
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
private function lists() { private function lists() {
$countRow = $this -> getRowData($this -> accessSelect('SELECT_USER_TRANSACTION_COUNT', [ $userAccountArray = $this -> getUserAccountData();
$this -> getUserData(PARAM_USER_ACCOUNT),
$this -> getCurrency(), $countRow = $this -> getRowData($this -> accessSelect('SELECT_USER_TRANSACTION_ADMIN_COUNT', $userAccountArray));
$this -> getWhereCount()
]));
$totalRows = $this -> getColumnData($countRow, "overall_total"); $totalRows = $this -> getColumnData($countRow, "overall_total");
...@@ -59,8 +52,7 @@ class LogicHistory extends HistoryModelClass { ...@@ -59,8 +52,7 @@ class LogicHistory extends HistoryModelClass {
$this -> setTotal($totalRows); $this -> setTotal($totalRows);
$this -> setTotalPage($this -> getTotalPageCommon($this -> getHistoryDefaultLimitCount(), $totalRows)); $this -> setTotalPage($this -> getTotalPageCommon($this -> getHistoryDefaultLimitCount(), $totalRows));
$userAccountArray = $this -> getUserAccountData(); $userAccountArray[3] = "DESC LIMIT {$start}, {$this -> getHistoryDefaultLimitCount()}";
$userAccountArray[3] = "LIMIT {$start}, {$this -> getHistoryDefaultLimitCount()}";
$this -> setResult($this -> accessSelect('LIST_USER_TRANSACTION', $userAccountArray)); $this -> setResult($this -> accessSelect('LIST_USER_TRANSACTION', $userAccountArray));
$this -> setBalance($this -> accessSelect('LIST_USER_BALANCE_FROM_CURRENCY_DATE', $this -> getBalanceParams())); $this -> setBalance($this -> accessSelect('LIST_USER_BALANCE_FROM_CURRENCY_DATE', $this -> getBalanceParams()));
...@@ -74,16 +66,5 @@ class LogicHistory extends HistoryModelClass { ...@@ -74,16 +66,5 @@ class LogicHistory extends HistoryModelClass {
function getDisplay() { function getDisplay() {
return $this -> htmlStr; return $this -> htmlStr;
} }
/*-------------------------------------------------------------------------
* @function_name: 失敗ファイルのエクスポート
* @parameter : なし
* @return : なし
-------------------------------------------------------------------------*/
function export() {
// データの作成
$this -> makeExportData();
}
} }
?> ?>
\ No newline at end of file
...@@ -10,7 +10,6 @@ class HistoryModelClass extends ModelClassEx { ...@@ -10,7 +10,6 @@ class HistoryModelClass extends ModelClassEx {
private $from = NO_STRING; // 期間開始 private $from = NO_STRING; // 期間開始
private $to = NO_STRING; // 期間終了 private $to = NO_STRING; // 期間終了
private $accountType = NO_STRING; // account type attribute (string). created by joshua dino private $accountType = NO_STRING; // account type attribute (string). created by joshua dino
private $csvData = NO_STRING; // data attribute (string). created by joshua dino
private $total = NO_STRING; private $total = NO_STRING;
private $page = NO_STRING; private $page = NO_STRING;
...@@ -117,29 +116,6 @@ class HistoryModelClass extends ModelClassEx { ...@@ -117,29 +116,6 @@ class HistoryModelClass extends ModelClassEx {
return $rtn; return $rtn;
} }
public function getWhereCount(){
// 変数宣言部
$params = array();
$rtn = NO_STRING;
// 日付指定(from)
if($this -> from != NO_STRING) {
$params[] = ' create_time >= (\')' . $this -> from . '(\')';
}
// 日付指定(to)
if($this -> to != NO_STRING) {
$params[] = ' create_time < DATE_ADD((\')' . $this -> to . '(\'), INTERVAL 1 DAY)';
}
// データが存在した場合
if($this -> isLoopData($params)) {
$rtn = DELIMIT_AND . implode(DELIMIT_AND, $params);
}
return $rtn;
}
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* @function_name: サーバ側データチェック * @function_name: サーバ側データチェック
* @parameter : なし * @parameter : なし
...@@ -210,13 +186,11 @@ class HistoryModelClass extends ModelClassEx { ...@@ -210,13 +186,11 @@ class HistoryModelClass extends ModelClassEx {
$dAmount = NO_STRING; $dAmount = NO_STRING;
$currency = NO_STRING; $currency = NO_STRING;
$total = NO_COUNT; $total = NO_COUNT;
$exchange = null;
$balanceCurrency = NO_STRING; $balanceCurrency = NO_STRING;
$dispTotal = NO_STRING; $dispTotal = NO_STRING;
$account = NO_STRING; $account = NO_STRING;
$accountName = NO_STRING; $accountName = NO_STRING;
$no = NO_COUNT; $no = NO_COUNT;
$balance = NO_COUNT;
$thousand = NO_STRING; $thousand = NO_STRING;
$data = NO_STRING; //string variable for export data - added by Joshua Dino 04/23/2018 $data = NO_STRING; //string variable for export data - added by Joshua Dino 04/23/2018
...@@ -256,6 +230,8 @@ class HistoryModelClass extends ModelClassEx { ...@@ -256,6 +230,8 @@ class HistoryModelClass extends ModelClassEx {
$no = $pageRowCount; $no = $pageRowCount;
$counter = $no; //counter for id number - added by Joshua Dino 04/23/2018 $counter = $no; //counter for id number - added by Joshua Dino 04/23/2018
$this -> rs = array_reverse($this -> rs, true);
// データの数だけループを回す // データの数だけループを回す
foreach($this -> rs as $row) { foreach($this -> rs as $row) {
// 初期化 // 初期化
...@@ -266,7 +242,6 @@ class HistoryModelClass extends ModelClassEx { ...@@ -266,7 +242,6 @@ class HistoryModelClass extends ModelClassEx {
$fee = NO_STRING; $fee = NO_STRING;
$account = NO_STRING; $account = NO_STRING;
$accountName = NO_STRING; $accountName = NO_STRING;
$historyList = array(); //array for historyList - added by Joshua Dino 04/23/2018
//***************************set values*******************************// //***************************set values*******************************//
if(intval($this -> getColumnData($row, COLUMN_ACCOUNT_NUMBER)) > NO_COUNT) { if(intval($this -> getColumnData($row, COLUMN_ACCOUNT_NUMBER)) > NO_COUNT) {
...@@ -450,24 +425,6 @@ class HistoryModelClass extends ModelClassEx { ...@@ -450,24 +425,6 @@ class HistoryModelClass extends ModelClassEx {
. '<td class="r">' . $dispTotal . '</td>' . '<td class="r">' . $dispTotal . '</td>'
. '</tr>' . '</tr>'
. $rtn; . $rtn;
//push history values into historyList array
array_push($historyList, $counter--);
array_push($historyList, $tType);
array_push($historyList, $account);
array_push($historyList, $accountName);
array_push($historyList, $dAmount);
array_push($historyList, $wAmount);
array_push($historyList, $currency);
array_push($historyList, $fee);
array_push($historyList, $this -> getColumnData($row, COLUMN_TRANSACTION_TIME_STRING));
array_push($historyList, $this -> getColumnData($row, COLUMN_PROCESS_TIME_STRINTG));
array_push($historyList, $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER));
array_push($historyList, $this -> getColumnData($row, COLUMN_MESSAGE));
array_push($historyList, $dStatus);
array_push($historyList, $dispTotal);
$data = '"'. implode('"' . DELIMIT_COMMA . '"', $historyList) . '"' . "\n" . $data;
} }
} else { } else {
...@@ -509,7 +466,7 @@ class HistoryModelClass extends ModelClassEx { ...@@ -509,7 +466,7 @@ class HistoryModelClass extends ModelClassEx {
} }
function getHistoryDefaultLimitCount(){ function getHistoryDefaultLimitCount(){
return VAL_INT_10; return VAL_INT_20;
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -600,25 +557,57 @@ class HistoryModelClass extends ModelClassEx { ...@@ -600,25 +557,57 @@ class HistoryModelClass extends ModelClassEx {
return $this -> accountType; return $this -> accountType;
} }
/*------------------------------------------------------------------------- public function echoJavascriptLabels(){
* @function_name: エクスポートデータの作成 $labels = [
* @parameter : なし "progressIndicator" => VAL_STR_LOADING_TRANSACTIONS,
* @return : なし "internalTransfer" => VAL_STR_TRANSFER,
-------------------------------------------------------------------------*/ "internalTransferTrash" => VAL_STR_TRANSFER_TRASH,
function makeExportData() { "depositIndicator" => VAL_STR_DEPOSIT,
"exchangeIndicator" => VAL_STR_EXCHANGE,
// 変数宣言部 "requestIndicator" => VAL_STR_REQUEST,
$data = NO_STRING; "withdrawIndicator" => VAL_STR_WITHDARAW,
"feeIndicator" => VAL_STR_FEE,
$this -> csvData = $this -> echoList(); "noResultsFound" => $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()),
"dormantFeeIndicator" => VAL_STR_DOMANT_FEE,
$data = VAL_STR_HEADER_ID . ',' . VAL_STR_HEADER_TRANSACTION_TYPE . ',' . VAL_STR_USER_ACCOUNT . ',' . VAL_STR_HEADER_ACCOUNT_NAME . ',' . VAL_STR_HEADER_MONEY_IN . ',' . VAL_STR_HEADER_MONEY_OUT . ',' . VAL_STR_CURRENCY . ',' . VAL_STR_FEE . ',' . VAL_STR_HEADER_SUBMISSION_DATE . ',' . VAL_STR_HEADER_OPERATION_DATE . "monthlyFeeIndicator" => VAL_STR_MONTHLY_FEE,
',' . VAL_STR_HEADER_REF_NO . ',' . VAL_STR_MESSAGE . ',' . VAL_STR_STATUS . ',' . VAL_STR_HEADER_BALANCE . "\n"; "cardDepositIndicator" => VAL_STR_CARD_DEPOSIT,
$data .= $this -> csvData; "headId" => VAL_STR_HEADER_ID,
"headTransactionType" => VAL_STR_HEADER_TRANSACTION_TYPE,
// 共通項目へデータをセット "headUserAccount" => VAL_STR_USER_ACCOUNT,
$this -> setExportDataCommon($data); "headUserAccountName" => VAL_STR_HEADER_ACCOUNT_NAME,
"headMoneyIn" => VAL_STR_HEADER_MONEY_IN,
"headMoneyOut" => VAL_STR_HEADER_MONEY_OUT,
"headCurrency" => VAL_STR_CURRENCY,
"headFee" => VAL_STR_FEE,
"headSubmissionRequested" => VAL_STR_HEADER_SUBMISSION_DATE,
"headOperationDate" => VAL_STR_HEADER_OPERATION_DATE,
"headReferenceNumber" => VAL_STR_HEADER_REF_NO,
"headMessage" => VAL_STR_MESSAGE,
"headStatus" => VAL_STR_STATUS,
"headBalance" => VAL_STR_HEADER_BALANCE,
"statusApply" => VAL_STR_APPLY,
"statusRemittanceAccepted" => VAL_STR_REMITTANCE_ACCEPTED,
"statusRemittanceAlready" => VAL_STR_REMITTANCE_ALREADY,
"statusDeficiencyChecking" => VAL_STR_DEFICIENCIES_CHECKING,
"statusRefund" => VAL_STR_REFUND,
"statusCancellation" => VAL_STR_CANCELLATION,
"statusCancel" => VAL_STR_CANCEL,
"statusComplete" => VAL_STR_STATUS_COMP
];
$labelBuilder = NO_STRING;
foreach($labels as $key => $label){
$labelBuilder .= "\t<input type=\"hidden\" id=\"{$key}\" value=\"{$label}\"/>\n";
}
echo <<<HTMLSTRING
<span class="hidediv js-labels">
{$labelBuilder}
</span>
HTMLSTRING;
} }
} }
......
...@@ -35,6 +35,8 @@ include_once('template/base_head.php'); ...@@ -35,6 +35,8 @@ include_once('template/base_head.php');
<?php <?php
} }
?> ?>
<br/>
<span class="hidediv" id="exp_progress">汇出档案</span>
</div> </div>
<table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint"> <table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint">
<tr> <tr>
...@@ -66,6 +68,10 @@ include_once('template/base_head.php'); ...@@ -66,6 +68,10 @@ include_once('template/base_head.php');
<input type="button" id="dispPage" value="表示" class="btn bg-filter mb10"> <input type="button" id="dispPage" value="表示" class="btn bg-filter mb10">
</div> </div>
</form> </form>
<div class="hidediv">
<?php $this -> echoJavascriptLabels() ?>
</div>
</article> </article>
</div> </div>
</div> </div>
......
...@@ -225,6 +225,16 @@ define('VAL_GPS_DEPOSIT_INVOICE_NAME_MASTER', 'PAYBYGIFTCARD'); ...@@ -225,6 +225,16 @@ define('VAL_GPS_DEPOSIT_INVOICE_NAME_MASTER', 'PAYBYGIFTCARD');
define('VAL_GPS_DEPOSIT_INVOICE_NAME_BANK', 'Pengumpulan Global'); define('VAL_GPS_DEPOSIT_INVOICE_NAME_BANK', 'Pengumpulan Global');
define('VAL_STR_CUSTOMER', 'Pelanggan'); define('VAL_STR_CUSTOMER', 'Pelanggan');
define('VAL_STR_HEADER_ID', 'Id');
define('VAL_STR_HEADER_TRANSACTION_TYPE','Jenis Transaksi');
define('VAL_STR_HEADER_ACCOUNT_NAME','Nama Akun');
define('VAL_STR_HEADER_MONEY_IN','Uang Masuk');
define('VAL_STR_HEADER_MONEY_OUT','Uang Keluar');
define('VAL_STR_HEADER_SUBMISSION_DATE','Tanggal Pengajuan');
define('VAL_STR_HEADER_OPERATION_DATE','Tanggal Pengerjaan');
define('VAL_STR_HEADER_REF_NO','No. Referensi');
define('VAL_STR_HEADER_BALANCE','Saldo');
//deposit list //deposit list
define('VAL_STR_VOUCHER_NAME','Visa melalui Voucher'); define('VAL_STR_VOUCHER_NAME','Visa melalui Voucher');
define('VAL_STR_VOUCHER_LOGO','img/visa.png'); define('VAL_STR_VOUCHER_LOGO','img/visa.png');
......
...@@ -4284,7 +4284,7 @@ WHERE ...@@ -4284,7 +4284,7 @@ WHERE
1 1
__ELEMENT03__ __ELEMENT03__
ORDER BY ORDER BY
transaction_time , msecond cast(transaction_time as datetime)
__ELEMENT04__ __ELEMENT04__
</LIST_USER_TRANSACTION> </LIST_USER_TRANSACTION>
......
...@@ -35,6 +35,8 @@ include_once('template/base_head.php'); ...@@ -35,6 +35,8 @@ include_once('template/base_head.php');
<?php <?php
} }
?> ?>
<br/>
<span class="hidediv" id="exp_progress">匯出檔案</span>
</div> </div>
<table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint"> <table class="table col bdr default odd calign w99p fontXS" id="table-breakpoint">
<tr> <tr>
...@@ -66,6 +68,10 @@ include_once('template/base_head.php'); ...@@ -66,6 +68,10 @@ include_once('template/base_head.php');
<input type="button" id="dispPage" value="顯示" class="btn bg-filter mb10"> <input type="button" id="dispPage" value="顯示" class="btn bg-filter mb10">
</div> </div>
</form> </form>
<div class="hidediv">
<?php $this -> echoJavascriptLabels() ?>
</div>
</article> </article>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment