Subversion Repositories SmartDukaan

Rev

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

Rev 9478 Rev 9725
Line 14... Line 14...
14
.submit { margin-left: 12em; }
14
.submit { margin-left: 12em; }
15
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
15
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
16
ul { padding-left: 13px;}
16
ul { padding-left: 13px;}
17
td{background-color:gainsboro};
17
td{background-color:gainsboro};
18
</style>
18
</style>
19
<style>
19
<style type="text/css">
20
.loading-image {
20
.loading-image {
21
position: fixed;
21
position: fixed;
22
top: 50%;
22
top: 50%;
23
left: 50%;
23
left: 50%;
24
margin-top: -50px;
24
margin-top: -50px;
Line 187... Line 187...
187
}
187
}
188
</script>
188
</script>
189
<script type="text/javascript">
189
<script type="text/javascript">
190
$(function(){	
190
$(function(){	
191
$("#snapdeal-form").live('submit', function(){
191
$("#snapdeal-form").live('submit', function(){
192
	var itemWeight=document.forms["snapdeal-form"]["itemWeight"].value;
192
	var itemWeight=$('#itemWeight').val();
-
 
193
	var transferPrice=$('#transferPrice').val();
193
	var warehouseId=document.forms["snapdeal-form"]["warehouseId"].value;
194
	var warehouseId=$('#warehouseId').val();
-
 
195
	var itemId=$('#itemId').val();
-
 
196
	var maxNlc=$('#maxNlc').val();
-
 
197
	var minPossibleSp=$('#minPosSp').val();
194
	var transferPrice=document.forms["snapdeal-form"]["transferPrice"].value;
198
	var sellingPrice=$('#sellingPrice').val();
195
	var maxNlc=document.forms["snapdeal-form"]["maxNlc"].value;
199
	var otherCost=$('#otherCost').val();
196
	
200
	
197
	if (warehouseId=="" || isNaN(warehouseId)){
201
	if (warehouseId=="" || isNaN(warehouseId)){
198
		jAlert('Illegal Entry In Warehouse Id', 'ERROR');
202
		jAlert('Illegal Entry In Warehouse Id', 'ERROR');
199
		return false;
203
		return false;
200
	}
204
	}
Line 202... Line 206...
202
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
206
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
203
		jAlert('Illegal Entry In Transfer Price', 'ERROR');
207
		jAlert('Illegal Entry In Transfer Price', 'ERROR');
204
		return false;
208
		return false;
205
	}
209
	}
206
	
210
	
-
 
211
	if (sellingPrice==0 || sellingPrice=="" || isNaN(sellingPrice)){
-
 
212
		jAlert('Illegal Entry In Selling Price', 'ERROR');
-
 
213
		return false;
-
 
214
	}
-
 
215
	
-
 
216
	if (otherCost=="" || isNaN(otherCost)){
-
 
217
		jAlert('Illegal Entry In Other Cost ', 'ERROR');
-
 
218
		return false;
-
 
219
	}
-
 
220
	
207
	if (maxNlc==0 || maxNlc=="" || isNaN(maxNlc)){
221
	if (maxNlc==0 || maxNlc=="" || isNaN(maxNlc)){
208
		jAlert('Illegal Entry In Max NLC field', 'ERROR');
222
		jAlert('Illegal Entry In Max NLC field', 'ERROR');
209
		return false;
223
		return false;
210
	}
224
	}
211
	
225
	
-
 
226
	if (parseFloat(sellingPrice) < minPossibleSp){
-
 
227
		if (!(confirm('Selling Price is below Minimum Possible Selling Price.Do you want to update?'))){
-
 
228
			return false;
-
 
229
		}
-
 
230
	}
-
 
231
	
212
	
232
	
213
 
233
 
214
	var data = $(this).serialize() 
234
	var data = $(this).serialize() 
215
 
235
 
216
    jQuery.ajax({
236
    jQuery.ajax({
Line 240... Line 260...
240
});
260
});
241
</script>
261
</script>
242
<script type="text/javascript">
262
<script type="text/javascript">
243
$(function(){	
263
$(function(){	
244
$("#add-new-item").live('submit', function(){
264
$("#add-new-item").live('submit', function(){
245
	var itemWeight=document.forms["add-new-item"]["itemWeight"].value;
265
	var itemWeight=$('#itemWeight').val();
246
	var transferPrice=document.forms["add-new-item"]["transferPrice"].value;
266
	var transferPrice=$('#transferPrice').val();
247
	var warehouseId=document.forms["add-new-item"]["warehouseId"].value;
267
	var warehouseId=$('#warehouseId').val();
248
	var itemId=document.forms["add-new-item"]["itemId"].value;
268
	var itemId=$('#itemId').val();
249
	var maxNlc=document.forms["add-new-item"]["maxNlc"].value;
269
	var maxNlc=$('#maxNlc').val();
-
 
270
	var otherCost=$('#otherCost').val();
-
 
271
	var minPossibleSp=$('#minPosSp').val();
-
 
272
	var sellingPrice=$('#sellingPrice').val();
250
	
273
	
251
	if (itemId==0 || itemId=="" || isNaN(itemId)){
274
	if (itemId==0 || itemId=="" || isNaN(itemId)){
252
		jAlert('Illegal Entry In Item Id ', 'ERROR');
275
		jAlert('Illegal Entry In Item Id ', 'ERROR');
253
		return false;
276
		return false;
254
	}
277
	}
Line 256... Line 279...
256
	if (warehouseId=="" || isNaN(warehouseId)){
279
	if (warehouseId=="" || isNaN(warehouseId)){
257
		jAlert('Illegal Entry In Warehouse Id ', 'ERROR');
280
		jAlert('Illegal Entry In Warehouse Id ', 'ERROR');
258
		return false;
281
		return false;
259
	}
282
	}
260
	
283
	
-
 
284
	if (sellingPrice==0 || sellingPrice=="" || isNaN(sellingPrice)){
-
 
285
		jAlert('Illegal Entry In Selling Price', 'ERROR');
-
 
286
		return false;
-
 
287
	}
-
 
288
	
261
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
289
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
262
		jAlert('Illegal Entry In Transfer Price ', 'ERROR');
290
		jAlert('Illegal Entry In Transfer Price ', 'ERROR');
263
		return false;
291
		return false;
264
	}
292
	}
265
	
293
	
-
 
294
	if (otherCost=="" || isNaN(otherCost)){
-
 
295
		jAlert('Illegal Entry In Other Cost ', 'ERROR');
-
 
296
		return false;
-
 
297
	}
-
 
298
	
266
	if (maxNlc==0 || maxNlc=="" || isNaN(maxNlc)){
299
	if (maxNlc==0 || maxNlc=="" || isNaN(maxNlc)){
267
		jAlert('Illegal Entry In Max NLC field', 'ERROR');
300
		jAlert('Illegal Entry In Max NLC field', 'ERROR');
268
		return false;
301
		return false;
269
	}
302
	}
270
	
303
	
-
 
304
	if (parseFloat(sellingPrice) < minPossibleSp){
-
 
305
		if (!(confirm('Selling Price is below Minimum Possible Selling Price.Do you want to update?'))){
-
 
306
			return false;
-
 
307
		}
-
 
308
	}
-
 
309
	
271
    var data = $(this).serialize() 
310
    var data = $(this).serialize() 
272
 
311
 
273
    jQuery.ajax({
312
    jQuery.ajax({
274
        url: "/Support/snapdeal-list!addNewItem",
313
        url: "/Support/snapdeal-list!addNewItem",
275
        type: 'POST',
314
        type: 'POST',
Line 314... Line 353...
314
			alert("Unable to get add new item form.");
353
			alert("Unable to get add new item form.");
315
		 },
354
		 },
316
    });
355
    });
317
});
356
});
318
</script>
357
</script>
-
 
358
<script type="text/javascript">
-
 
359
$('.changeHeld').live('click', function(){
-
 
360
	var whId = $(this).attr('warehouse_id');
-
 
361
	var item_id = $(this).attr('item_id');
-
 
362
	var held=$('#heldInventory_'+whId).val();
-
 
363
	if (held<0 || held=="" || isNaN(held)){
-
 
364
		jAlert('Illegal Entry In Held ', 'ERROR');
-
 
365
		return false;
-
 
366
	}
-
 
367
	jQuery.ajax({
-
 
368
        type : "GET",
-
 
369
        url : "/Support/snapdeal-list!changeHeldForSource?itemId="+item_id+"&warehouseId="+whId+"&held="+held,
-
 
370
		beforeSend: function(){
-
 
371
        $('#ajax-spinner').show();
-
 
372
        },
-
 
373
        complete: function(){
-
 
374
        $('#ajax-spinner').hide();
-
 
375
        },
-
 
376
        success : function(json){
-
 
377
		alert("Updated successfuly New Held="+held+" for warehouse Id "+whId);
-
 
378
        },
-
 
379
		error : function() {
-
 
380
			alert("Unable to update");
-
 
381
		 },
-
 
382
    });
-
 
383
	return false;
-
 
384
});
-
 
385
</script>
319
<title>SnapDeal Listed Items</title>
386
<title>SnapDeal Listed Items</title>
320
</head>
387
</head>
321
<body>
388
<body>
322
	<div style="padding: 20px 0px;">
389
	<div style="padding: 20px 0px;">
323
       <a style="padding-left: 10px;" href="/Support/logout">Logout</a>
390
       <a style="padding-left: 10px;" href="/Support/logout">Logout</a>