Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
TimeOut
TimeOutAdmin
Commits
c8f820d4
Commit
c8f820d4
authored
Dec 05, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.techware.co.in/timeout/timeOut
into tobin
# Conflicts: # application/models/Webservice_model.php
parents
4e8648cf
ffc692e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
+30
-20
Validation_flight_model.php
application/models/Validation_flight_model.php
+0
-6
Webservice_model.php
application/models/Webservice_model.php
+30
-14
No files found.
application/models/Validation_flight_model.php
View file @
c8f820d4
...
...
@@ -41,12 +41,6 @@ class Validation_flight_model extends CI_Model {
'message'
=>
'Departure Date is null or empty'
)
),
'return_date'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER02'
,
'message'
=>
'Return Date is null or empty'
)
),
'adult_flight'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER02'
,
...
...
application/models/Webservice_model.php
View file @
c8f820d4
...
...
@@ -2210,10 +2210,10 @@ class Webservice_model extends CI_Model {
if
(
!
empty
(
$result
)
&&
!
empty
(
$result
=
$result
->
result_array
())){
$res
=
array
(
'status'
=>
'success'
,
'data'
=>
$result
);
}
else
{
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No
Data
Found'
,
'code'
=>
'ER12'
);
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No
Users
Found'
,
'code'
=>
'ER12'
);
}
}
else
{
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'
Invalid Use
r'
,
'code'
=>
'ER10'
);
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'
User Authentication Erro
r'
,
'code'
=>
'ER10'
);
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER08'
);
...
...
@@ -2238,7 +2238,7 @@ class Webservice_model extends CI_Model {
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'User Authentication Error'
,
'code'
=>
'ER10'
);
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER08'
);
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'Ohh No!! Something Went South
!!
'
,
'code'
=>
'ER08'
);
}
return
$res
;
}
...
...
@@ -2248,21 +2248,37 @@ class Webservice_model extends CI_Model {
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
if
(
$user_id
>
0
){
$countryData
=
$this
->
getCountryData
(
$user_id
);
$sql
=
"SELECT transaction_code AS transaction_number,amount,transaction_type,created_date,status FROM wallet_transactions WHERE customer_id='
$user_id
'"
;
$query
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$query
)
||
empty
(
$walletHistory
=
$query
->
result_array
())){
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No History Found'
,
'code'
=>
'ER13'
);
return
$res
;
$sql
=
"SELECT id FROM wallet_transactions WHERE customer_id='
$user_id
'"
;
$count
=
$this
->
db
->
query
(
$sql
)
->
num_rows
();
if
(
$count
>
0
){
$perPage
=
10
;
$page
=
(
isset
(
$data
[
'page'
])
&&
$data
[
'page'
]
!=
0
)
?
$data
[
'page'
]
:
1
;
$limit
=
(
$page
-
1
)
*
$perPage
;
$meta
=
array
(
'total_pages'
=>
ceil
(
$count
/
$perPage
),
'total_items'
=>
$count
,
'current_page'
=>
$page
,
'items_per_page'
=>
$perPage
);
$sql
=
"SELECT transaction_code AS transaction_number,amount,transaction_type,created_date,status
FROM wallet_transactions
WHERE customer_id='
$user_id
'
ORDER BY id DESC
LIMIT
$limit
,
$perPage
"
;
$query
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$query
)
||
empty
(
$walletHistory
=
$query
->
result_array
())){
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No Transaction History Found'
,
'code'
=>
'ER13'
);
return
$res
;
}
foreach
(
$walletHistory
AS
$walletKey
=>
$walletValue
){
$walletHistory
[
$walletKey
][
'currency_symbol'
]
=
$countryData
[
'currency_symbol'
];
}
$res
=
array
(
'status'
=>
'success'
,
'data'
=>
array
(
'wallet'
=>
$walletHistory
,
'meta'
=>
$meta
));
}
else
{
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'No Transaction History Found'
,
'code'
=>
'ER10'
);
}
foreach
(
$walletHistory
AS
$walletKey
=>
$walletValue
){
$walletHistory
[
$walletKey
][
'currency_symbol'
]
=
$countryData
[
'currency_symbol'
];
}
$res
=
array
(
'status'
=>
'success'
,
'data'
=>
$walletHistory
);
}
else
{
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'User
a
uthentication Error'
,
'code'
=>
'ER10'
);
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'User
A
uthentication Error'
,
'code'
=>
'ER10'
);
}
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER08'
);
$res
=
array
(
'status'
=>
'error'
,
'message'
=>
'Ohh No!! Something Went South
!!
'
,
'code'
=>
'ER08'
);
}
return
$res
;
}
...
...
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