Subversion Repositories SmartDukaan

Rev

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

Rev 4605 Rev 4681
Line 464... Line 464...
464
        					+ "&orderStatus=" + orderStatus + "&" + formData,
464
        					+ "&orderStatus=" + orderStatus + "&" + formData,
465
        success : function(response) {
465
        success : function(response) {
466
            $('#' + domId).html(response);
466
            $('#' + domId).html(response);
467
        }
467
        }
468
    });
468
    });
-
 
469
    
-
 
470
    if(formData.indexOf("LOWER_PRICE_AVAILABLE_ELSEWHERE")!=-1){
-
 
471
    	var desc = formData.split("&");
-
 
472
    	var description = "Order cancelled because of Lower Price Available elsewhere";
-
 
473
    	$.ajax({
-
 
474
    		type : "POST",
-
 
475
    		url : "/crm/tickets?orderId="+orderId+"&priority=MEDIUM&category=PRODUCT_PROCUREMENT"
-
 
476
    				+ "&assigneeEmailId=chaitnaya.vats@shop2020.in&description="+description+"&"+desc[1],
-
 
477
    		success : function(response){
-
 
478
    			alert("Ticket created for Lower Price Available elsewhere");
-
 
479
    		}
-
 
480
    	});
-
 
481
    	
-
 
482
    }
469
}
483
}
470
 
484
 
471
function updateOrderStatus(domId, ticketId, orderId, orderStatus) {
485
function updateOrderStatus(domId, ticketId, orderId, orderStatus) {
472
    $.ajax({
486
    $.ajax({
473
        type : "POST",
487
        type : "POST",
Line 508... Line 522...
508
            $('#sidebar').html($(response).find('#sidebar').html());
522
            $('#sidebar').html($(response).find('#sidebar').html());
509
        }
523
        }
510
    });
524
    });
511
}
525
}
512
 
526
 
-
 
527
function showHidecancelReasonDiv(cancelReason){
-
 
528
	if(cancelReason=="LOWER_PRICE_AVAILABLE_ELSEWHERE"||cancelReason=="OTHER"){
-
 
529
		$('#cancelReasonBox').show();
-
 
530
	} else {
-
 
531
		$('#cancelReasonBox').hide();
-
 
532
	}
-
 
533
	
-
 
534
}
-
 
535
 
513
function blockPayment(transactionId, ticketId, paymentId) {
536
function blockPayment(transactionId, ticketId, paymentId) {
514
	$.ajax({
537
	$.ajax({
515
		type : "GET",
538
		type : "GET",
516
		url : "/crm/tickets!blockPayment?transactionId=" + transactionId + "&id=" + ticketId + "&paymentId=" + paymentId,
539
		url : "/crm/tickets!blockPayment?transactionId=" + transactionId + "&id=" + ticketId + "&paymentId=" + paymentId,
517
		success : function(response) {
540
		success : function(response) {