'this method populates the common properties of a gl entry record'

def get_gl_dict(self, args, account_currency=None):

    fiscal_years = get_fiscal_years(self.posting_date, company=self.company)
    if (len(fiscal_years) > 1):
        frappe.throw(_(u'Multiple    fiscal    years    exist    for    the    date    {0}.    Please    set    company    in    Fiscal    Year').format(formatdate(self.posting_date)))
    else:
        fiscal_year = fiscal_years[0][0]
    gl_dict = frappe._dict({u'company': self.company, u'posting_date': self.posting_date, u'fiscal_year': fiscal_year, u'voucher_type': self.doctype, u'voucher_no': self.name, u'remarks': self.get(u'remarks'), u'debit': 0, u'credit': 0, u'debit_in_account_currency': 0, u'credit_in_account_currency': 0, u'is_opening': (self.get(u'is_opening') or u'No'), u'party_type': None, u'party': None, u'project': self.get(u'project')})
    gl_dict.update(args)
    if (not account_currency):
        account_currency = get_account_currency(gl_dict.account)
    if (gl_dict.account and (self.doctype not in [u'Journal    Entry', u'Period    Closing    Voucher', u'Payment    Entry'])):
        self.validate_account_currency(gl_dict.account, account_currency)
        set_balance_in_account_currency(gl_dict, account_currency, self.get(u'conversion_rate'), self.company_currency)
    return gl_dict
