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
95bea8cc
Commit
95bea8cc
authored
5 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flight booking changes
parent
380a3def
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Api_model.php
application/models/Api_model.php
+6
-5
No files found.
application/models/Api_model.php
View file @
95bea8cc
...
...
@@ -1809,7 +1809,7 @@ class Api_model extends CI_Model {
$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
);
$bookData
[
'amount'
],
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
]),
'traveller_details'
=>
json_encode
(
$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
);
...
...
@@ -1848,10 +1848,11 @@ class Api_model extends CI_Model {
return
;
}
$bookId
=
'FBK'
.
date
(
'ymd'
)
.
str_pad
(
rand
(
1111
,
9999
),
4
,
0
,
STR_PAD_LEFT
);
$insert
=
array
(
'flight_book_id'
=>
$bookId
,
'flight_name'
=>
$bookData
[
'flightName'
],
'flight_image'
=>
$bookData
[
'flightImage'
],
'departure_date'
=>
$bookData
[
'departure_date'
],
'arrival_date'
=>
$bookData
[
'arrival_date'
],
'price'
=>
$bookData
[
'amount'
],
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
]));
$insert
=
array
(
'flight_book_id'
=>
$bookId
,
'customer_id'
=>
$user_id
,
'flight_name'
=>
$bookData
[
'flightName'
],
'flight_image'
=>
$bookData
[
'flightImage'
],
'departure_date'
=>
$bookData
[
'departure_date'
],
'arrival_date'
=>
$bookData
[
'arrival_date'
],
'price'
=>
$bookData
[
'amount'
],
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
]),
'traveller_details'
=>
json_encode
(
$bookData
[
'requestData'
][
'traveller_details'
]));
$this
->
db
->
insert
(
'flight_booking'
,
$insert
);
$this
->
db
->
insert
(
'orders'
,
array
(
'booking_id'
=>
$bookId
,
'order_type'
=>
'3'
,
'created_date'
=>
date
(
'Y-m-d h:i:s'
)));
return
array
(
'status'
=>
1
,
'transaction_id'
=>
$bookId
);
...
...
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