Merge pull request #18023 from fproldan/fix_by_voucher_order_develop

fix: General Ledger Group by Voucher not ordering by posting_date for develop
This commit is contained in:
rohitwaghchaure 2019-07-14 17:23:54 +05:30 committed by GitHub
commit 3643d67249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.report.financial_statements import get_cost_centers_with_children from erpnext.accounts.report.financial_statements import get_cost_centers_with_children
from six import iteritems from six import iteritems
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions
from collections import OrderedDict
def execute(filters=None): def execute(filters=None):
if not filters: if not filters:
@ -274,7 +275,7 @@ def group_by_field(group_by):
return 'voucher_no' return 'voucher_no'
def initialize_gle_map(gl_entries, filters): def initialize_gle_map(gl_entries, filters):
gle_map = frappe._dict() gle_map = OrderedDict()
group_by = group_by_field(filters.get('group_by')) group_by = group_by_field(filters.get('group_by'))
for gle in gl_entries: for gle in gl_entries: