Subversion Repositories SmartDukaan

Rev

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

Rev 9925 Rev 13051
Line 18... Line 18...
18
        data      : 'itemId=' + itemId + '&supplierId=' + supplierId,
18
        data      : 'itemId=' + itemId + '&supplierId=' + supplierId,
19
        success   : function(response) {
19
        success   : function(response) {
20
            $(trElement).find('div#modelName').html(response.split('~')[0]);
20
            $(trElement).find('div#modelName').html(response.split('~')[0]);
21
            $(trElement).find('input[name="unitPrice"]').val(response.split('~')[1]);
21
            $(trElement).find('input[name="unitPrice"]').val(response.split('~')[1]);
22
            $(trElement).find('input[name="nlc"]').val(response.split('~')[2]);
22
            $(trElement).find('input[name="nlc"]').val(response.split('~')[2]);
-
 
23
            if(response.split('~')[3].indexOf('<')>0){
-
 
24
            	$(trElement).find('input[name="mrp"]').val(response.split('~')[3].split('<')[0]);
-
 
25
            }
-
 
26
            else{
23
            $(trElement).find('input[name="mrp"]').val(response.split('~')[3]);
27
            	$(trElement).find('input[name="mrp"]').val(response.split('~')[3]);
-
 
28
            }
24
        }
29
        }
25
    });
30
    });
26
}
31
}
27
 
32
 
28
function closePO(id){
33
function closePO(id){
Line 153... Line 158...
153
                    alert(response);
158
                    alert(response);
154
                }
159
                }
155
            }
160
            }
156
        });
161
        });
157
    }    
162
    }    
-
 
163
}
-
 
164
 
-
 
165
function submitSetWeightForm(itemId,weight,poId){
-
 
166
	$.ajax({
-
 
167
        type : 'POST',
-
 
168
        url : '/inventory/purchase-order!setWeightForItemProdAndStaging?itemId='+itemId+"&weightVal="+weight+"&poId="+poId,
-
 
169
        success : function(response) {
-
 
170
        	document.location.href = '/inventory/purchase-order/' + $('.poId').val();
-
 
171
        },
-
 
172
        error : function() {
-
 
173
        	//alert("Error in refund");
-
 
174
        	document.location.href = '/inventory/purchase-order/' + $('.poId').val();
-
 
175
        }
-
 
176
    });
-
 
177
	
158
}
178
}
159
179