def get_account_type_based_data(account_type, companies, fiscal_year): data = {} total = 0 for company in companies: amount = get_account_type_based_gl_data(company, fiscal_year.year_start_date, fiscal_year.year_end_date, account_type) if amount and account_type == "Depreciation": amount *= -1 total += amount data.setdefault(company, amount) data["total"] = total return data
def get_account_type_based_data(account_type, companies, fiscal_year): data = {} total = 0 for company in companies: amount = get_account_type_based_gl_data(company, fiscal_year.year_start_date, fiscal_year.year_end_date, account_type) if amount and account_type == "Depreciation": amount *= -1 total += amount data.setdefault(company, amount) data["total"] = total return data
def get_account_type_based_data(account_type, companies, period_list, filters): data = {} total = 0 for company in companies: amount = get_account_type_based_gl_data( company, period_list[0]["year_start_date"], period_list[-1]["year_end_date"], account_type, filters) if amount and account_type == "Depreciation": amount *= -1 total += amount data.setdefault(company, amount) data["total"] = total return data