mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 04:45:09 +00:00
move function to util.py
This commit is contained in:
@@ -343,8 +343,8 @@ def set_gl_entries_by_account(
|
||||
},
|
||||
as_dict=True)
|
||||
|
||||
if filters and filters.get('presentation_currency'):
|
||||
gl = convert_to_presentation_currency(gl_entries, get_currency(filters))
|
||||
# if filters and filters.get('presentation_currency'):
|
||||
# gl_entries = convert_to_presentation_currency(gl_entries, get_currency(filters))
|
||||
|
||||
for entry in gl_entries:
|
||||
gl_entries_by_account.setdefault(entry.account, []).append(entry)
|
||||
|
||||
@@ -10,15 +10,6 @@ from frappe import _, _dict
|
||||
from erpnext.accounts.utils import get_account_currency
|
||||
|
||||
|
||||
def get_appropriate_company(filters):
|
||||
if filters.get('company'):
|
||||
company = filters['company']
|
||||
else:
|
||||
company = get_default_company()
|
||||
|
||||
return company
|
||||
|
||||
|
||||
def execute(filters=None):
|
||||
account_details = {}
|
||||
for acc in frappe.db.sql("""select name, is_group from tabAccount""", as_dict=1):
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import frappe
|
||||
from erpnext import get_company_currency
|
||||
from erpnext.accounts.report.general_ledger.general_ledger import get_appropriate_company
|
||||
from erpnext import get_company_currency, get_default_company
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
from frappe.utils import cint
|
||||
|
||||
@@ -121,4 +120,13 @@ def convert_to_presentation_currency(gl_entries, currency_info):
|
||||
|
||||
converted_gl_list.append(entry)
|
||||
|
||||
return converted_gl_list
|
||||
return converted_gl_list
|
||||
|
||||
|
||||
def get_appropriate_company(filters):
|
||||
if filters.get('company'):
|
||||
company = filters['company']
|
||||
else:
|
||||
company = get_default_company()
|
||||
|
||||
return company
|
||||
Reference in New Issue
Block a user