Merge pull request #1821 from nabinhait/v4-hotfix
Overwrite from POS Settings if value exists
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index cdf5aa1..c5c1280 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -229,7 +229,7 @@
if pos_settings:
for fieldname in ("income_account", "cost_center", "warehouse", "expense_account"):
- if not args.get(fieldname):
+ if not args.get(fieldname) and pos_settings.get(fieldname):
res[fieldname] = pos_settings.get(fieldname)
if res.get("warehouse"):