Subversion Repositories SmartDukaan

Rev

Rev 16773 | Rev 16813 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16773 Rev 16811
Line 1... Line 1...
1
<div class="appTransactions index">
1
<div class="appTransactions index">
-
 
2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
2
	<h2><?php echo __('App Transactions'); ?></h2>
3
	<h2><?php echo __('App Transactions Retailer Wise'); ?></h2>
-
 
4
		<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/retailer">
-
 
5
        		<div><select id="mySelect">
-
 
6
					  <option value="today">Today</option>
-
 
7
					  <option value="yesterday">Yesterday</option>
-
 
8
					  <option value="range">Date Range</option>
-
 
9
					</select></div>
-
 
10
 
-
 
11
				<div style="margin_top:10dp" 
-
 
12
				class="input-group col-xs-6 text-left" id="date_range" >
-
 
13
    				Date From<input type="date" name="date_from" value="Date"/>
-
 
14
    				Date To<input type="date" name="date_to" value="Date"/>
-
 
15
    				
-
 
16
                    <div class="input-group-btn w25px">
-
 
17
                        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
-
 
18
                    
-
 
19
                </div>
-
 
20
        		</div>
-
 
21
 
-
 
22
                
-
 
23
            </form>
-
 
24
	
-
 
25
 
3
	<table cellpadding="0" cellspacing="0" class="table table-striped">
26
	<table cellpadding="0" cellspacing="0" class="table table-striped">
4
	<tr>
27
	<tr>
5
			<th><?php echo $this->Paginator->sort('app_id'); ?></th>
28
			<th><?php echo $this->Paginator->sort('retailer_id'); ?></th>
6
			<th><?php echo $this->Paginator->sort('app_name'); ?></th>
-
 
7
			<th><?php echo $this->Paginator->sort('count'); ?></th>
29
			<th><?php echo $this->Paginator->sort('count'); ?></th>
8
			<th><?php echo $this->Paginator->sort('approved'); ?></th>
30
			<th><?php echo $this->Paginator->sort('approved'); ?></th>
9
			<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th> 
31
			<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th> 
10
		
32
		
11
	</tr>
33
	</tr>
12
 
34
 
13
	<?php foreach ($appTransactions as $appTransaction): ?>
35
	<?php foreach ($appTransactions as $appTransaction): ?>
14
	<tr>
36
	<tr>
15
		<td><?php echo h($appTransaction['AppTransaction']['app_id']); ?>&nbsp;</td>
37
		<td><?php echo h($appTransaction['AppTransaction']['retailer_id']); ?>&nbsp;</td>
16
		<td><?php echo h($appTransaction['AppTransaction']['app_name']); ?>&nbsp;</td>
-
 
17
		<td><?php echo h($appTransaction[0]['count']); ?>&nbsp;</td>
38
		<td><?php echo h($appTransaction[0]['count']); ?>&nbsp;</td>
18
		<td><?php echo h($appTransaction['AppTransaction']['approved']); ?>&nbsp;</td>
39
		<td><?php if(!isset($appTransaction['AppTransaction']['approved'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['approved']);}; ?>&nbsp;</td>
19
		<td><?php echo h($appTransaction['AppTransaction']['payout_description']); ?>&nbsp;</td>
40
		<td><?php if(!isset($appTransaction['AppTransaction']['conversion_percentage'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['conversion_percentage']);}; ?>&nbsp;</td>
20
		
-
 
21
	</tr>
41
	</tr>
22
<?php endforeach; ?>
42
<?php endforeach; ?>
23
	</table>
43
	</table>
24
	<p>
44
	<p>
25
	<?php
45
	<?php
Line 32... Line 52...
32
		echo $this->Paginator->prev('< ' . __('previous '), array(), null, array('class' => 'prev disabled'));
52
		echo $this->Paginator->prev('< ' . __('previous '), array(), null, array('class' => 'prev disabled'));
33
		echo $this->Paginator->numbers(array('separator' => ' '));
53
		echo $this->Paginator->numbers(array('separator' => ' '));
34
		echo $this->Paginator->next(__(' next') . ' >', array(), null, array('class' => 'next disabled'));
54
		echo $this->Paginator->next(__(' next') . ' >', array(), null, array('class' => 'next disabled'));
35
	?>
55
	?>
36
	</div>
56
	</div>
-
 
57
	<script type="text/javascript">
-
 
58
		$('#mySelect').on('change', function() {
-
 
59
			  var value = $(this).val();
-
 
60
			  if(value=='yesterday'){
-
 
61
			  	 $('#date_range').hide();
-
 
62
			  	 document.location = '/admin/appTransactions/retailer?date=yesterday';
-
 
63
			  }
-
 
64
			  if(value=='today'){
-
 
65
			  	 $('#date_range').hide();
-
 
66
			  	 document.location = '/admin/appTransactions/retailer';
-
 
67
			  }
-
 
68
			  if(value=='range'){
-
 
69
			  	 $('#date_range').show(); 
-
 
70
			  }
-
 
71
			  
-
 
72
		});
-
 
73
	</script>
-
 
74
	<script type="text/javascript">
-
 
75
	$(document).ready(function() {
-
 
76
    if($("#mySelect").val() == "today"){
-
 
77
        $("#date_range").hide();
-
 
78
    	}
-
 
79
	});
-
 
80
	</script>
37
</div>
81
</div>