def validate_party_gle_currency(party_type, party, company, party_account_currency=None):
 if (not party_account_currency):
  party_account_currency = get_party_account_currency(party_type, party, company)
 existing_gle_currency = get_party_gle_currency(party_type, party, company)
 if (existing_gle_currency and (party_account_currency != existing_gle_currency)):
  frappe.throw(_(u'Accounting Entry for {0}: {1} can only be made in currency: {2}').format(party_type, party, existing_gle_currency), InvalidAccountCurrency)

def validate_party_gle_currency ( party_type , party , company , party_account_currency = None ) : if ( not party_account_currency ) : party_account_currency = get_party_account_currency ( party_type , party , company ) existing_gle_currency = get_party_gle_currency ( party_type , party , company ) if ( existing_gle_currency and ( party_account_currency != existing_gle_currency ) ) : frappe . throw ( _ ( u'Accounting Entry for {0}: {1} can only be made in currency: {2}' ) . format ( party_type , party , existing_gle_currency ) , InvalidAccountCurrency )
validate party account currency with existing gl entrys currency .