<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe

__version__ = '8.0.38'


def get_default_company(user=None):
	'''Get default company for user'''
	from frappe.defaults import get_user_default_as_list

	if not user:
		user = frappe.session.user

	companies = get_user_default_as_list(user, 'company')
	if companies:
		default_company = companies[0]
	else:
		default_company = frappe.db.get_single_value('Global Defaults', 'default_company')

	return default_company


def get_default_currency():
	'''Returns the currency of the default company'''
	company = get_default_company()
	if company:
		return frappe.db.get_value('Company', company, 'default_currency')


def get_company_currency(company):
	'''Returns the default company currency'''<commit_msg>bumped to version 8.0.39<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe

__version__ = '8.0.39'


def get_default_company(user=None):
	'''Get default company for user'''
	from frappe.defaults import get_user_default_as_list

	if not user:
		user = frappe.session.user

	companies = get_user_default_as_list(user, 'company')
	if companies:
		default_company = companies[0]
	else:
		default_company = frappe.db.get_single_value('Global Defaults', 'default_company')

	return default_company


def get_default_currency():
	'''Returns the currency of the default company'''
	company = get_default_company()
	if company:
		return frappe.db.get_value('Company', company, 'default_currency')


def get_company_currency(company):
	'''Returns the default company currency'''
{'fraction_non_alphanumeric': 0.10703173615432483, 'fraction_numerical': 0.009956440572495333, 'mean_word_length': 5.813559322033898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6112141', 'n_tokens_mistral': 527, 'n_tokens_neox': 508, 'n_words': 132}