Subversion Repositories SmartDukaan

Rev

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

Rev 32258 Rev 32261
Line 648... Line 648...
648
 
648
 
649
		var invoiceId = $(this).data("invoiceid");
649
		var invoiceId = $(this).data("invoiceid");
650
 
650
 
651
		var requestId = $(this).data("requestid");
651
		var requestId = $(this).data("requestid");
652
 
652
 
653
		var pricemismatch = $(this).data("pricemismatch");
653
		var mismatch = $(this).data("mismatch");
654
 
654
 
655
		if (pricemismatch == "InvoiceMismatch") {
655
		if (mismatch == "InvoiceMismatch") {
656
			if (confirm("Are you sure you want to resolve invoice mismatch") == true) {
656
			if (confirm("Are you sure you want to resolve invoice mismatch") == true) {
657
 
657
 
658
				doGetAjaxRequestHandler(context + "/resolvedMismatchRequest?id=" + id, function(response) {
658
				doGetAjaxRequestHandler(context + "/resolvedMismatchRequest?id=" + id, function(response) {
659
					if (response == 'true') {
659
					if (response == 'true') {
660
						getGrnRequestItems(requestId, invoiceId)
660
						getGrnRequestItems(requestId, invoiceId)
661
					}
661
					}
662
				});
662
				});
663
 
663
 
664
			}
664
			}
665
		} else if (pricemismatch == "PoMismatch") {
665
		} else if (mismatch == "PoMismatch") {
666
			if (confirm("Are you sure you want to resolve Po Mismatch. Discard the current PoLineItem new Po will generate on the invoice date.") == true) {
666
			if (confirm("Are you sure you want to resolve Po Mismatch. Discard the current PoLineItem new Po will generate on the invoice date.") == true) {
667
 
667
 
668
				doGetAjaxRequestHandler(context + "/resolvedMismatchRequest?id=" + id, function(response) {
668
				doGetAjaxRequestHandler(context + "/resolvedMismatchRequest?id=" + id, function(response) {
669
					if (response == 'true') {
669
					if (response == 'true') {
670
						getGrnRequestItems(requestId, invoiceId)
670
						getGrnRequestItems(requestId, invoiceId)
Line 685... Line 685...
685
 
685
 
686
		var requestId = $(this).data("requestid");
686
		var requestId = $(this).data("requestid");
687
		var requestId = $(this).data("requestid");
687
		var requestId = $(this).data("requestid");
688
 
688
 
689
 
689
 
690
		var pricemismatch = $(this).data("pricemismatch");
690
		var mismatch = $(this).data("mismatch");
691
 
691
 
692
		var $row = $(this).closest("tr");
692
		var $row = $(this).closest("tr");
693
		var requiredQty = $row.find(".requiredQty").val();
693
		var requiredQty = $row.find(".requiredQty").val();
694
 
694
 
695
		console.log(requiredQty);
695
		console.log(requiredQty);
696
 
696
 
697
		if (pricemismatch == "QtyMismatch") {
697
		if (mismatch == "QtyMismatch") {
698
			if (confirm("Are you sure you want to resolve qty mismatch") == true) {
698
			if (confirm("Are you sure you want to resolve qty mismatch") == true) {
699
 
699
 
700
				doGetAjaxRequestHandler(context + "/resolvedMismatchRequest?id=" + id + "&requiredQty=" + requiredQty, function(response) {
700
				doGetAjaxRequestHandler(context + "/resolvedMismatchRequest?id=" + id + "&requiredQty=" + requiredQty, function(response) {
701
					if (response == 'true') {
701
					if (response == 'true') {
702
						getGrnRequestItems(requestId, invoiceId)
702
						getGrnRequestItems(requestId, invoiceId)
Line 778... Line 778...
778
 
778
 
779
	for (var i = 0; i < items.length; i++) {
779
	for (var i = 0; i < items.length; i++) {
780
		console.log(items[i])
780
		console.log(items[i])
781
 
781
 
782
		var itemId = items[i].itemId
782
		var itemId = items[i].itemId
783
		var qty = items[i].qty
783
		var qty = items[i].amendedQty
784
		var transferPrice = items[i].transferPrice
784
		var transferPrice = items[i].transferPrice
785
		var totalValue = items[i].totalValue
785
		var totalValue = items[i].totalValue
786
 
786
 
787
		if (itemId === "" && qty === "" && transferPrice === "" && totalValue === "") {
787
		if (itemId === "" && qty === "" && transferPrice === "" && totalValue === "") {
788
			alert("Field can't be empty");
788
			alert("Field can't be empty");
Line 806... Line 806...
806
		if (totalValue === "") {
806
		if (totalValue === "") {
807
			alert("Total value can't be empty");
807
			alert("Total value can't be empty");
808
			return false;
808
			return false;
809
		}
809
		}
810
 
810
 
-
 
811
		if (qty <= 0) {
-
 
812
			alert("Please fill Qty");
-
 
813
			return false;
-
 
814
		}
-
 
815
 
811
 
816
 
812
 
817
 
813
	}
818
	}
814
 
819
 
815
	purchaseOrder['vendorId'] = vendorId;
820
	purchaseOrder['vendorId'] = vendorId;