@frappe.whitelist()
def get_item_details(args):
 args = process_args(args)
 item_doc = frappe.get_doc(u'Item', args.item_code)
 item = item_doc
 validate_item_details(args, item)
 out = get_basic_details(args, item)
 get_party_item_code(args, item_doc, out)
 if frappe.db.exists(u'Product Bundle', args.item_code):
  valuation_rate = 0.0
  bundled_items = frappe.get_doc(u'Product Bundle', args.item_code)
  for bundle_item in bundled_items.items:
   valuation_rate += flt((get_valuation_rate(bundle_item.item_code, out.get(u'warehouse')).get(u'valuation_rate') * bundle_item.qty))
  out.update({u'valuation_rate': valuation_rate})
 else:
  out.update(get_valuation_rate(args.item_code, out.get(u'warehouse')))
 get_price_list_rate(args, item_doc, out)
 if (args.customer and cint(args.is_pos)):
  out.update(get_pos_profile_item_details(args.company, args))
 if out.get(u'warehouse'):
  out.update(get_bin_details(args.item_code, out.warehouse))
 for (key, value) in out.iteritems():
  if (args.get(key) is None):
   args[key] = value
 out.update(get_pricing_rule_for_item(args))
 if (args.get(u'doctype') in (u'Sales Invoice', u'Delivery Note')):
  out.serial_no = get_serial_no(out)
 if (args.transaction_date and item.lead_time_days):
  out.schedule_date = out.lead_time_date = add_days(args.transaction_date, item.lead_time_days)
 if (args.get(u'is_subcontracted') == u'Yes'):
  out.bom = get_default_bom(args.item_code)
 get_gross_profit(out)
 return out

@ frappe . whitelist ( ) def get_item_details ( args ) : args = process_args ( args ) item_doc = frappe . get_doc ( u'Item' , args . item_code ) item = item_doc validate_item_details ( args , item ) out = get_basic_details ( args , item ) get_party_item_code ( args , item_doc , out ) if frappe . db . exists ( u'Product Bundle' , args . item_code ) : valuation_rate = 0.0 bundled_items = frappe . get_doc ( u'Product Bundle' , args . item_code ) for bundle_item in bundled_items . items : valuation_rate += flt ( ( get_valuation_rate ( bundle_item . item_code , out . get ( u'warehouse' ) ) . get ( u'valuation_rate' ) * bundle_item . qty ) ) out . update ( { u'valuation_rate' : valuation_rate } ) else : out . update ( get_valuation_rate ( args . item_code , out . get ( u'warehouse' ) ) ) get_price_list_rate ( args , item_doc , out ) if ( args . customer and cint ( args . is_pos ) ) : out . update ( get_pos_profile_item_details ( args . company , args ) ) if out . get ( u'warehouse' ) : out . update ( get_bin_details ( args . item_code , out . warehouse ) ) for ( key , value ) in out . iteritems ( ) : if ( args . get ( key ) is None ) : args [ key ] = value out . update ( get_pricing_rule_for_item ( args ) ) if ( args . get ( u'doctype' ) in ( u'Sales Invoice' , u'Delivery Note' ) ) : out . serial_no = get_serial_no ( out ) if ( args . transaction_date and item . lead_time_days ) : out . schedule_date = out . lead_time_date = add_days ( args . transaction_date , item . lead_time_days ) if ( args . get ( u'is_subcontracted' ) == u'Yes' ) : out . bom = get_default_bom ( args . item_code ) get_gross_profit ( out ) return out
returns all items details .