mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
fix: Test Cases
This commit is contained in:
@@ -46,6 +46,7 @@ class Company(NestedSet):
|
||||
self.validate_currency()
|
||||
self.validate_coa_input()
|
||||
self.validate_perpetual_inventory()
|
||||
self.validate_perpetual_inventory_for_non_stock_items()
|
||||
self.check_country_change()
|
||||
self.set_chart_of_accounts()
|
||||
self.validate_parent_company()
|
||||
@@ -182,6 +183,12 @@ class Company(NestedSet):
|
||||
frappe.msgprint(_("Set default inventory account for perpetual inventory"),
|
||||
alert=True, indicator='orange')
|
||||
|
||||
def validate_perpetual_inventory_for_non_stock_items(self):
|
||||
if not self.get("__islocal"):
|
||||
if cint(self.enable_perpetual_inventory_for_non_stock_items) == 1 and not self.service_received_but_not_billed:
|
||||
frappe.throw(_("Set default {0} account for perpetual inventory for non stock items").format(
|
||||
frappe.bold('Service Received But Not Billed')))
|
||||
|
||||
def check_country_change(self):
|
||||
frappe.flags.country_change = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user