Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nemt_backend
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
Tobin
nemt_backend
Commits
02b2cd4a
Commit
02b2cd4a
authored
Dec 15, 2018
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter issue fix
parent
120128b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
Ride.php
application/controllers/Ride.php
+1
-0
Ride_model.php
application/models/Ride_model.php
+3
-5
No files found.
application/controllers/Ride.php
View file @
02b2cd4a
...
...
@@ -573,6 +573,7 @@ class Ride extends CI_Controller {
$company_data
=
''
;
if
(
$this
->
session
->
userdata
[
'user_type'
]
==
1
){
$company_id
=
''
;
$broker_id
=
(
!
isset
(
$_POST
[
'company_id'
])
||
empty
(
$company_id
=
$_POST
[
'company_id'
]))
?
''
:
$broker_id
;
...
...
application/models/Ride_model.php
View file @
02b2cd4a
...
...
@@ -42,15 +42,12 @@ class Ride_model extends CI_Model {
return
(
$status
)
?
1
:
0
;
}
function
getRideData
(
$ride_id
=
''
,
$company_id
=
''
,
$broker_id
=
''
,
$scheduled
=
''
,
$condArr
=
array
()){
function
getRideData
(
$ride_id
=
''
,
$company_id
=
''
,
$broker_id
=
''
,
$scheduled
=
''
,
$condArr
=
array
()){
$cond
=
(
!
empty
(
$ride_id
))
?
" AND TD.transport_id = '
$ride_id
'"
:
""
;
$cond
.=
(
$broker_id
!=
''
)
?
" AND TD.broker_id = '
$broker_id
'"
:
""
;
$cond
.=
(
$scheduled
!=
''
)
?
" AND TD.is_scheduled = '
$scheduled
'"
:
""
;
$cond
.=
(
!
empty
(
$company_id
))
?
" AND TD.company_id = '
$company_id
'"
:
""
;
if
(
$scheduled
!=
''
){
$cond
.=
" AND TD.is_scheduled = '
$scheduled
'"
;
}
if
(
!
empty
(
$condArr
)){
$cond
.=
implode
(
' '
,
$condArr
);
}
...
...
@@ -66,6 +63,7 @@ class Ride_model extends CI_Model {
LEFT JOIN appointment_reason AS AR ON (AR.reason_id = TD.reason_code)
WHERE TD.status != '2' "
.
$cond
.
"
ORDER BY TD.transport_id DESC"
;
$ride_data
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$ride_data
)){
return
;
...
...
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