def check_freezing_date(posting_date, adv_adj=False):
 if (not adv_adj):
  acc_frozen_upto = frappe.db.get_value(u'Accounts Settings', None, u'acc_frozen_upto')
  if acc_frozen_upto:
   frozen_accounts_modifier = frappe.db.get_value(u'Accounts Settings', None, u'frozen_accounts_modifier')
   if ((getdate(posting_date) <= getdate(acc_frozen_upto)) and (not (frozen_accounts_modifier in frappe.get_roles()))):
    frappe.throw(_(u'You are not authorized to add or update entries before {0}').format(formatdate(acc_frozen_upto)))

def check_freezing_date ( posting_date , adv_adj = False ) : if ( not adv_adj ) : acc_frozen_upto = frappe . db . get_value ( u'Accounts Settings' , None , u'acc_frozen_upto' ) if acc_frozen_upto : frozen_accounts_modifier = frappe . db . get_value ( u'Accounts Settings' , None , u'frozen_accounts_modifier' ) if ( ( getdate ( posting_date ) <= getdate ( acc_frozen_upto ) ) and ( not ( frozen_accounts_modifier in frappe . get_roles ( ) ) ) ) : frappe . throw ( _ ( u'You are not authorized to add or update entries before {0}' ) . format ( formatdate ( acc_frozen_upto ) ) )
nobody can do gl entries where posting date is before freezing date except authorized person .