Skip to content

Commit

Permalink
fix: expense account set as COGS for stock entry Material Issue (back…
Browse files Browse the repository at this point in the history
…port #41026) (#41029)

fix: expense account set as COGS for stock entry Material Issue (#41026)

(cherry picked from commit 03231e9)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure committed Apr 16, 2024
1 parent ec337d3 commit f59e433
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions erpnext/stock/doctype/stock_entry/stock_entry.py
Expand Up @@ -1641,11 +1641,7 @@ def get_item_details(self, args=None, for_update=False):
ret.update(get_uom_details(args.get("item_code"), args.get("uom"), args.get("qty")))

if self.purpose == "Material Issue":
ret["expense_account"] = (
item.get("expense_account")
or item_group_defaults.get("expense_account")
or frappe.get_cached_value("Company", self.company, "default_expense_account")
)
ret["expense_account"] = item.get("expense_account") or item_group_defaults.get("expense_account")

for company_field, field in {
"stock_adjustment_account": "expense_account",
Expand Down

0 comments on commit f59e433

Please sign in to comment.