mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
fix: not authorized to update entries after freezing accounts (backport #27937)
* fix: not authorized to update entries after freezing accounts (#27937)
* fix: not authorized to update entries after freezing accounts
* fix: Add test case
* fix(patch): patched to requeue failed reposts(check_freezing_date)
* chore: misc fixes
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
(cherry picked from commit 2bb383b178)
# Conflicts:
# erpnext/patches.txt
* fix: resolve conflict
Co-authored-by: Noah Jacob <noahjacobkurian@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
@@ -293,7 +293,7 @@ def check_freezing_date(posting_date, adv_adj=False):
|
||||
if acc_frozen_upto:
|
||||
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
|
||||
if getdate(posting_date) <= getdate(acc_frozen_upto) \
|
||||
and not frozen_accounts_modifier in frappe.get_roles() or frappe.session.user == 'Administrator':
|
||||
and (frozen_accounts_modifier not in frappe.get_roles() or frappe.session.user == 'Administrator'):
|
||||
frappe.throw(_("You are not authorized to add or update entries before {0}").format(formatdate(acc_frozen_upto)))
|
||||
|
||||
def set_as_cancel(voucher_type, voucher_no):
|
||||
|
||||
Reference in New Issue
Block a user