def update_item_projected_qty(item_code):
 frappe.db.sql(u'update tabItem set\n DCTB  DCTB total_projected_qty = ifnull((select sum(projected_qty) from tabBin where item_code=%s), 0)\n DCTB  DCTB where name=%s', (item_code, item_code))

def update_item_projected_qty ( item_code ) : frappe . db . sql ( u'update tabItem set\n DCTB  DCTB total_projected_qty = ifnull((select sum(projected_qty) from tabBin where item_code=%s), 0)\n DCTB  DCTB where name=%s' , ( item_code , item_code ) )
set total_projected_qty in item as sum of projected qty in all warehouses .