Subversion Repositories SmartDukaan

Rev

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

Rev 24409 Rev 24410
Line 148... Line 148...
148
							</div>
148
							</div>
149
							<div class="col-lg-3">
149
							<div class="col-lg-3">
150
							    <label for="newTp">TP:(<span id="oldTp"></span>)</label>
150
							    <label for="newTp">TP:(<span id="oldTp"></span>)</label>
151
							    <input type="number" class="form-control" id="newTp">
151
							    <input type="number" class="form-control" id="newTp">
152
							</div>
152
							</div>
153
							<div class="col-lg-3">
-
 
154
							    <label for="newNlc">NLC:(<span id="oldNlc"></span>)</label>
-
 
155
							    <input type="number" class="form-control" id="newNlc">
-
 
156
							</div>
-
 
157
						  </div>
153
						  </div>
158
						</form>
154
						</form>
159
				      </div>
155
				      </div>
160
				      <div class="modal-footer">
156
				      <div class="modal-footer">
161
						  <button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
157
						  <button type="button" class="addPriceDrop btn btn-primary">Add Price Drop</button>
Line 174... Line 170...
174
			<div class="col-lg-12" id="priceDrop" >
170
			<div class="col-lg-12" id="priceDrop" >
175
				<table class="table table-striped table-condensed table-bordered">
171
				<table class="table table-striped table-condensed table-bordered">
176
	    			<thead>
172
	    			<thead>
177
			            <tr>
173
			            <tr>
178
							<th>Item Name</th>
174
							<th>Item Name</th>
179
							<th>Old DP</th>
-
 
180
							<th>Price Drop</th>
-
 
181
							<th>Mop</th>
-
 
182
							<th>TP</th>
175
							<th>TP</th>
-
 
176
							<th>DP</th>
-
 
177
							<th>Mop</th>
-
 
178
							<th>Price Drop</th>
183
							<th>NLC </th>
179
							<th>New DP</th>
184
							<th>Affected On</th>
180
							<th>Affected On</th>
185
							<th>Created On</th>
181
							<th>Created On</th>
186
							<th>Price Drop In</th>
182
							<th>Price Drop In</th>
187
							<th>Partner Payout</th>
183
							<th>Partner Payout</th>
188
							<th>Processed On</th>
184
							<th>Processed On</th>
Line 192... Line 188...
192
			        </thead>
188
			        </thead>
193
					<tbody>
189
					<tbody>
194
						#foreach($priceDrop in $priceDrops )
190
						#foreach($priceDrop in $priceDrops )
195
						<tr data-pricedropid="$priceDrop.getId()">
191
						<tr data-pricedropid="$priceDrop.getId()">
196
							<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
192
							<td>$catalogDescription.get($priceDrop.getCatalogItemId())</td>
-
 
193
							<td>$priceDrop.getTp()</td>
197
							<td>$priceDrop.getOldDp()</td>
194
							<td>$priceDrop.getOldDp()</td>
198
							<td>$priceDrop.getAmount()</td>
-
 
199
							<td>$priceDrop.getMop()</td>
195
							<td>$priceDrop.getMop()</td>
200
							<td>$priceDrop.getTp()</td>
196
							<td>$priceDrop.getAmount()</td>
201
							<td>$priceDrop.getNlc()</td>
197
							<td>$priceDrop.getNewDp()</td>
202
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
198
							<td>$priceDrop.getAffectedOn().format($dateFormatter)</td>
203
							<td>$priceDrop.getCreatedOn().format($dateFormatter)</td>
199
							<td>$priceDrop.getCreatedOn().format($dateFormatter)</td>
204
							#if($priceDrop.getPartnerPayout()>0)
200
							#if($priceDrop.getPartnerPayout()>0)
205
							<td>$priceDrop.getPriceDropIn()</td>
201
							<td>$priceDrop.getPriceDropIn()</td>
206
							<td>$priceDrop.getPartnerPayout()</td>
202
							<td>$priceDrop.getPartnerPayout()</td>
Line 231... Line 227...
231
				</table>
227
				</table>
232
				</div>
228
				</div>
233
				</div>
229
				</div>
234
				</div>
230
				</div>
235
				</section>
231
				</section>
236
<script type="text/javascript" src="resources/js/price-drop.js?v=${version}"></script>
-
 
237
<script type="text/javascript">
232
<script type="text/javascript">
-
 
233
$(document).ready(function() {
-
 
234
	var start = moment().subtract(29, 'days');
-
 
235
	var end = moment();
-
 
236
	
-
 
237
  	priceDropTable = $('#priceDrop').find('table').DataTable({
-
 
238
  		pageLength: 20,
-
 
239
  		order:[[ 5, 'desc' ]]
-
 
240
	});
-
 
241
  
-
 
242
  
-
 
243
  	getItemAheadOptions($("#typeaheaditem"),function(selectedItem){
-
 
244
		currentItem = selectedItem;
-
 
245
		doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
-
 
246
			response = JSON.parse(response);
-
 
247
			$('#oldDp').html(response.dp);
-
 
248
			$('#oldMop').html(response.mop);
-
 
249
			$('#oldTp').html(response.tp);
-
 
250
			$('#oldNlc').html(response.nlc);
-
 
251
		});
-
 
252
	});
-
 
253
	getItemAheadOptions($("#typeaheaditem1"), function(selectedItem){
-
 
254
		currentItem = selectedItem;
-
 
255
		doGetAjaxRequestHandler(context+"/item-pricing/"+currentItem.itemId, function(response){
-
 
256
			response = JSON.parse(response);
-
 
257
			
-
 
258
			$("#mop").val(response.mop);
-
 
259
			$("#mrp").val(response.mrp);
-
 
260
			$("#dp").val(response.dp);
-
 
261
			$('#dpValue').html("DP -" + response.dp);
-
 
262
			$('#mopValue').html("MOP -" + response.mop);
-
 
263
			$('#mrpValue').html("MRP -"+ response.mrp);
-
 
264
		});
-
 
265
	});
238
  affectedDateInput=$('#affectedDate');
266
	affectedDateInput=$('#affectedDate');
239
  affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
267
	affectedDateInput.daterangepicker(getSingleDatePicker(), dateRangeCallback);
240
  $("#newPriceDropModal").on('hidden.bs.modal', function () {
268
	$("#newPriceDropModal").on('hidden.bs.modal', function () {
241
        $("#pdForm").trigger("reset");
269
	      $("#pdForm").trigger("reset");
242
  });
270
	});
243
  $("#addPriceModal").on('hidden.bs.modal', function () {
271
	$("#addPriceModal").on('hidden.bs.modal', function () {
244
        $("#pdForm1").trigger("reset");
272
	      $("#pdForm1").trigger("reset");
245
  });
273
	});
-
 
274
});
246
</script>
275
</script>
247
276