Subversion Repositories SmartDukaan

Rev

Rev 16952 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16943 manas 1
<div class="appTransactions index">
2
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
3
	<h2><?php echo __('App Offer Price and Payout Amount'.$date); ?></h2>
4
	<?php foreach ($total as $key => $value): ?>
5
	<h4><?php echo __('Total Offer Price '.$value[0]['total_offer_price']);?></h4>
6
	<h4><?php echo __('Total Final User Payout '.$value[0]['total_payout_amount']);?></h4>	
7
	<?php endforeach ?>
8
 
9
 
10
	<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/pricewise">
11
		<div><select id="mySelect">
12
			  <option value="today">Today</option>
13
			  <option value="yesterday">Yesterday</option>
14
			  <option value="range">Date Range</option>
15
			</select></div>
16
		<div class="input-group col-xs-6 text-left" id="date_range" >
17
			Date From<input type="date" name="date_from" value="Date"/>
18
			Date To<input type="date" name="date_to" value="Date"/>
19
			<div class="input-group col-xs-6 text-right" id="remote">
20
            <div class="input-group-btn w25px">
21
                <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
22
            </div>
23
        </div>
24
		</div>
25
    </form>
26
 
27
	<table cellpadding="0" cellspacing="0" class="table table-striped">
28
	<tr>
29
			<th><?php echo('Offer Price'); ?></th>
30
			<th><?php echo('User Final Payout Amount'); ?></th>
31
	</tr>
32
	<?php foreach ($datewiseTotal as $appTransaction): ?>
33
	<tr>
34
		<td><?php if(!isset($appTransaction[0]['offer_price'])){echo h('0');}else{
35
			echo h($appTransaction[0]['offer_price']);
36
			} ?>&nbsp;</td>
37
			<td><?php if(!isset($appTransaction[0]['payout_amount'])){echo h('0');}else{
38
			echo h($appTransaction[0]['payout_amount']);
39
			} ?>&nbsp;</td>
40
 
41
	</tr>
42
<?php endforeach; ?>
43
	</table>
44
	<script type="text/javascript">
45
		$('#mySelect').on('change', function() {
46
			  var value = $(this).val();
47
			  if(value=='yesterday'){
48
			  	 $('#date_range').hide();
49
			  	 document.location = '/admin/appTransactions/pricewise?date=yesterday';
50
			  }
51
			  if(value=='today'){
52
			  	 $('#date_range').hide();
53
			  	 document.location = '/admin/appTransactions/pricewise';
54
			  }
55
			  if(value=='range'){
56
			  	 $('#date_range').show(); 
57
			  }
58
 
59
		});
60
	</script>
61
	<script type="text/javascript">
62
	$(document).ready(function() {
63
    if($("#mySelect").val() == "today"){
64
        $("#date_range").hide();
65
    	}
66
	});
67
	</script>
68
</div>