Subversion Repositories SmartDukaan

Rev

Rev 12676 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12676 Rev 13409
Line 278... Line 278...
278
<script type="text/javascript">
278
<script type="text/javascript">
279
$(function(){	
279
$(function(){	
280
$("#amazon-promo-form").live('submit', function(){
280
$("#amazon-promo-form").live('submit', function(){
281
    var fbaPromoStatus = $('#isFbaPromotionActive').val();
281
    var fbaPromoStatus = $('#isFbaPromotionActive').val();
282
	var fbbPromoStatus = $('#isFbbPromotionActive').val();
282
	var fbbPromoStatus = $('#isFbbPromotionActive').val();
283
	console.log(fbaPromoStatus=="true");
-
 
284
	console.log(fbbPromoStatus=="true");
-
 
285
	if (fbaPromoStatus=="true"){
283
	if (fbaPromoStatus=="true"){
286
		var fbaPromoPrice = $('#fbaPromoPrice').val();
284
		var fbaPromoPrice = parseFloat($('#fbaPromoPrice').val());
287
		var maxFbaSalePrice = $('#fbaMaxSalePrice').val();
285
		var maxFbaSalePrice = parseFloat($('#fbaMaxSalePrice').val());
288
		
286
		
289
		if (fbaPromoPrice<=0 || fbaPromoPrice==null || fbaPromoPrice=="" || isNaN(fbaPromoPrice)){
287
		if (fbaPromoPrice<=0 || fbaPromoPrice==null || fbaPromoPrice=="" || isNaN(fbaPromoPrice)){
290
			jAlert('Illegal value in Fba Promo Price field', 'ERROR');
288
			jAlert('Illegal value in Fba Promo Price field', 'ERROR');
291
      		return false;
289
      		return false;
292
		}
290
		}
Line 301... Line 299...
301
      		return false;
299
      		return false;
302
		}
300
		}
303
	}
301
	}
304
	
302
	
305
	if (fbbPromoStatus=="true"){
303
	if (fbbPromoStatus=="true"){
306
		var fbbPromoPrice = $('#fbbPromoPrice').val();
304
		var fbbPromoPrice = parseFloat($('#fbbPromoPrice').val());
307
		var maxFbbSalePrice = $('#fbbMaxSalePrice').val();
305
		var maxFbbSalePrice = parseFloat($('#fbbMaxSalePrice').val());
308
		
306
		
309
		if (fbbPromoPrice<=0 || fbbPromoPrice==null || fbbPromoPrice=="" || isNaN(fbbPromoPrice)){
307
		if (fbbPromoPrice<=0 || fbbPromoPrice==null || fbbPromoPrice=="" || isNaN(fbbPromoPrice)){
310
			jAlert('Illegal value in Fbb Promo Price field', 'ERROR');
308
			jAlert('Illegal value in Fbb Promo Price field', 'ERROR');
311
      		return false;
309
      		return false;
312
		}
310
		}