Virtualdata.blade.php
2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
use App\Models\CRMCall;
use App\Models\User;
use App\Jobs\KHRMSLib;
$attempts = CRMCall::where('userstatus','!=','InboundDROP')->where('created_at','>',date('Y-m-d',time()))->where('user_id','=',Auth::user()->id)->count();
//print_r(($attempts));
$Contacts = CRMCall::where('userstatus','NOT IN',"('NORECORD','InboundDROP')")->where('created_at','>',date('Y-m-d',time()))->where('user_id','=',Auth::user()->id)->count();
$uniqueContacts = DB::select("select count(distinct(number)) as uniquecount from crmcalls where userstatus NOT IN ('InboundDROP','NORECORD') and user_id=".Auth::user()->id." group by number");
//print_r($uniqueContacts);
//include(resource_path().'/views/layout/module/virtualchannel/VirtualFieldsArray.php');
//print_r($Product);
//echo "<div>Virtual</div>";
?>
<div class="table-responsive" style="background: #fff;">
<br>
<div><h4>Virtual Channels</h4></div>
<table class="table">
<thead>
<tr>
<th>No.of Attempts</th>
<th><?php echo $attempts; ?></th>
</tr>
<tr>
<th>No.of Contacts</th>
<th><?php echo $Contacts; ?></th>
</tr>
<tr>
<th>Unique Contacts</th>
<th><?php foreach($uniqueContacts as $uniquecounts){echo $uniquecounts->uniquecount; } ?></th>
</tr>
<tr>
<th>Income Achievement</th>
<th></th>
</tr>
<tr>
<th>Product</th>
<th>LG</th>
<th>Expected Amount(If Applicable)</th>
<th>LC</th>
<th>Amount(If Applicable)</th>
</tr>
<?php
include(resource_path().'/views/layout/module/virtualchannel/VirtualFieldsArray.php');
foreach ($Product as $ProductType => $value) {
$i=1;
?>
<tr>
<td><?php echo $ProductType; ?></td>
<?php foreach ($value as $key => $ProductAmt) { ?>
<td><?php if($ProductAmt==''){ ?><input type="number" name=<?php echo $ProductType."".$i;?> id=<?php echo $ProductType."".$i;?>> <?php }else echo $ProductAmt; $i++;}?></td>
</tr>
<?php } ?>
</table>
</div>