fix: Don't use stale item details (#34847)

diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index a347323..7fcc28b 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -515,7 +515,6 @@
 				parent_dict.update({"customer": parent_dict.get("party_name")})
 
 			self.pricing_rules = []
-			basic_item_details_map = {}
 
 			for item in self.get("items"):
 				if item.get("item_code"):
@@ -535,17 +534,7 @@
 					if self.get("is_subcontracted"):
 						args["is_subcontracted"] = self.is_subcontracted
 
-					basic_details = basic_item_details_map.get(item.item_code)
-					ret, basic_item_details = get_item_details(
-						args,
-						self,
-						for_validate=True,
-						overwrite_warehouse=False,
-						return_basic_details=True,
-						basic_details=basic_details,
-					)
-
-					basic_item_details_map.setdefault(item.item_code, basic_item_details)
+					ret = get_item_details(args, self, for_validate=True, overwrite_warehouse=False)
 
 					for fieldname, value in ret.items():
 						if item.meta.get_field(fieldname) and value is not None:
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 2cf3797..ce85702 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -35,14 +35,7 @@
 
 
 @frappe.whitelist()
-def get_item_details(
-	args,
-	doc=None,
-	for_validate=False,
-	overwrite_warehouse=True,
-	return_basic_details=False,
-	basic_details=None,
-):
+def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=True):
 	"""
 	args = {
 	        "item_code": "",
@@ -80,12 +73,7 @@
 		if doc.get("doctype") == "Purchase Invoice":
 			args["bill_date"] = doc.get("bill_date")
 
-	if not basic_details:
-		out = get_basic_details(args, item, overwrite_warehouse)
-	else:
-		out = basic_details
-
-	basic_details = out.copy()
+	out = get_basic_details(args, item, overwrite_warehouse)
 
 	get_item_tax_template(args, item, out)
 	out["item_tax_rate"] = get_item_tax_map(
@@ -154,11 +142,7 @@
 		out.amount = flt(args.qty) * flt(out.rate)
 
 	out = remove_standard_fields(out)
-
-	if return_basic_details:
-		return out, basic_details
-	else:
-		return out
+	return out
 
 
 def remove_standard_fields(details):