promotions product issue and membership setting checked

This commit is contained in:
Aung Kyaw Phyoe
2019-02-08 14:07:18 +06:30
parent 8112ee95f1
commit d7d437e1d9
5 changed files with 50 additions and 37 deletions

View File

@@ -385,14 +385,18 @@
if(result.length > 0){
var iteminstlists;
$.each(arr_item_inst,function(k2,v2al){
$("select#"+select_id).empty();
var selected = "";
$.each(v2al,function(k3,v3al){
if(k3 == item_code) selected = "selected";
iteminstlists += "<option value='"+k3+"' "+selected+">"+v3al+"</option>";
if(arr_item_inst instanceof Array){
$.each(arr_item_inst,function(k2,v2al){
$("select#"+select_id).empty();
var selected = "";
$.each(v2al,function(k3,v3al){
if(k3 == item_code) selected = "selected";
iteminstlists += "<option value='"+k3+"' "+selected+">"+v3al+"</option>";
});
});
});
}else if(arr_item_inst != ""){
iteminstlists += "<option value='"+par_item_code+"' selected>"+arr_item_inst+"</option>";
}
$("select#"+select_id).append(iteminstlists);
$("select#"+select_id).parent().parent().siblings("div.menu_item_choose").find("select").find("option[value='"+par_item_code+"']").attr("selected","true")