Subversion Repositories SmartDukaan

Rev

Rev 12769 | Rev 13354 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7410 amar.kumar 1
 
7676 amar.kumar 2
 
3
function closeColorBox(){
4
	$.colorbox.close();
5
}
6
 
7
$('.link-requiring-warehouse-selection').live('click', function(){
8
	var linkurl = $(this).attr('href');
9
	$('<form id = "tempForm" onsubmit = "closeColorBox() "style = "text-align:center" method = "GET" action = "'+ linkurl +'">').appendTo('body');
10
 
11
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "7">Mahipalpur</input>'));
12
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "12">Goregaon</input></br>'));
13
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "13">Biwandi</input>'));
10864 manish.sha 14
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "16">Mum-Amazon</input><br/>'));
15
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1765">Bangalore</input>'));
16
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1768">Bangalore-SR</input><br/>'));
12729 manish.sha 17
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "1771">BAN-AMZ/Bangalore</input><br/>'));
12769 manish.sha 18
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "2857">HR-SORPL/Gurgaon</input><br/>'));
12729 manish.sha 19
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "2854">HR-FK/Gurgaon</input><br/>'));
13051 manish.sha 20
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "3931">HR-FK/Gurgaon-S</input><br/>'));
12769 manish.sha 21
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "3298">TG-SORPL/Hyderabad</input><br/>'));
12729 manish.sha 22
	$('form#tempForm').append($('<input type = "radio" name = "physicalWarehouseId" value = "3295">HR-AMZ/Mewat</input><br/><br/>'));
7676 amar.kumar 23
	$('form#tempForm').append($('<input type = "submit"  value = "Submit"/>'));
24
 
25
	$.colorbox({
26
		inline : true,
27
        width : "325px",
12769 manish.sha 28
        height : "500px",
7676 amar.kumar 29
        opacity : "0.30",
30
        overlayClose :	true,
31
        escKey :	true,
32
        href : "#tempForm",
33
        onClosed : function() {
34
            $('#tempForm').remove();
35
        }
36
	});
37
	event.preventDefault();
38
	return false;
39
 
40
});
41
 
42
 
43
 
7410 amar.kumar 44
function selectWarehouseForPOCreation() {
45
	$('#warehouse-selector-po-creation').show();
46
	$.colorbox({
47
		inline : true,
48
        width : "325px",
12769 manish.sha 49
        height : "500px",
7410 amar.kumar 50
        opacity : "0.30",
51
        overlayClose :	true,
52
        escKey :	true,
53
        href : "#warehouse-selector-po-creation",
54
        onClosed : function() {
55
            $("#warehouse-selector-po-creation").hide();
56
            $('#warehouse-selection-error').html("");
57
        }
58
	});
59
	event.preventDefault();
60
	return false;
61
}
62
 
63
function selectWarehouseForListingPO() {
64
	$('#warehouse-selector-po-recieve').show();
65
	$.colorbox({
66
		inline : true,
67
        width : "325px",
12769 manish.sha 68
        height : "500px",
7410 amar.kumar 69
        opacity : "0.30",
70
        overlayClose :	true,
71
        escKey :	true,
72
        href : "#warehouse-selector-po-recieve",
73
        onClosed : function() {
74
            $("#warehouse-selector-po-recieve").hide();
75
            $('#warehouse-selection-error').html("");
76
        }
77
	});
78
	event.preventDefault();
79
	return false;
80
}
81
 
82
function openPOCreationPage() {
83
	$.colorbox.close();
84
	warehouseId = $("#warehouse-selector-po-creation input[name='warehouse']:checked").val();
85
	if(warehouseId != 'undefined') {
86
		this.location.href = "/inventory/purchase-order/new?warehouseId="+warehouseId;
87
	} else {
88
		$('#warehouse-selection-error').html("<span>Please select warehouse</span>");
89
	}
90
}
91
 
92
function showOpenPOpage() {
93
	$.colorbox.close();
94
	warehouseId = $("#warehouse-selector-po-recieve input[name='warehouse']:checked").val();
95
	if(warehouseId != 'undefined') {
96
		this.location.href = "/inventory/purchase-order?warehouseId="+warehouseId;
97
	} else {
98
		$('#warehouse-selection-error').html("<span>Please select warehouse</span>");
99
	}
100
}