Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iwl-live
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anthony.Suerte
iwl-live
Commits
73e18b10
Commit
73e18b10
authored
May 10, 2021
by
Anthony.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All Currency Option @ User Transaction [FIRST COMMIT]
parent
cc605885
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
885 additions
and
269 deletions
+885
-269
transaction_history.php
system/api/transaction_history.php
+171
-0
tmp_account_transactions.php
system/en/template/tmp_account_transactions.php
+59
-5
account_transactions.js
system/js/account_transactions.js
+381
-7
literals.php
system/lib/core/literals.php
+5
-0
literals_en.php
system/lib/core/literals_en.php
+5
-0
sql.xml
system/lib/sql.xml
+9
-9
model.php
system/logic/account_list/model.php
+4
-1
logic.php
system/logic/account_transactions/logic.php
+2
-15
model.php
system/logic/account_transactions/model.php
+188
-225
tmp_account_transactions.php
system/template/tmp_account_transactions.php
+61
-7
No files found.
system/api/transaction_history.php
0 → 100644
View file @
73e18b10
<?php
header
(
"Content-type: text/json"
);
include_once
'config.php'
;
class
TransactionHistory
extends
System
{
private
$detailAccount
;
private
$transactionNumber
;
private
$emailAddress
;
private
$userAccount
;
private
$currency
;
private
$transactionType
;
private
$dateFrom
;
private
$dateTo
;
private
$page
;
public
function
__construct
(){
parent
::
__construct
();
$this
->
init
();
}
public
function
init
(){
$this
->
setParameter
();
$this
->
validation
();
}
private
function
setParameter
(){
$this
->
detailAccount
=
$this
->
getDataPost
(
"detailAccount"
);
$this
->
transactionNumber
=
$this
->
getDataPost
(
"txnNum"
);
$this
->
emailAddress
=
$this
->
getDataPost
(
"email"
);
$this
->
userAccount
=
$this
->
getDataPost
(
"userAccount"
);
$this
->
currency
=
$this
->
getDataPost
(
"cur"
);
$this
->
transactionType
=
$this
->
getDataPost
(
"txnType"
);
$this
->
dateFrom
=
$this
->
getDataPost
(
"from"
);
$this
->
dateTo
=
$this
->
getDataPost
(
"to"
);
$this
->
page
=
!
empty
(
$this
->
getDataPost
(
"page"
))
?
$this
->
getDataPost
(
"page"
)
:
1
;
}
private
function
validation
(){
if
(
$_SERVER
[
'REQUEST_METHOD'
]
!=
'POST'
){
die
(
json_encode
([
"error_code"
=>
1
,
"message"
=>
"Invalid Request Method [
{
$_SERVER
[
'REQUEST_METHOD'
]
}
]"
]));
}
}
private
function
getWhere
()
{
$rtn
=
[];
$rtn
[]
=
$this
->
detailAccount
;
$rtn
[]
=
$this
->
currency
;
$whereStr
=
NO_STRING
;
// 取引番号
if
(
$this
->
transactionNumber
!=
NO_STRING
)
{
$whereStr
.=
' AND transaction_number = (\')'
.
$this
->
transactionNumber
.
'(\')'
;
}
// メールアドレス
if
(
$this
->
emailAddress
!=
NO_STRING
)
{
$whereStr
.=
' AND (withdraw_user.mail LIKE (\')%'
.
$this
->
emailAddress
.
'%(\') OR deposit_user.mail LIKE (\')%'
.
$this
->
emailAddress
.
'%(\'))'
;
}
// 口座番号
if
(
$this
->
userAccount
!=
NO_STRING
)
{
$whereStr
.=
' AND (deposit_account_number = (\')'
.
$this
->
userAccount
.
'(\') OR withdraw_account_number = (\')'
.
$this
->
userAccount
.
'(\'))'
;
}
// 開始日
if
(
$this
->
dateFrom
!=
NO_STRING
)
{
$whereStr
.=
' AND transaction_time >= (\')'
.
$this
->
dateFrom
.
'(\')'
;
}
else
{
$whereStr
.=
' AND transaction_time >= (\')'
.
date
(
'Y/m/01'
,
strtotime
(
'-2 month'
))
.
'(\')'
;
}
// 終了日
if
(
$this
->
dateTo
!=
NO_STRING
)
{
$whereStr
.=
' AND transaction_time < DATE_ADD((\')'
.
$this
->
dateTo
.
'(\'), INTERVAL 1 DAY)'
;
}
else
{
$whereStr
.=
' AND transaction_time < DATE_ADD((\')'
.
date
(
'Y/m/d'
)
.
'(\'), INTERVAL 1 DAY)'
;
}
// anton
if
(
$this
->
transactionType
!=
NO_STRING
)
{
switch
(
$this
->
transactionType
){
case
VAL_INT_1
:
$whereStr
.=
' AND transaction_type = (\')1(\')'
;
// 入金
break
;
case
VAL_INT_2
:
$whereStr
.=
' AND (transaction_type IN ((\')9(\'), (\')10(\'), (\')12(\')) OR (transaction_type = (\')2(\') AND type = (\')0(\')))'
;
// 出金
break
;
case
VAL_INT_3
:
$whereStr
.=
' AND transaction_type IN ((\')3(\'), (\')4(\'))'
;
// 通貨両替
break
;
case
VAL_INT_4
:
$whereStr
.=
' AND (transaction_type IN ((\')5(\'), (\')6(\')) OR (transaction_type = (\')2(\') AND type = (\')3(\')))'
;
// 口座振替
break
;
case
VAL_INT_5
:
$whereStr
.=
' AND transaction_type IN ((\')7(\'), (\')8(\'))'
;
// 引き落し
break
;
case
VAL_INT_6
:
$whereStr
.=
' AND (transaction_type = (\')11(\') OR trans.type = (\')1(\'))'
;
// 引き落し
break
;
}
}
$rtn
[]
=
$whereStr
;
return
$rtn
;
}
public
function
result
(){
$startTime
=
microtime
(
true
);
$where
=
$this
->
getWhere
();
$defaultPageCount
=
VAR_DEFAULT_PAGE_COUNT
;
$rowCount
=
$this
->
getColumnData
(
$this
->
getRowData
(
$this
->
accessSelect
(
'SELECT_USER_TRANSACTION_ADMIN_COUNT'
,
$where
),
0
),
"overall_total"
);
$start
=
(
$this
->
page
-
VAL_INT_1
)
*
$defaultPageCount
;
$where
[]
=
" LIMIT
{
$start
}
,
{
$defaultPageCount
}
"
;
$totalPage
=
$this
->
getTotalPageCommon
(
$defaultPageCount
,
$rowCount
);
$fetched
=
$this
->
accessSelect
(
'LIST_USER_TRANSACTION_ADMIN'
,
$where
);
if
(
$this
->
isLoopData
(
$fetched
)){
foreach
(
$fetched
as
&
$data
){
if
(
$this
->
getColumnData
(
$data
,
COLUMN_DEPOSIT_AMOUNT
)
!=
NO_STRING
)
{
$data
[
COLUMN_DEPOSIT_AMOUNT
]
=
$this
->
formatCurrency
(
floatval
(
$this
->
getColumnData
(
$data
,
COLUMN_DEPOSIT_AMOUNT
)),
$this
->
currency
);
}
if
((
strlen
(
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NUMBER
)
>
0
))){
$data
[
COLUMN_ACCOUNT_NUMBER
]
=
'<a href="account_edit?detail_account='
.
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NUMBER
)
.
'">'
.
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NUMBER
)
.
'</a>'
;
}
if
(
$this
->
getColumnData
(
$data
,
COLUMN_WITHDRAW_AMOUNT
)
!=
NO_STRING
)
{
$data
[
COLUMN_WITHDRAW_AMOUNT
]
=
$this
->
formatCurrency
(
floatval
(
$this
->
getColumnData
(
$data
,
COLUMN_WITHDRAW_AMOUNT
)),
$this
->
currency
);
}
$data
[
COLUMN_FEE
]
=
$this
->
formatCurrency
(
$this
->
getColumnData
(
$data
,
COLUMN_FEE
),
$this
->
currency
);
$data
[
COLUMN_MESSAGE
]
=
(
$this
->
getColumnData
(
$data
,
COLUMN_MESSAGE
)
!=
NULL
)
?
$this
->
getColumnData
(
$data
,
COLUMN_MESSAGE
)
:
$this
->
getColumnData
(
$data
,
COLUMN_METHOD
);
$data
[
COLUMN_BALANCE
]
=
$this
->
formatCurrency
(
$this
->
getColumnData
(
$data
,
COLUMN_BALANCE
),
$this
->
currency
);
}
}
$result
=
[
"row_count"
=>
$rowCount
,
"total_page"
=>
$totalPage
,
"current_page"
=>
$this
->
page
,
"start_row"
=>
$start
+
1
,
"elapsed_time"
=>
(
microtime
(
true
)
-
$startTime
),
"result"
=>
$fetched
,
];
echo
json_encode
(
$result
);
}
}
$txn
=
new
TransactionHistory
();
$txn
->
result
();
system/en/template/tmp_account_transactions.php
View file @
73e18b10
...
...
@@ -14,6 +14,56 @@ include_once('template/base_head.php');
<input
type=
"button"
id=
"btnSearch"
value=
"Search"
class=
"btn bg-default px50 hi22"
>
</div>
</div>
<table
class=
"conditions fontS w100p"
>
<colgroup>
<col
class=
"w50p"
>
<col
class=
"w50p"
>
</colgroup>
<tr>
<td>
Account Name:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"account_name"
)
?>
</strong></td>
</tr>
<tr>
<td>
Username:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"user_name"
)
?>
</strong></td>
</tr>
<tr>
<td>
Date of Birth:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"birth_string"
)
?>
</strong></td>
</tr>
<tr>
<td>
Account Type:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"account_type"
)
?>
</strong></td>
</tr>
<tr>
<td>
Account Status:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"status"
)
?>
</strong></td>
</tr>
<tr>
<td>
KYC Status:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"kyc_validate_status"
)
?>
</strong></td>
</tr>
<tr>
<td>
Risk Level:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"risk_level"
)
?>
</strong></td>
</tr>
<tr>
<td>
Tier Level:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"tier_level"
)
?>
</strong></td>
</tr>
<tr>
<td>
Remarks
</td>
<td><i>
<?php
$this
->
echoAccountInfo
(
"note"
)
?>
</i></td>
</tr>
<tr>
<td>
Risk Remarks
</td>
<td><i>
<?php
$this
->
echoAccountInfo
(
"risk"
)
?>
</i></td>
</tr>
</table>
<hr/>
<table
class=
"conditions fontS w100p"
>
<colgroup>
<col
class=
"w50p"
>
...
...
@@ -35,6 +85,7 @@ include_once('template/base_head.php');
<th>
Currency Type
</th>
<td>
<select
id=
"s_currency"
name=
"s_currency"
class=
"w100p"
>
<option
value=
""
>
--- All ---
</option>
<?php
$this
->
echoCurrencyList
();
?>
</select>
</td>
...
...
@@ -63,6 +114,10 @@ include_once('template/base_head.php');
<input
type=
"button"
id=
"btnBack"
value=
"Back"
class=
"btn bg-grad hi25 px100"
>
</p>
<input
type=
"hidden"
value=
""
id=
"s_type"
name=
"type"
/>
<span
style=
"display:none;"
id=
"file_exporter_prog"
>
Exporting File...
</span>
</form>
</aside>
...
...
@@ -72,12 +127,11 @@ include_once('template/base_head.php');
<article>
<div
class=
"article-heading"
>
<h2>
<?php
echo
$page_title
;
?>
[
<?php
$this
->
echoDetailAccount
();
?>
]
</h2>
<?php
$this
->
dispPager
();
?>
</div>
<?php
$this
->
echoList
()
?>
<div
class=
"article-bottom"
>
<?php
$this
->
dispPager
();
?>
</div>
<?php
echo
$this
->
echoTransactionTables
()
?>
<?php
echo
$this
->
echoJavascriptLabels
()
?>
</article>
</div>
</div>
...
...
system/js/account_transactions.js
View file @
73e18b10
...
...
@@ -4,11 +4,6 @@ $(function(){
submitForm
(
'
searchForm
'
);
});
$
(
"
#btnExport
"
).
click
(
function
()
{
$
(
'
#s_type
'
).
val
(
'
export
'
);
submitForm
(
'
searchForm
'
);
});
$
(
"
#btnBack
"
).
click
(
function
(){
var
currentUrl
=
window
.
location
.
href
;
var
modifiedBase
=
currentUrl
.
substring
(
0
,
currentUrl
.
lastIndexOf
(
"
/
"
)
+
1
)
...
...
@@ -78,4 +73,383 @@ $(function(){
}
else
{
$
(
'
#s_to:text
'
).
datepicker
().
datepicker
(
'
setDate
'
,
setSto
);
}
$
(
"
.cur-table
"
).
each
(
function
(
i
,
e
){
var
fd
=
searchFormData
()
fd
.
cur
=
$
(
this
).
find
(
"
[type=hidden]
"
).
val
()
$
(
"
#prev_
"
+
fd
.
cur
).
click
(
function
(
e
){
paginate
(
"
prev
"
,
$
(
this
).
attr
(
"
focused-cur
"
))
})
$
(
"
#next_
"
+
fd
.
cur
).
click
(
function
(
e
){
paginate
(
"
next
"
,
$
(
this
).
attr
(
"
focused-cur
"
))
})
$
(
"
#express_
"
+
fd
.
cur
).
click
(
function
(
e
){
paginate
(
"
express
"
,
$
(
this
).
attr
(
"
focused-cur
"
))
})
pullTxns
(
fd
,
{
"
tableBody
"
:
$
(
"
#transaction_body_
"
+
fd
.
cur
)
})
})
$
(
"
#btnExport
"
).
click
(
function
()
{
var
rows
=
[
[
$
(
"
#headTransactionType
"
).
val
().
trim
(),
$
(
"
#headUserAccount
"
).
val
().
trim
(),
$
(
"
#headUserAccountName
"
).
val
().
trim
(),
$
(
"
#headCurrency
"
).
val
().
trim
(),
$
(
"
#headDepositAmount
"
).
val
().
trim
(),
$
(
"
#headWithdrawalAmount
"
).
val
().
trim
(),
$
(
"
#headFee
"
).
val
().
trim
(),
$
(
"
#headDateRequested
"
).
val
().
trim
(),
$
(
"
#headProcessngDate
"
).
val
().
trim
(),
$
(
"
#headTransactionNumber
"
).
val
().
trim
(),
$
(
"
#headMessage
"
).
val
().
trim
(),
$
(
"
#headType
"
).
val
().
trim
(),
$
(
"
#headCurrentStatus
"
).
val
().
trim
(),
$
(
"
#headBalance
"
).
val
().
trim
()
]
];
$
(
"
#file_exporter_prog
"
).
show
()
recursiveFetch
({
"
start
"
:
0
,
"
page
"
:
1
,
"
build
"
:
function
(
result
){
result
.
forEach
(
function
(
item
,
index
){
item
=
readableTransactionType
(
item
);
item
[
"
process_status
"
]
=
showTransactionOrigin
(
item
[
"
process_status
"
]);
item
[
"
account_number
"
]
=
item
[
"
account_number
"
].
replace
(
/
(
<
([^
>
]
+
)
>
)
/ig
,
''
)
rows
.
push
([
item
[
"
transaction_type
"
],
item
[
"
account_number
"
],
item
[
"
account_name
"
],
item
[
"
currency
"
],
item
[
"
deposit_amount
"
].
replace
(
/,/g
,
""
),
item
[
"
withdraw_amount
"
].
replace
(
/,/g
,
""
),
item
[
"
fee
"
].
replace
(
/,/g
,
""
),
item
[
"
transaction_time_string
"
],
item
[
"
process_time_string
"
],
item
[
"
transaction_number
"
],
item
[
"
message
"
],
item
[
"
type
"
],
item
[
"
process_status
"
],
item
[
"
balance
"
].
replace
(
/,/g
,
""
)
])
})
},
"
release
"
:
function
(){
$
(
"
#file_exporter_prog
"
).
hide
()
createHyperlinkDownload
(
rows
)
}
})
});
})
function
recursiveFetch
(
prop
){
let
currencies
=
[];
$
(
"
.cur-table
"
).
each
(
function
(
i
,
e
){
currencies
.
push
(
$
(
this
).
find
(
"
[type=hidden]
"
).
val
())
})
if
(
currencies
.
length
!=
0
){
var
fd
=
searchFormData
();
fd
.
cur
=
currencies
[
prop
.
start
];
fd
.
page
=
prop
.
page
;
let
totalPage
=
$
(
"
#total_page_
"
+
fd
.
cur
).
val
()
pullTxns
(
fd
,
{
"
exporting
"
:
true
,
"
build
"
:
function
(
result
){
if
(
typeof
prop
.
build
!==
'
undefined
'
)
prop
.
build
(
result
)
if
(
totalPage
>
prop
.
page
){
prop
.
page
=
prop
.
page
+
1
;
recursiveFetch
(
prop
)
}
else
if
(
prop
.
start
<
currencies
.
length
){
prop
.
page
=
1
;
prop
.
start
=
prop
.
start
+
1
;
recursiveFetch
(
prop
)
}
else
prop
.
release
()
}
})
}
}
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
);
let
d
=
new
Date
();
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
);
let
ho
=
new
Intl
.
DateTimeFormat
(
'
en
'
,
{
hour
:
'
2-digit
'
,
hour12
:
false
}).
format
(
d
);
let
mi
=
new
Intl
.
DateTimeFormat
(
'
en
'
,
{
minute
:
'
2-digit
'
}).
format
(
d
);
let
se
=
new
Intl
.
DateTimeFormat
(
'
en
'
,
{
second
:
'
2-digit
'
}).
format
(
d
);
var
formattedDate
=
`
${
ye
}${
mo
}${
da
}${
ho
}${
mi
}${
se
}
`
;
var
link
=
document
.
createElement
(
"
a
"
);
link
.
setAttribute
(
"
href
"
,
encodedUri
);
link
.
setAttribute
(
"
download
"
,
`Trans_List_
${
formattedDate
}
.csv`
);
document
.
body
.
appendChild
(
link
);
// Required for FF
link
.
click
();
}
function
paginate
(
direction
,
focusedCur
){
var
fd
=
searchFormData
()
var
currentPage
=
parseInt
(
$
(
"
#crnt_page_
"
+
focusedCur
).
val
())
var
inputtedPage
=
parseInt
(
$
(
"
#move_page_high_
"
+
focusedCur
).
val
())
var
totalPage
=
parseInt
(
$
(
"
#total_page_
"
+
focusedCur
).
val
())
var
changes
=
false
;
switch
(
direction
){
case
"
prev
"
:
if
(
currentPage
>
1
){
fd
.
page
=
currentPage
-
1
;
changes
=
true
;
}
break
;
case
"
next
"
:
if
(
currentPage
<
totalPage
){
fd
.
page
=
currentPage
+
1
;
changes
=
true
;
}
break
;
case
"
express
"
:
if
(
inputtedPage
>=
1
&&
inputtedPage
<=
totalPage
){
fd
.
page
=
inputtedPage
;
changes
=
true
;
}
break
;
}
if
(
changes
){
fd
.
cur
=
focusedCur
;
$
(
"
#crnt_page_
"
+
focusedCur
).
val
(
fd
.
page
)
$
(
"
#currentPageNum_
"
+
focusedCur
).
html
(
fd
.
page
)
$
(
"
#move_page_high_
"
+
focusedCur
).
val
(
fd
.
page
)
pullTxns
(
fd
,
{
"
tableBody
"
:
$
(
"
#transaction_body_
"
+
focusedCur
)
})
}
}
function
searchFormData
(){
return
{
"
detailAccount
"
:
$
(
"
#detail_account
"
).
val
(),
"
from
"
:
$
(
"
#s_from
"
).
val
(),
"
to
"
:
$
(
"
#s_to
"
).
val
(),
"
txnNum
"
:
$
(
"
#transaction_num
"
).
val
(),
"
email
"
:
$
(
"
#s_email
"
).
val
(),
"
cur
"
:
$
(
"
#s_currency
"
).
val
(),
"
userAccount
"
:
$
(
"
#s_account
"
).
val
(),
"
txnType
"
:
$
(
"
#transaction_type
"
).
val
(),
"
page
"
:
1
}
}
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
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
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
();
}
else
if
(
txn
[
"
transaction_type
"
]
===
'
2
'
&&
txn
[
"
type
"
]
==
'
3
'
){
txn
[
"
transaction_type
"
]
=
$
(
"
#internalTransferTrash
"
).
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
"
]
===
'
12
'
){
txn
[
"
transaction_type
"
]
=
$
(
"
#withdrawIndicator
"
).
val
()
+
"
(
"
+
showWithdrawalStatus
(
txn
[
"
status
"
])
+
"
)
"
;
txn
[
"
status
"
]
=
$
(
"
#statusComplete
"
).
val
();
}
else
if
(
txn
[
"
transaction_type
"
]
===
'
11
'
){
txn
[
"
transaction_type
"
]
=
$
(
"
#feeIndicator
"
).
val
();
txn
[
"
status
"
]
=
$
(
"
#statusComplete
"
).
val
();
}
return
txn
;
}
function
createTransactionRow
(
txn
){
var
row
=
'
<tr>
'
+
'
<td class="c">{row_num}</td>
'
+
'
<td class="c">{transaction_type}</td>
'
+
'
<td class="c">{account_number}</td>
'
+
'
<td class="l">{account_name}</td>
'
+
'
<td class="r">{deposit_amount}</td>
'
+
'
<td class="r">{withdraw_amount}</td>
'
+
'
<td class="r">{fee}</td>
'
+
'
<td>{transaction_time_string}</td>
'
+
'
<td>{process_time_string}</td>
'
+
'
<td class="c">{transaction_number}</td>
'
+
'
<td class="l">{message}</td>
'
+
'
<td class="c">{process_status}</td>
'
+
'
<td class="c">{status}</td>
'
+
'
<td class="r">{balance}</td>
'
+
'
</tr>
'
;
var
matches
=
row
.
match
(
/
\{([
A-Za-z0-9_
]
+
)\}
/g
)
matches
.
forEach
(
function
(
item
,
index
){
var
mdata
=
item
.
replace
(
new
RegExp
(
"
(
\\
{|
\\
})
"
,
"
g
"
),
''
)
switch
(
mdata
){
case
"
balance
"
:
case
"
deposit_amount
"
:
case
"
withdraw_amount
"
:
case
"
fee
"
:
if
(
txn
[
mdata
].
trim
().
length
!=
0
)
txn
[
mdata
]
=
txn
[
"
currency
"
]
+
"
"
+
txn
[
mdata
];
break
;
case
"
transaction_type
"
:
txn
=
readableTransactionType
(
txn
)
break
;
case
"
process_status
"
:
txn
[
mdata
]
=
showTransactionOrigin
(
txn
[
mdata
]);
break
;
}
row
=
row
.
replace
(
item
,
txn
[
mdata
])
})
return
row
;
}
function
pullTxns
(
formData
,
config
){
$
.
ajax
({
"
url
"
:
"
../api/transaction_history.php
"
,
"
type
"
:
"
POST
"
,
"
dataType
"
:
"
json
"
,
"
crossDomain
"
:
true
,
"
data
"
:
formData
,
"
beforeSend
"
:
function
(){
if
(
typeof
config
.
tableBody
!==
'
undefined
'
){
config
.
tableBody
.
empty
()
$
(
"
#elapsed_time_
"
+
formData
.
cur
).
html
(
''
)
$
(
"
#move_page_high_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
true
})
$
(
"
#express_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
true
})
$
(
"
#prev_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
true
})
$
(
"
#next_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
true
})
config
.
tableBody
.
append
(
'
<td colspan="14">
'
+
$
(
"
#progressIndicator
"
).
val
()
+
'
</td>
'
)
}
},
"
complete
"
:
function
(){
if
(
typeof
config
.
tableBody
!=
'
undefined
'
){
$
(
"
#move_page_high_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
false
})
$
(
"
#express_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
false
})
$
(
"
#prev_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
false
})
$
(
"
#next_
"
+
formData
.
cur
).
prop
({
"
disabled
"
:
false
})
}
},
"
error
"
:
function
(
data
){
alert
(
"
Something Wrong Happened [
"
+
formData
.
cur
+
"
]
"
)
}
}).
done
(
function
(
data
){
if
(
typeof
config
.
tableBody
!==
'
undefined
'
){
$
(
"
#rowCount_
"
+
formData
.
cur
).
html
(
data
[
"
row_count
"
])
$
(
"
#currentPageNum_
"
+
formData
.
cur
).
html
(
data
[
"
current_page
"
])
$
(
"
#pageTotal_
"
+
formData
.
cur
).
html
(
data
[
"
total_page
"
])
// hidden inputs
$
(
"
#crnt_page_
"
+
formData
.
cur
).
val
(
data
[
"
current_page
"
])
$
(
"
#total_page_
"
+
formData
.
cur
).
val
(
data
[
"
total_page
"
])
// page express
$
(
"
#move_page_high_
"
+
formData
.
cur
).
val
(
data
[
"
current_page
"
])
$
(
"
#elapsed_time_
"
+
formData
.
cur
).
html
(
parseFloat
(
data
[
"
elapsed_time
"
]).
toFixed
(
3
))
config
.
tableBody
.
empty
()
if
(
data
.
result
.
length
>
0
){
data
.
result
.
forEach
(
function
(
item
,
index
){
item
[
"
row_num
"
]
=
data
[
"
start_row
"
]
+
index
;
config
.
tableBody
.
append
(
createTransactionRow
(
item
))
})
}
else
config
.
tableBody
.
append
(
'
<td colspan="14">
'
+
$
(
"
#noResultsFound
"
).
val
()
+
'
</td>
'
)
}
else
{
if
(
typeof
config
.
exporting
!==
'
undefined
'
){
config
.
build
(
data
.
result
)
}
}
})
}
\ No newline at end of file
system/lib/core/literals.php
View file @
73e18b10
...
...
@@ -386,6 +386,11 @@ define('VAL_STR_2FA_PROF_CHANGE', 'プロフィール変更');
define
(
'VAL_STR_2FA_MONEY_OUT'
,
'出金'
);
define
(
'VAL_STR_2FA_TEXT'
,
'2段階メール確認(法人口座)'
);
define
(
'VAL_STR_DEFAULT_ACCESS'
,
'デフォルトアクセス'
);
define
(
'VAL_STR_ELAPSED_TIME'
,
'経過時間'
);
define
(
'VAL_STR_SECONDS'
,
'秒'
);
define
(
'VAL_STR_ACCOUNT_DETAILS'
,
'口座詳細'
);
define
(
'VAL_STR_ACCOUNT_TRANSACTIONS'
,
'口座取引'
);
define
(
'VAL_STR_LOADING_TRANSACTIONS'
,
'取引が読み込み中。。。'
);
define
(
'VAL_STR_SEARCH_MESSAGE'
,
'検索結果はございません。'
);
define
(
'VAL_STR_IMPORT_MESSAGE'
,
'インポートデータがありません。'
);
define
(
'VAL_STR_ADMIN_EDIT'
,
'編集'
);
...
...
system/lib/core/literals_en.php
View file @
73e18b10
...
...
@@ -385,6 +385,11 @@ define('VAL_STR_2FA_PROF_CHANGE', 'Profile Changing');
define
(
'VAL_STR_2FA_MONEY_OUT'
,
'Money-Out'
);
define
(
'VAL_STR_2FA_TEXT'
,
'2 Step E-Mail Verification (Corporate Account)'
);
define
(
'VAL_STR_DEFAULT_ACCESS'
,
'Default Access'
);
define
(
'VAL_STR_ELAPSED_TIME'
,
'Elapsed Time'
);
define
(
'VAL_STR_SECONDS'
,
'sec(s).'
);
define
(
'VAL_STR_LOADING_TRANSACTIONS'
,
'Loading Transactions...'
);
define
(
'VAL_STR_ACCOUNT_DETAILS'
,
'Account Details'
);
define
(
'VAL_STR_ACCOUNT_TRANSACTIONS'
,
'Account Transactions'
);
define
(
'VAL_STR_SEARCH_MESSAGE'
,
'0 Results Found.'
);
define
(
'VAL_STR_IMPORT_MESSAGE'
,
'No Import Data.'
);
define
(
'VAL_STR_ADMIN_EDIT'
,
'Edit'
);
...
...
system/lib/sql.xml
View file @
73e18b10
...
...
@@ -4996,19 +4996,19 @@ WHERE
AND user_account = '__ELEMENT01__'
AND debit_currency = '__ELEMENT02__'
AND TYPE = '11'
) AS trans
_in
) AS trans
LEFT OUTER JOIN v_users_all AS withdraw_user
ON (trans
_in
.withdraw_account_number = withdraw_user.user_account)
ON (trans.withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN v_users_all AS deposit_user
ON (trans
_in
.deposit_account_number = deposit_user.user_account)
ON (trans.deposit_account_number = deposit_user.user_account)
WHERE 1
__ELEMENT03__
</SELECT_USER_TRANSACTION_ADMIN_COUNT>
<LIST_USER_TRANSACTION_ADMIN_COUNT_REVISED>
SELECT
count(trans
_in
.currency) total,
trans
_in
.currency as currency
count(trans.currency) total,
trans.currency as currency
FROM
(
SELECT
...
...
@@ -5185,12 +5185,12 @@ WHERE
v_withdrawal_unified_for_balance
WHERE
user_account = '__ELEMENT01__'
) AS trans
_in
) AS trans
LEFT OUTER JOIN v_users_all AS withdraw_user ON (trans
_in
.withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN v_users_all AS deposit_user ON (trans
_in
.deposit_account_number = deposit_user.user_account)
LEFT OUTER JOIN v_users_all AS withdraw_user ON (trans.withdraw_account_number = withdraw_user.user_account)
LEFT OUTER JOIN v_users_all AS deposit_user ON (trans.deposit_account_number = deposit_user.user_account)
WHERE 1
__ELEMENT0
2
__
__ELEMENT0
3
__
GROUP BY currency
ORDER BY currency DESC
...
...
system/logic/account_list/model.php
View file @
73e18b10
...
...
@@ -453,7 +453,10 @@ class AccountListModelClass extends ModelClassEx {
.
'<td>'
.
$this
->
getColumnData
(
$row
,
COLUMN_CLOSE_TIME
)
.
'</td>'
.
'<td>'
.
$this
->
getColumnData
(
$row
,
COLUMN_SUSPENSION_TIME
)
.
'</td>'
// . '<td class="blocka"><a href="javascript:actionDetail(\'' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '\');"><span class="fa fa-info-circle fa-lg"></span></a></td>'
.
'<td class="blocka"><a href="account_edit?detail_account='
.
$this
->
getColumnData
(
$row
,
COLUMN_USER_ACCOUNT
)
.
'"><span class="fa fa-info-circle fa-lg"></span></a></td>'
.
'<td class="blocka">'
.
'<a href="account_edit?detail_account='
.
$this
->
getColumnData
(
$row
,
COLUMN_USER_ACCOUNT
)
.
'" title="'
.
VAL_STR_ACCOUNT_DETAILS
.
'"><span class="fa fa-info-circle fa-lg"></span></a> '
.
'<a href="account_transactions?detail_account='
.
$this
->
getColumnData
(
$row
,
COLUMN_USER_ACCOUNT
)
.
'" title="'
.
VAL_STR_ACCOUNT_TRANSACTIONS
.
'"><span class="fa fa-university fa-lg"></span></a>'
.
'</td>'
.
'</tr>'
;
}
...
...
system/logic/account_transactions/logic.php
View file @
73e18b10
...
...
@@ -10,7 +10,6 @@ class LogicAccountTransactions extends ModelAccountTransactions {
public
function
logic
(){
$this
->
init
();
$this
->
list
();
}
...
...
@@ -19,18 +18,6 @@ class LogicAccountTransactions extends ModelAccountTransactions {
$where
=
$this
->
getWhere
();
$rowCount
=
$this
->
getColumnData
(
$this
->
getRowData
(
$this
->
accessSelect
(
'SELECT_USER_TRANSACTION_ADMIN_COUNT'
,
$where
),
0
),
"overall_total"
);
$this
->
setTotal
(
$rowCount
);
$start
=
(
$this
->
getTargetPage
()
-
VAL_INT_1
)
*
$this
->
getDefaultPageCount
();
$this
->
setStart
(
$start
);
$where
[]
=
" LIMIT
{
$start
}
,
{
$this
->
getDefaultPageCount
()
}
"
;
$this
->
setResult
(
$this
->
accessSelect
(
'LIST_USER_TRANSACTION_ADMIN'
,
$where
));
$this
->
setCurrencyTxnCounter
(
$this
->
accessSelect
(
'LIST_USER_TRANSACTION_ADMIN_COUNT_REVISED'
,
$where
));
}
}
\ No newline at end of file
system/logic/account_transactions/model.php
View file @
73e18b10
...
...
@@ -14,14 +14,18 @@ class ModelAccountTransactions extends ModelClassEx {
private
$to
;
private
$currency
;
private
$total
;
private
$start
;
private
$currencies
;
private
$currencyTxnCounter
;
private
$rs
;
private
$lang
;
private
$accountData
;
private
$arrValidate
;
public
function
__construct
(){
parent
::
__construct
();
}
...
...
@@ -56,11 +60,6 @@ class ModelAccountTransactions extends ModelClassEx {
$this
->
currency
=
$this
->
getDataPost
(
PARAM_S_CURRENCY
,
true
);
}
// 通貨データがなければ、デフォルト値(USD)
if
(
$this
->
currency
==
NO_STRING
)
{
$this
->
currency
=
USD
;
}
// Fromの日付は確定させないとダメ
if
(
$this
->
getDataPost
(
PARAM_S_FROM
)
==
NO_STRING
)
{
// $this -> from = date('Y/m/1', strtotime('-1 month'));
...
...
@@ -71,6 +70,10 @@ class ModelAccountTransactions extends ModelClassEx {
$this
->
to
=
$this
->
getDataPost
(
PARAM_S_TO
,
true
);
$this
->
lang
=
$this
->
getLangage
();
$this
->
accountData
=
$this
->
getColumnData
(
$this
->
getAccountCommon
(
$this
->
detailAccount
),
0
);
$this
->
initKYCValidationArray
();
}
/*-------------------------------------------------------------------------
...
...
@@ -85,8 +88,40 @@ class ModelAccountTransactions extends ModelClassEx {
}
}
public
function
echoList
(){
$no
=
$this
->
start
+
1
;
private
function
initKYCValidationArray
(){
$this
->
arrValidate
=
[
VAR_KYC_VALIDATE_STATUS_1
,
VAR_KYC_VALIDATE_STATUS_2
,
VAR_KYC_VALIDATE_STATUS_3
,
VAR_KYC_VALIDATE_STATUS_4
,
VAR_KYC_VALIDATE_STATUS_5
,
VAR_KYC_VALIDATE_STATUS_6
,
VAR_KYC_VALIDATE_STATUS_7
,
VAR_KYC_VALIDATE_STATUS_8
,
VAR_KYC_VALIDATE_STATUS_9
,
VAR_KYC_VALIDATE_STATUS_10
,
VAR_KYC_VALIDATE_STATUS_11
,
VAR_KYC_VALIDATE_STATUS_12
,
VAR_KYC_VALIDATE_STATUS_13
,
VAR_KYC_VALIDATE_STATUS_14
,
VAR_KYC_VALIDATE_STATUS_15
,
VAR_KYC_VALIDATE_STATUS_16
,
VAR_KYC_VALIDATE_STATUS_17
,
VAR_KYC_VALIDATE_STATUS_18
,
VAR_KYC_VALIDATE_STATUS_19
,
VAR_KYC_VALIDATE_STATUS_20
,
];
}
private
function
createCurrencyTransactionsTable
(
$cur
){
$displayLabel
=
VAL_STR_DISPLAY
;
$prevPage
=
VAL_STR_PREVIOUS_PAGE
;
$nextPage
=
VAL_STR_NEXT_PAGE
;
$searchResult
=
VAL_STR_SEARCH_RESULT
;
$accountHistory
=
VAL_STR_ACCOUNT_HISTORY
;
$elapsedTime
=
VAL_STR_ELAPSED_TIME
;
$seconds
=
VAL_STR_SECONDS
;
$titleData
=
'<tr>'
.
'<th class="w5p"> </th>'
...
...
@@ -105,60 +140,105 @@ class ModelAccountTransactions extends ModelClassEx {
.
'<th class="w7p">'
.
VAL_STR_HEADER_BALANCE
.
'</th>'
.
'</tr>'
;
$rowData
=
NO_STRING
;
if
(
$this
->
isLoopData
(
$this
->
rs
)){
foreach
(
$this
->
rs
as
$data
)
{
$total
=
$this
->
getColumnData
(
$data
,
COLUMN_BALANCE
);
$dispTotal
=
$this
->
currency
.
' '
.
$this
->
formatCurrency
(
$total
,
$this
->
currency
);
$deposit
=
NO_STRING
;
$withdraw
=
NO_STRING
;
if
(
$this
->
getColumnData
(
$data
,
COLUMN_DEPOSIT_AMOUNT
)
!=
NO_STRING
)
{
$deposit
=
$this
->
currency
.
DELIMIT_SPACE
.
$this
->
formatCurrency
(
floatval
(
$this
->
getColumnData
(
$data
,
COLUMN_DEPOSIT_AMOUNT
)),
$this
->
currency
);
}
if
(
$this
->
getColumnData
(
$data
,
COLUMN_WITHDRAW_AMOUNT
)
!=
NO_STRING
)
{
$withdraw
=
$this
->
currency
.
DELIMIT_SPACE
.
$this
->
formatCurrency
(
floatval
(
$this
->
getColumnData
(
$data
,
COLUMN_WITHDRAW_AMOUNT
)),
$this
->
currency
);
}
//set user account link
$userAccountLink
=
(
strlen
(
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NUMBER
)
>
0
))
?
'<a href="account_edit?detail_account='
.
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NUMBER
)
.
'">'
.
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NUMBER
)
.
'</a>'
:
''
;
//return message if not empty else method
$message
=
(
$this
->
getColumnData
(
$data
,
COLUMN_MESSAGE
)
!=
NULL
)
?
$this
->
getColumnData
(
$data
,
COLUMN_MESSAGE
)
:
$this
->
getColumnData
(
$data
,
COLUMN_METHOD
);
$transactionOrigin
=
$this
->
getColumnData
(
$data
,
COLUMN_PROCESS_STATUS
);
$this
->
transactionOrigin
(
$data
,
$transactionOrigin
);
$transactionType
=
$this
->
getColumnData
(
$data
,
COLUMN_TRANSACTION_TYPE
);
$transactionStat
=
$this
->
getColumnData
(
$data
,
COLUMN_STATUS
);
$this
->
transactionTypeLabel
(
$data
,
$transactionType
,
$transactionStat
);
$rowData
.=
'<tr>'
.
'<td class="c">'
.
$no
++
.
'</td>'
.
'<td class="c">'
.
$transactionType
.
'</td>'
// . '<td class="c">' . $this -> getColumnData($data, COLUMN_USER_ACCOUNT) . '</td>'
.
'<td class="c">'
.
$userAccountLink
.
'</td>'
.
'<td class="l">'
.
$this
->
getColumnData
(
$data
,
COLUMN_ACCOUNT_NAME
)
.
'</td>'
.
'<td class="r">'
.
$deposit
.
'</td>'
.
'<td class="r">'
.
$withdraw
.
'</td>'
.
'<td class="r">'
.
$this
->
currency
.
DELIMIT_SPACE
.
$this
->
formatCurrency
(
$this
->
getColumnData
(
$data
,
COLUMN_FEE
),
$this
->
currency
)
.
'</td>'
.
'<td>'
.
$this
->
getColumnData
(
$data
,
COLUMN_TRANSACTION_TIME_STRING
)
.
'</td>'
.
'<td>'
.
$this
->
getColumnData
(
$data
,
COLUMN_PROCESS_TIME_STRINTG
)
.
'</td>'
.
'<td class="c">'
.
$this
->
getColumnData
(
$data
,
COLUMN_TRANSACTION_NUMBER
)
.
'</td>'
.
'<td class="l">'
.
$message
.
'</td>'
.
'<td class="c">'
.
$transactionOrigin
.
'</td>'
.
'<td class="c">'
.
$transactionStat
.
'</td>'
.
'<td class="r">'
.
$dispTotal
.
'</td>'
.
'</tr>'
;
}
}
else
{
$rowData
=
'<tr><td colspan="14">'
.
$this
->
getMessage
(
INFO
,
'I_NO_SUCHE_SEARCH_DATA'
,
array
())
.
'</td></tr>'
;
}
echo
'<table class="table col bdr default odd calign w100p fontXS">'
.
$titleData
.
$rowData
.
'</table>'
;
$html
=<<<
HTMLSTRING
<
div
class
=
"caption"
data
-
toggle
=
"collapse"
href
=
"#
{
$cur
}
"
aria
-
expanded
=
"true"
aria
-
controls
=
"
$cur
"
>
<
span
>
{
$cur
}
{
$accountHistory
}
</
span
><
i
class
=
"icontop"
aria
-
hidden
=
"true"
></
i
>
</
div
>
<
div
class
=
"t_collapse_box collapse"
id
=
"
{
$cur
}
"
aria
-
expanded
=
"true"
>
<
div
class
=
"cur-table tbl_
{
$cur
}
"
>
<
input
type
=
"hidden"
value
=
"
{
$cur
}
"
/>
<
table
class
=
"table col bdr default odd calign w100p fontXS"
>
<
thead
>
{
$titleData
}
</
thead
>
<
tbody
id
=
"transaction_body_
{
$cur
}
"
>
</
tbody
>
</
table
>
</
div
>
<
div
class
=
"article-bottom mt-0"
>
&
nbsp
;
&
nbsp
;{
$elapsedTime
}
:
<
span
id
=
"elapsed_time_
{
$cur
}
"
></
span
>
{
$seconds
}
<
div
class
=
"pager"
>
{
$searchResult
}
<
span
id
=
"rowCount_
{
$cur
}
"
></
span
>&
nbsp
;
Page
<
span
id
=
"currentPageNum_
{
$cur
}
"
></
span
>
/
<
span
id
=
"pageTotal_
{
$cur
}
"
></
span
>&
nbsp
;
<
input
id
=
"move_page_high_
{
$cur
}
"
class
=
"px30 ralign"
type
=
"text"
>&
nbsp
;
<
input
id
=
"express_
{
$cur
}
"
value
=
"
{
$displayLabel
}
"
class
=
"btn bg-default px60 hi22"
focused
-
cur
=
"
{
$cur
}
"
type
=
"button"
/>&
nbsp
;
<
input
id
=
"prev_
{
$cur
}
"
value
=
"
{
$prevPage
}
"
class
=
"btn2 bg-default px90 hi22"
focused
-
cur
=
"
{
$cur
}
"
type
=
"button"
/>&
nbsp
;
<
input
id
=
"next_
{
$cur
}
"
value
=
"
{
$nextPage
}
"
class
=
"btn2 bg-default px90 hi22"
focused
-
cur
=
"
{
$cur
}
"
type
=
"button"
/>&
nbsp
;
<
input
id
=
"crnt_page_
{
$cur
}
"
type
=
"hidden"
>
<
input
id
=
"total_page_
{
$cur
}
"
type
=
"hidden"
>
</
div
>
</
div
>
</
div
><
br
/>
HTMLSTRING
;
return
$html
;
}
public
function
echoTransactionTables
(){
if
(
empty
(
$this
->
currency
)){
if
(
$this
->
isLoopData
(
$this
->
currencyTxnCounter
)){
foreach
(
$this
->
currencyTxnCounter
as
$counter
){
echo
$this
->
createCurrencyTransactionsTable
(
$counter
[
"currency"
]);
}
}
}
else
echo
$this
->
createCurrencyTransactionsTable
(
$this
->
currency
);
}
public
function
echoJavascriptLabels
(){
$labels
=
[
"progressIndicator"
=>
VAL_STR_LOADING_TRANSACTIONS
,
"internalTransfer"
=>
VAL_STR_TRANSFER
,
"internalTransferTrash"
=>
VAL_STR_TRANSFER_TRASH
,
"depositIndicator"
=>
VAL_STR_DEPOSIT
,
"exchangeIndicator"
=>
VAL_STR_EXCHANGE
,
"requestIndicator"
=>
VAL_STR_REQUEST
,
"withdrawIndicator"
=>
VAL_STR_WITHDARAW
,
"feeIndicator"
=>
VAL_STR_FEE
,
"noResultsFound"
=>
$this
->
getMessage
(
INFO
,
'I_NO_SUCHE_SEARCH_DATA'
,
array
()),
"headTransactionType"
=>
VAL_STR_HEADER_TRANSACTION_TYPE
,
"headUserAccount"
=>
VAL_STR_USER_ACCOUNT
,
"headUserAccountName"
=>
VAL_STR_USER_ACCOUNT_NAME
,
"headCurrency"
=>
VAL_STR_CURRENCY
,
"headDepositAmount"
=>
VAL_DEPOSIT_AMOUNT
,
"headWithdrawalAmount"
=>
VAL_WITHDRAWAL_AMOUNT
,
"headFee"
=>
VAL_STR_FEE
,
"headDateRequested"
=>
VAL_STR_DATE_REQUESTED
,
"headProcessngDate"
=>
VAL_STR_PROCESSING_DATE
,
"headTransactionNumber"
=>
VAL_STR_TRANSACTION_NUMBER
,
"headMessage"
=>
VAL_STR_MESSAGE
,
"headType"
=>
VAL_STR_TYPE
,
"headCurrentStatus"
=>
VAL_STR_CURRENT_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;
}
public
function
getWhere
()
{
...
...
@@ -225,153 +305,6 @@ class ModelAccountTransactions extends ModelClassEx {
return
$rtn
;
}
private
function
transactionOrigin
(
$row
,
&
$pStatus
){
// 処理ステータス
if
(
$this
->
getColumnData
(
$row
,
COLUMN_PROCESS_STATUS
)
==
NO_COUNT
)
{
// ユーザ側操作
$pStatus
=
'User'
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_PROCESS_STATUS
)
==
VAL_INT_1
)
{
// 管理者側操作
$pStatus
=
'Admin'
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_PROCESS_STATUS
)
==
VAL_INT_2
)
{
// API操作
$pStatus
=
'API'
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_PROCESS_STATUS
)
==
VAL_INT_3
)
{
// API操作
$pStatus
=
'Batch'
;
}
else
{
$pStatus
=
' '
;
}
}
private
function
transactionTypeLabel
(
$row
,
&
$tType
,
&
$dStatus
){
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_1
)
{
// 入金
$tType
=
VAL_STR_DEPOSIT
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_2
&&
$this
->
getColumnData
(
$row
,
COLUMN_TYPE
)
==
VAR_WITHDRAW_TYPE_NORMAL
)
{
// 通常出金
$tType
=
VAL_STR_WITHDARAW
.
'('
.
$this
->
dispWithdrawStatusCommon
(
$this
->
getColumnData
(
$row
,
COLUMN_STATUS
))
.
')'
;
$dStatus
=
$this
->
dispWithdrawStatusCommon
(
$this
->
getColumnData
(
$row
,
COLUMN_STATUS
));
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_2
&&
$this
->
getColumnData
(
$row
,
COLUMN_TYPE
)
==
VAR_WITHDRAW_TYPE_FEE
)
{
// 手数料出金
$tType
=
VAL_STR_FEE
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_2
&&
$this
->
getColumnData
(
$row
,
COLUMN_TYPE
)
==
VAR_WITHDRAW_TYPE_TRANSFER
)
{
// 口座間送金出金
$tType
=
VAL_STR_TRANSFER_TRASH
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_3
)
{
// 両替入金
$tType
=
VAL_STR_EXCHANGE
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_4
)
{
// 両替出金
$tType
=
VAL_STR_EXCHANGE
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_5
)
{
// 口座振替(出金)
$tType
=
VAL_STR_TRANSFER
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_6
)
{
// 口座振替(出金)
$tType
=
VAL_STR_TRANSFER
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_7
)
{
// 引落(出金)
$tType
=
VAL_STR_REQUEST
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_8
)
{
// 引落(入金)
$tType
=
VAL_STR_REQUEST
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_9
||
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_10
||
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_12
)
{
// 出金(返却系)
$tType
=
VAL_STR_WITHDARAW
.
'('
.
$this
->
dispWithdrawStatusCommon
(
$this
->
getColumnData
(
$row
,
COLUMN_STATUS
))
.
')'
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
if
(
$this
->
getColumnData
(
$row
,
COLUMN_TRANSACTION_TYPE
)
==
VAL_INT_11
)
{
// 出金(返却系)
$tType
=
VAL_STR_FEE
;
$dStatus
=
VAL_STR_STATUS_COMP
;
}
else
{
$tType
=
NO_STRING
;
}
}
/*-------------------------------------------------------------------------
* @function_name: エクスポートデータの作成
* @parameter : なし
* @return : なし
-------------------------------------------------------------------------*/
function
makeExportData
()
{
// 変数宣言部
$data
=
NO_STRING
;
$arr
=
null
;
// まずはタイトル
$data
=
(
$this
->
lang
==
"en"
?
'Transaction Type,Account Number,Account Name,Currency,Deposit Amount,Withdrawal Amount,Fee,Date Requested,Processing Date,Transaction Number,Message,Type,Current Status,Balance'
.
"
\n
"
:
'取引種別, 口座番号, 口座名義, 通貨種別, 入金額, 出金額, 手数料, 申請日, 処理日, 取引番号 , メッセージ, 種別, 状態, 残高'
.
"
\n
"
);
echo
"<pre>"
;
// データの存在確認
if
(
$this
->
isLoopData
(
$this
->
rs
))
{
foreach
(
$this
->
rs
as
$row
)
{
// 配列の初期化
$arr
=
array
();
$transactionOrigin
=
$this
->
getColumnData
(
$row
,
COLUMN_PROCESS_STATUS
);
$this
->
transactionOrigin
(
$data
,
$transactionOrigin
);
$transactionType
=
$this
->
getColumnData
(
$data
,
COLUMN_TRANSACTION_TYPE
);
$transactionStat
=
$this
->
getColumnData
(
$data
,
COLUMN_STATUS
);
$this
->
transactionTypeLabel
(
$row
,
$transactionType
,
$transactionStat
);
// データの設定
$arr
[]
=
$transactionType
;
// (01)Transaction type
$arr
[]
=
$row
[
COLUMN_ACCOUNT_NUMBER
];
// (02)Account number
$arr
[]
=
$row
[
COLUMN_ACCOUNT_NAME
];
// (03)Account holder
$arr
[]
=
$this
->
currency
;
// (04)Currency
$arr
[]
=
$row
[
COLUMN_DEPOSIT_AMOUNT
];
// (05)Payment amount
$arr
[]
=
$row
[
COLUMN_WITHDRAW_AMOUNT
];
// (06)Withdrawal amount
$arr
[]
=
$row
[
COLUMN_FEE
];
// (07)Fee
$arr
[]
=
$row
[
COLUMN_TRANSACTION_TIME_STRING
];
// (08)Application date
$arr
[]
=
$row
[
COLUMN_PROCESS_TIME_STRINTG
];
// (09)Disposal day
$arr
[]
=
$row
[
COLUMN_TRANSACTION_NUMBER
];
// (10)Transition Number
$arr
[]
=
(
$row
[
COLUMN_MESSAGE
]
!=
NULL
)
?
$row
[
COLUMN_MESSAGE
]
:
$row
[
COLUMN_METHOD
];
// (11)message
$arr
[]
=
$transactionOrigin
;
$arr
[]
=
$transactionStat
;
// (12)State
$arr
[]
=
$this
->
formatCurrency
(
$row
[
COLUMN_BALANCE
],
$this
->
currency
);
// (13)Balance
$data
.=
'"'
.
implode
(
'"'
.
DELIMIT_COMMA
.
'"'
,
$arr
)
.
'"'
.
"
\n
"
;
}
}
return
mb_convert_encoding
(
$data
,
"UTF-8"
);
}
public
function
dispPager
()
{
echo
$this
->
getPagerCommon
(
$this
->
getTargetPage
()
,
$this
->
getTotalPageCommon
(
$this
->
getDefaultPageCount
(),
$this
->
total
)
,
$this
->
total
,
NO_STRING
,
false
);
}
public
function
setResult
(
$rs
){
$this
->
rs
=
$rs
;
}
...
...
@@ -384,6 +317,10 @@ class ModelAccountTransactions extends ModelClassEx {
return
$this
->
currency
;
}
public
function
getDetailAccount
(){
return
$this
->
detailAccount
;
}
public
function
echoDetailAccount
(){
echo
$this
->
detailAccount
;
}
...
...
@@ -392,16 +329,42 @@ class ModelAccountTransactions extends ModelClassEx {
echo
$this
->
sUserAccount
;
}
public
function
echoAccountInfo
(
$key
){
switch
(
$key
){
case
"tier_level"
:
echo
(
$this
->
accountData
[
$key
]
!=
NO_STRING
)
?
$this
->
getValueByList
(
$this
->
getTierStatusList
(),
$this
->
accountData
[
$key
])
:
""
;
break
;
case
"risk_level"
:
echo
(
$this
->
accountData
[
$key
]
!=
NO_STRING
)
?
$this
->
getValueByList
(
$this
->
getRiskLevels
(),
$this
->
accountData
[
$key
])
:
""
;
break
;
case
"kyc_validate_status"
:
$isUpload
=
$this
->
accessSelect
(
'COUNT_KYC_DOCUMENT'
,
array
(
$this
->
detailAccount
));
echo
empty
(
$isUpload
)
||
$this
->
accountData
[
$key
]
==
99
?
''
:
'<a href="kyc?type=detail&user_account='
.
$this
->
detailAccount
.
'" target="_blank">'
.
$this
->
arrValidate
[
$this
->
accountData
[
$key
]]
.
'</a>'
;
break
;
case
"status"
:
echo
$this
->
dispUserStatusCommon
(
$this
->
accountData
[
"status"
]);
break
;
case
"account_type"
:
echo
$this
->
dispUserAccountTypeCommon
(
$this
->
accountData
[
"account_type"
]);
break
;
default
:
echo
$this
->
accountData
[
$key
];
break
;
}
}
public
function
echoSEmail
(){
echo
$this
->
sEmail
;
}
public
function
setCurrenc
ies
(
$currencies
){
$this
->
currenc
ies
=
$currencies
;
public
function
setCurrenc
yTxnCounter
(
$currencyTxnCounter
){
$this
->
currenc
yTxnCounter
=
$currencyTxnCounter
;
}
public
function
set
Total
(
$total
){
$this
->
total
=
$total
;
public
function
set
Currencies
(
$currencies
){
$this
->
currencies
=
$currencies
;
}
public
function
setStart
(
$start
){
...
...
system/template/tmp_account_transactions.php
View file @
73e18b10
...
...
@@ -14,6 +14,56 @@ include_once('template/base_head.php');
<input
type=
"button"
id=
"btnSearch"
value=
"検索"
class=
"btn bg-default px50 hi22"
>
</div>
</div>
<table
class=
"conditions fontS w100p"
>
<colgroup>
<col
class=
"w50p"
>
<col
class=
"w50p"
>
</colgroup>
<tr>
<td>
氏名:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"account_name"
)
?>
</strong></td>
</tr>
<tr>
<td>
ユーザー名:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"user_name"
)
?>
</strong></td>
</tr>
<tr>
<td>
生年月日:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"birth_string"
)
?>
</strong></td>
</tr>
<tr>
<td>
口座種別:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"account_type"
)
?>
</strong></td>
</tr>
<tr>
<td>
ステータス:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"status"
)
?>
</strong></td>
</tr>
<tr>
<td>
KYC認証:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"kyc_validate_status"
)
?>
</strong></td>
</tr>
<tr>
<td>
Riskレベル:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"risk_level"
)
?>
</strong></td>
</tr>
<tr>
<td>
ティアレベル:
</td>
<td><strong>
<?php
$this
->
echoAccountInfo
(
"tier_level"
)
?>
</strong></td>
</tr>
<tr>
<td>
備考欄
</td>
<td><i>
<?php
$this
->
echoAccountInfo
(
"note"
)
?>
</i></td>
</tr>
<tr>
<td>
Risk備考欄
</td>
<td><i>
<?php
$this
->
echoAccountInfo
(
"risk"
)
?>
</i></td>
</tr>
</table>
<hr/>
<table
class=
"conditions fontS w100p"
>
<colgroup>
<col
class=
"w50p"
>
...
...
@@ -35,6 +85,7 @@ include_once('template/base_head.php');
<th>
通貨種別
</th>
<td>
<select
id=
"s_currency"
name=
"s_currency"
class=
"w100p"
>
<option
value=
""
>
--- すべて ---
</option>
<?php
$this
->
echoCurrencyList
();
?>
</select>
</td>
...
...
@@ -43,7 +94,7 @@ include_once('template/base_head.php');
<th>
取引科目
</th>
<td>
<select
name=
"transaction_type"
id=
"transaction_type"
class=
"w100p"
>
<option
value=
""
>
---
All
---
</option>
<option
value=
""
>
---
すべて
---
</option>
<?php
$this
->
dispTransactionTypeList
();
?>
</select>
</td>
...
...
@@ -63,6 +114,10 @@ include_once('template/base_head.php');
<input
type=
"button"
id=
"btnBack"
value=
"戻る"
class=
"btn bg-grad hi25 px100"
>
</p>
<input
type=
"hidden"
value=
""
id=
"s_type"
name=
"type"
/>
<span
style=
"display:none;"
id=
"file_exporter_prog"
>
ファイルをエクスポート中。。。
</span>
</form>
</aside>
...
...
@@ -72,12 +127,11 @@ include_once('template/base_head.php');
<article>
<div
class=
"article-heading"
>
<h2>
<?php
echo
$page_title
;
?>
「
<?php
$this
->
echoDetailAccount
();
?>
」
</h2>
<?php
$this
->
dispPager
();
?>
</div>
<?php
$this
->
echoList
()
?>
<div
class=
"article-bottom"
>
<?php
$this
->
dispPager
();
?>
</div>
<?php
echo
$this
->
echoTransactionTables
()
?>
<?php
echo
$this
->
echoJavascriptLabels
()
?>
</article>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment