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
70d09155
Commit
70d09155
authored
5 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
change in hotel booking and bookedList api See merge request
!248
parents
9dd612a7
380a3def
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
Api_model.php
application/models/Api_model.php
+4
-4
Webservice_model.php
application/models/Webservice_model.php
+9
-5
No files found.
application/models/Api_model.php
View file @
70d09155
...
...
@@ -1806,10 +1806,10 @@ class Api_model extends CI_Model {
return
;
}
$bookId
=
'HTL'
.
date
(
'ymd'
)
.
str_pad
(
rand
(
1111
,
9999
),
4
,
0
,
STR_PAD_LEFT
);
$insert
=
array
(
'hotel_book_id'
=>
$bookId
,
'
hotel_name'
=>
$bookData
[
'hotelName'
],
'hotel_image'
=>
$bookData
[
'hotelImage'
],
'checkin'
=>
$bookData
[
'checkin'
],
'checkout'
=>
$bookData
[
'checkout'
],
'price'
=>
$bookData
[
'amount'
],
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
])
);
$insert
=
array
(
'hotel_book_id'
=>
$bookId
,
'
customer_id'
=>
$user_id
,
'hotel_name'
=>
$bookData
[
'hotelName'
],
'hotel_image'
=>
$bookData
[
'hotelImage'
],
'checkin'
=>
$bookData
[
'checkin'
],
'checkout'
=>
$bookData
[
'checkout'
],
'price'
=>
$bookData
[
'amount'
],
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
]),
'traveller_details'
=>
$bookData
[
'requestData'
]
->
traveller_details
);
$this
->
db
->
insert
(
'hotel_booking'
,
$insert
);
$this
->
db
->
insert
(
'orders'
,
array
(
'booking_id'
=>
$bookId
,
'order_type'
=>
'2'
,
'created_date'
=>
date
(
'Y-m-d h:i:s'
)));
return
array
(
'status'
=>
1
,
'transaction_id'
=>
$bookId
);
...
...
This diff is collapsed.
Click to expand it.
application/models/Webservice_model.php
View file @
70d09155
...
...
@@ -1434,11 +1434,15 @@ class Webservice_model extends CI_Model {
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
if
(
$user_id
>
0
)
{
$count
=
$this
->
db
->
query
(
"
SELECT BOK.id FROM booking AS BOK
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN event_date_time AS EDT ON (EVT.event_id=EVT.event_id)
WHERE BOK.customer_id='
$user_id
' AND BOK.status IN (0,1,2,6) AND EVT.status='1'
GROUP BY BOK.id"
)
->
num_rows
();
SELECT ODR.order_id FROM orders AS ODR
INNER JOIN booking AS BOK ON
(ODR.booking_id=BOK.bookId AND BOK.status IN (0,1,2,3,5,6))
INNER JOIN flight_booking AS FBK ON
(ODR.booking_id=FBK.flight_book_id AND FBK.status IN (0,1,2,3,5))
INNER JOIN hotel_booking AS HBK ON
(ODR.booking_id=HBK.hotel_book_id AND HBK.status IN (0,1,2,3,5))
WHERE BOK.customer_id='
$user_id
' AND EVT.status='1'
GROUP BY ODR.order_id"
)
->
num_rows
();
if
(
$count
>
0
)
{
if
(
isset
(
$data
[
'page'
]))
{
...
...
This diff is collapsed.
Click to expand it.
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