mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
[hot] [fix] trial balance report
This commit is contained in:
@@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import cint, flt, getdate, formatdate, cstr
|
from frappe.utils import cint, flt, getdate, formatdate, cstr
|
||||||
from erpnext.accounts.report.financial_statements import filter_accounts, get_gl_entries
|
from erpnext.accounts.report.financial_statements import filter_accounts, set_gl_entries_by_account
|
||||||
|
|
||||||
value_fields = ("opening_debit", "opening_credit", "debit", "credit", "closing_debit", "closing_credit")
|
value_fields = ("opening_debit", "opening_credit", "debit", "credit", "closing_debit", "closing_credit")
|
||||||
|
|
||||||
@@ -56,8 +56,10 @@ def get_data(filters):
|
|||||||
min_lft, max_rgt = frappe.db.sql("""select min(lft), max(rgt) from `tabAccount`
|
min_lft, max_rgt = frappe.db.sql("""select min(lft), max(rgt) from `tabAccount`
|
||||||
where company=%s""", (filters.company,))[0]
|
where company=%s""", (filters.company,))[0]
|
||||||
|
|
||||||
gl_entries_by_account = get_gl_entries(filters.company, filters.from_date, filters.to_date, min_lft, max_rgt,
|
gl_entries_by_account = {}
|
||||||
ignore_closing_entries=not flt(filters.with_period_closing_entry))
|
|
||||||
|
set_gl_entries_by_account(filters.company, filters.from_date,
|
||||||
|
filters.to_date, min_lft, max_rgt, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry))
|
||||||
|
|
||||||
opening_balances = get_opening_balances(filters)
|
opening_balances = get_opening_balances(filters)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user