Subversion Repositories SmartDukaan

Rev

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

Rev 7731 Rev 8822
Line 495... Line 495...
495
                $('#bottom-infopane').html(response);
495
                $('#bottom-infopane').html(response);
496
            }
496
            }
497
        });
497
        });
498
        $.colorbox.close();
498
        $.colorbox.close();
499
    });
499
    });
-
 
500
    
-
 
501
        
-
 
502
    $('#refundPayment').live('click', function() {
-
 
503
    	$('#refundPayment').hide();
-
 
504
    	$('#refundDetailSubmit').attr('disabled', 'true');
-
 
505
    	$('#refundPhysicalOrderForm').slideDown(100);
-
 
506
    });
-
 
507
    
-
 
508
    $('#cancelRefundRequest').live('click', function() {
-
 
509
    	$('#refundPhysicalOrderForm').slideUp(100, function(){
-
 
510
    		$("#rfdCheque").attr("checked", false);
-
 
511
            $("#rfdGateway").attr("checked", false);
-
 
512
            $("#rfdCoupon").attr("checked", false);
-
 
513
            $('div#refundByCoupon').hide();
-
 
514
            $('div#refundByCheque').hide();
-
 
515
            $('div#refundByGateway').hide();
-
 
516
            $('#refundPayment').show();
-
 
517
            $('#couponDetails').val('');
-
 
518
            $('#refundAmountCoupon').val('');
-
 
519
            $('#chequeDetails').val('');
-
 
520
            $('#refundAmountCheque').val('');
-
 
521
            $('#comments').val('');
-
 
522
            $('#refundAmountGateway').val('');
-
 
523
    	});
-
 
524
    });
-
 
525
    
-
 
526
    $('#refundPhysicalOrderForm').live('submit', function(){
-
 
527
    	var radioBtnValue = $("input[name='rfdRadio']:checked").val()
-
 
528
    	if(radioBtnValue == 'rfdCoupon')
-
 
529
		{
-
 
530
			var couponDeatils = $("input[name='couponDetails']").val();
-
 
531
			var refundAmountCoupon = $("input[name='refundAmountCoupon']").val();
-
 
532
			if(couponDeatils==null || couponDeatils=="")
-
 
533
			{
-
 
534
				alert("Coupon Details are Mandatory. Please fill the Details");
-
 
535
				$('input[name=couponDetails]').focus();
-
 
536
				return false;
-
 
537
			}
-
 
538
			if(refundAmountCoupon==null || refundAmountCoupon=="")
-
 
539
			{
-
 
540
				alert("Refund Amount is Mandatory. Please fill the Amount");
-
 
541
				$('input[name=refundAmountCoupon]').focus();
-
 
542
				return false;
-
 
543
			}
-
 
544
		}
-
 
545
		if(radioBtnValue == 'rfdCheque')
-
 
546
		{
-
 
547
			var chequeDetails = $("input[name='chequeDetails']").val();
-
 
548
			var refundAmountCheque = $("input[name='refundAmountCheque']").val();
-
 
549
			if(chequeDetails==null || chequeDetails=="")
-
 
550
			{
-
 
551
				alert("Cheque Details are Mandatory. Please fill the Details");
-
 
552
				$('input[name=chequeDetails]').focus();
-
 
553
				return false;
-
 
554
			}
-
 
555
			if(refundAmountCheque==null || refundAmountCheque=="")
-
 
556
			{
-
 
557
				alert("Refund Amount is Mandatory. Please fill the Amount");
-
 
558
				$('input[name=refundAmountCheque]').focus();
-
 
559
				return false;
-
 
560
			}
-
 
561
		}
-
 
562
		if(radioBtnValue == 'rfdGateway')
-
 
563
		{
-
 
564
			var comments = $("input[name='comments']").val();
-
 
565
			var refundAmountGateway = $("input[name='refundAmountGateway']").val();
-
 
566
			if(comments==null || comments=="")
-
 
567
			{
-
 
568
				alert("Comments Mandatory. Please fill the Details");
-
 
569
				$('input[name=comments]').focus();
-
 
570
				return false;
-
 
571
			}
-
 
572
			if(refundAmountGateway==null || refundAmountGateway=="")
-
 
573
			{
-
 
574
				alert("Refund Amount is Mandatory. Please fill the Amount");
-
 
575
				$('input[name=refundAmountGateway]').focus();
-
 
576
				return false;
-
 
577
			}
-
 
578
		}
-
 
579
    	refundOrderPayment($(this).serialize());
-
 
580
    	return false;
-
 
581
    });
-
 
582
    
-
 
583
    $('#rfdCoupon').live('click', function() {
-
 
584
        $('div#refundByCoupon').show();
-
 
585
        $('div#refundByCheque').hide();
-
 
586
        $('div#refundByGateway').hide();
-
 
587
        $('#refundDetailSubmit').removeAttr('disabled');
-
 
588
     
-
 
589
    });
-
 
590
    $('#rfdGateway').live('click', function() {
-
 
591
        $('div#refundByCoupon').hide();
-
 
592
        $('div#refundByCheque').hide();
-
 
593
        $('div#refundByGateway').show();
-
 
594
        $('#refundDetailSubmit').removeAttr('disabled');
-
 
595
        
-
 
596
    });
-
 
597
    $('#rfdCheque').live('click', function() {
-
 
598
        $('div#refundByCoupon').hide();
-
 
599
        $('div#refundByCheque').show();
-
 
600
        $('div#refundByGateway').hide();
-
 
601
        $('#refundDetailSubmit').removeAttr('disabled');
-
 
602
       
-
 
603
    });
-
 
604
    
-
 
605
 
-
 
606
 
500
});
607
});