Subversion Repositories SmartDukaan

Rev

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

Rev 24019 Rev 24047
Line 57... Line 57...
57
						  <div class="form-group row">
57
						  <div class="form-group row">
58
						  	<div class="col-lg-4">
58
						  	<div class="col-lg-4">
59
						  		<label for="priceDrop">Price Drop Announced:</label>
59
						  		<label for="priceDrop">Price Drop Announced:</label>
60
							    <input type="number" class="form-control" id="pd">
60
							    <input type="number" class="form-control" id="pd">
61
							</div>
61
							</div>
-
 
62
						  	<div class="col-lg-4">
-
 
63
						  		<label for="priceDrop">Current Dp:</label>
-
 
64
							    <input type="number" readonly class="form-control" id="dp">
-
 
65
							</div>
62
							<div class="col-lg-4">
66
							<div class="col-lg-4">
63
							    <label for="dpDrop">New Transfer Price:</label>
67
							    <label for="dpDrop">New Transfer Price:</label>
64
							    <input type="number" class="form-control" id="newTp">
68
							    <input type="number" class="form-control" id="newTp">
65
							</div>
69
							</div>
66
							<div class="col-lg-4">
70
							<div class="col-lg-4">
Line 89... Line 93...
89
	    			<thead>
93
	    			<thead>
90
			            <tr>
94
			            <tr>
91
							<th>Item Name</th>
95
							<th>Item Name</th>
92
							<th>Old DP</th>
96
							<th>Old DP</th>
93
							<th>Price Drop</th>
97
							<th>Price Drop</th>
94
							<th>New DP</th>
98
							<th>Mop</th>
95
							<th>TP</th>
99
							<th>TP</th>
96
							<th>NLC </th>
100
							<th>NLC </th>
97
							<th>Affected On</th>
101
							<th>Affected On</th>
98
							<th>Created On</th>
102
							<th>Created On</th>
99
							<th>Price Drop In</th>
103
							<th>Price Drop In</th>
Line 107... Line 111...
107
						#foreach($priceDrop in $priceDrops )
111
						#foreach($priceDrop in $priceDrops )
108
						<tr data-pricedropid="$priceDrop.getId()">
112
						<tr data-pricedropid="$priceDrop.getId()">
109
							<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
113
							<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
110
							<td>$priceDrop.getOldDp()</td>
114
							<td>$priceDrop.getOldDp()</td>
111
							<td>$priceDrop.getAmount()</td>
115
							<td>$priceDrop.getAmount()</td>
112
							<td>$priceDrop.getNewDp()</td>
116
							<td>$priceDrop.getMop()</td>
113
							<td>$priceDrop.getTp()</td>
117
							<td>$priceDrop.getTp()</td>
114
							<td>$priceDrop.getNlc()</td>
118
							<td>$priceDrop.getNlc()</td>
115
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
119
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
116
							<td>$priceDrop.getCreatedOn().format($dateTimeFormatter)</td>
120
							<td>$priceDrop.getCreatedOn().format($dateTimeFormatter)</td>
117
							#if($priceDrop.getProcessTimestamp())
121
							#if($priceDrop.getProcessTimestamp())
Line 145... Line 149...
145
$(document).ready(function() {
149
$(document).ready(function() {
146
	    var start = moment().subtract(29, 'days');
150
	    var start = moment().subtract(29, 'days');
147
    	var end = moment();
151
    	var end = moment();
148
	
152
	
149
  priceDropTable = $('#priceDrop').find('table').DataTable({
153
  priceDropTable = $('#priceDrop').find('table').DataTable({
150
  "pageLength": 10,
154
  "pageLength": 20,
151
  order:[[ 5, 'desc' ]]
155
  order:[[ 5, 'desc' ]]
152
  });
156
  });
153
  customItems = $customItems;
157
  customItems = $customItems;
154
  itemAhead = $("#typeaheaditem").typeahead({
158
  itemAhead = $("#typeaheaditem").typeahead({
155
	  source: customItems,
159
	  source: customItems,
156
	  autoSelect: false,
160
	  autoSelect: false,
157
	  displayText:function(item){return item.itemDescription;},
161
	  displayText:function(item){return item.itemDescription;},
158
	  afterSelect:	function(selectedItem){
162
	  afterSelect:	function(selectedItem){
159
	  					console.log(selectedItem);
163
	  					console.log(selectedItem);
160
	  					currentItem = selectedItem;
164
	  					currentItem = selectedItem;
-
 
165
	  					doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
-
 
166
	  						response = JSON.parse(response);
-
 
167
							$('#dp').val(response.dp);
-
 
168
							$('#newMop').attr("placeholder", response.mop);
-
 
169
							$('#newTp').attr("placeholder", response.tp);
-
 
170
							$('#newNlc').attr("placeholder", response.nlc);
-
 
171
						});
161
	  				}
172
	  				}
162
	});
173
	});
163
  });
174
  });
164
  affectedDateInput=$('#affectedDate');
175
  affectedDateInput=$('#affectedDate');
165
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
176
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);