mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fix: use correct date value
This commit is contained in:
@@ -422,7 +422,7 @@ def update_outstanding_amt(
|
|||||||
def validate_frozen_account(company, account, adv_adj=None):
|
def validate_frozen_account(company, account, adv_adj=None):
|
||||||
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
|
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
|
||||||
if frozen_account == "Yes" and not adv_adj:
|
if frozen_account == "Yes" and not adv_adj:
|
||||||
role_allowed_for_frozen_entries = frappe.db.get_cached_value(
|
role_allowed_for_frozen_entries = frappe.get_cached_value(
|
||||||
"Company", company, "role_allowed_for_frozen_entries"
|
"Company", company, "role_allowed_for_frozen_entries"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class TestProcessDeferredAccounting(IntegrationTestCase):
|
|||||||
|
|
||||||
|
|
||||||
def change_acc_settings(
|
def change_acc_settings(
|
||||||
company="_Test Company", acc_frozen_till_date="", book_deferred_entries_based_on="Days"
|
company="_Test Company", acc_frozen_till_date=None, book_deferred_entries_based_on="Days"
|
||||||
):
|
):
|
||||||
acc_settings = frappe.get_doc("Accounts Settings", "Accounts Settings")
|
acc_settings = frappe.get_doc("Accounts Settings", "Accounts Settings")
|
||||||
acc_settings.book_deferred_entries_based_on = book_deferred_entries_based_on
|
acc_settings.book_deferred_entries_based_on = book_deferred_entries_based_on
|
||||||
|
|||||||
@@ -805,7 +805,7 @@ def validate_party_frozen_disabled(company, party_type, party_name):
|
|||||||
if party.disabled:
|
if party.disabled:
|
||||||
frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
|
frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
|
||||||
elif party.get("is_frozen"):
|
elif party.get("is_frozen"):
|
||||||
role_allowed_for_frozen_entries = frappe.db.get_cached_value(
|
role_allowed_for_frozen_entries = frappe.get_cached_value(
|
||||||
"Company", company, "role_allowed_for_frozen_entries"
|
"Company", company, "role_allowed_for_frozen_entries"
|
||||||
)
|
)
|
||||||
if role_allowed_for_frozen_entries not in frappe.get_roles():
|
if role_allowed_for_frozen_entries not in frappe.get_roles():
|
||||||
|
|||||||
Reference in New Issue
Block a user