Skip to content

Commit 9d46d81

Browse files
Sudharsanan11mergify[bot]
authored andcommitted
fix(stock): update company validation for expense account in lcv
(cherry picked from commit 913168e)
1 parent 319ba31 commit 9d46d81

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from frappe.utils import cint, flt
1111

1212
import erpnext
13+
from erpnext import is_perpetual_inventory_enabled
1314
from erpnext.controllers.taxes_and_totals import init_landed_taxes_and_totals
1415
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
1516

@@ -175,6 +176,9 @@ def validate_receipt_documents(self):
175176
)
176177

177178
def validate_expense_accounts(self):
179+
if not is_perpetual_inventory_enabled(self.company):
180+
return
181+
178182
for t in self.taxes:
179183
company = frappe.get_cached_value("Account", t.expense_account, "company")
180184

0 commit comments

Comments
 (0)