fix: update cost center in SI (#25972)

This commit is contained in:
Anuja Pawar
2021-06-07 21:15:27 +05:30
committed by GitHub
parent 85dca013ee
commit 3c5b33c241

View File

@@ -450,7 +450,7 @@ class SalesInvoice(SellingController):
# set pos values in items # set pos values in items
for item in self.get("items"): for item in self.get("items"):
if item.get('item_code'): if item.get('item_code'):
profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos) profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos, update_data=True)
for fname, val in iteritems(profile_details): for fname, val in iteritems(profile_details):
if (not for_validate) or (for_validate and not item.get(fname)): if (not for_validate) or (for_validate and not item.get(fname)):
item.set(fname, val) item.set(fname, val)