ERPNext Conference 2019* ERPNext.com Blog

How to get the Item Stock Baance by using the Custom script


#1

I need a hep to get the Item Stock in the Custom Script


#2

Try:
frappe.db.get_value("Bin", {"item_code": 'your item code', "warehouse": 'your warehouse'}, "actual_qty")


#3

try @Bashir_Soomro

// select item_code from `tabDoctype Name` where item_name='Item Name' and item_group='Item Group'

frappe.call({
    method:"frappe.client.get_value",
    args:{
        doctype: " DOCTYPE NAME ", 
        filters:{
            "item_name":"Item Name", 
            "item_group":'Item Group,
        },
        fieldname:["item_code"], 
        callback:function(r){
            console.log(r.message.item_code);
        }
    }
});

#4

Thanks for the response, i will try and update you accordingly