Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flexydial
/
hdfc-beu-v2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a47f0232
authored
2019-08-02 14:51:51 +0000
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Worked on campaign wise report and added some data for the same
1 parent
5c2f60e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
7 deletions
application/app/Http/Controllers/ReportController.php
application/resources/views/layout/module/reports/campaignwise.blade.php
application/app/Http/Controllers/ReportController.php
View file @
a47f023
...
...
@@ -181,7 +181,36 @@ class ReportController extends Controller
if
(
$id
==
"campaignwise"
)
{
return
view
(
"layout.module.reports.campaignwise"
,
array
());
$reportArr
=
$this
->
getCampaignWisePredictiveDetails
(
$data
);
$data
[
"reportArr"
]
=
$reportArr
[
"reportArr"
];
return
view
(
"layout.module.reports.campaignwise"
,
$data
);
}
}
public
function
getCampaignWisePredictiveDetails
(
$basicArr
)
{
$data
=
array
();
$reportArr
=
array
();
$typeArr
=
array
(
'Auto'
,
'AutoCall'
);
$timeoffset
=
$basicArr
[
"timeoffset"
];
$logdate
=
$basicArr
[
"logdate"
];
$logdateto
=
$basicArr
[
"logdateto"
];
$crmcallObjs
=
CRMCall
::
whereIn
(
'type'
,
$typeArr
)
->
where
(
'created_at'
,
'>='
,
date
(
"Y-m-d H:i:s"
,
$logdate
+
$timeoffset
))
->
where
(
'created_at'
,
'<='
,
date
(
"Y-m-d H:i:s"
,
$logdateto
+
$timeoffset
))
->
get
();
foreach
(
$crmcallObjs
as
$key
=>
$crmcallObj
)
{
$reportArr
[
$crmcallObj
->
client
][
'dials'
]
++
;
if
(
$crmcallObj
->
user_id
!=
0
)
$reportArr
[
$crmcallObj
->
client
][
'connects'
]
++
;
if
(
strstr
(
$crmcallObj
->
status
,
"NOANSWER"
))
$reportArr
[
$crmcallObj
->
client
][
'noanswer'
]
++
;
if
(
stristr
(
$crmcallObj
->
status
,
"busy"
))
$reportArr
[
$crmcallObj
->
client
][
'busy'
]
++
;
if
(
strstr
(
$crmcallObj
->
status
,
"ANSWER"
)
&&
$crmcallObj
->
user_id
==
0
)
$reportArr
[
$crmcallObj
->
client
][
'abandoned'
]
++
;
}
$data
[
"reportArr"
]
=
$reportArr
;
return
$data
;
}
}
...
...
application/resources/views/layout/module/reports/campaignwise.blade.php
View file @
a47f023
...
...
@@ -65,23 +65,25 @@
</thead>
<tbody>
@foreach($reportArr as $client=>$value)
<tr>
<td>
{{$client}}
</td>
<td>
{{$value['dials']}}
</td>
<td>
{{$value['connects']}}
</td>
<td></td>
<td></td>
<td></td>
<td>
{{$value['noanswer']}}
</td>
<td>
{{$value['busy']}}
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
{{$value['abandoned']}}
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
@endforeach
</tbody>
</table>
</div>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment