Subversion Repositories SmartDukaan

Rev

Rev 24206 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

getItemAheadOptions($("#typeaheaditem"), true,function(selectedItem) {
        currentItem = selectedItem;
        doGetAjaxRequestHandler(context + "/item-pricing/" + currentItem.itemId,
                        function(response) {
                                response = JSON.parse(response);
                                $('#currentDp').val(response.dp);
                                $('#oldMop').html(response.mop);
                                $('#oldTp').html(response.tp);
                                $('#oldNlc').html(response.nlc);
                        });
});
getItemAheadOptions($("#typeaheaditem1"),true, function(selectedItem) {
        currentItem = selectedItem;
        doGetAjaxRequestHandler(context + "/item-pricing/" + currentItem.itemId,
                        function(response) {
                                response = JSON.parse(response);
                                if (response.dp > 0) {
                                        $("#dp").val(response.dp).prop("readOnly", true);
                                } else {
                                        $("#dp").val(response.dp).prop("readOnly", false);
                                }
                                $("#mop").val(response.mop);
                                $("#mrp").val(response.mrp);
                                $('#dpValue').html("DP -" + response.dp);
                                $('#mopValue').html("MOP -" + response.mop);
                                $('#mrpValue').html("MRP -" + response.mrp);
                        });
});