Renamed field and added finance book column in the trial balance simple report
This commit is contained in:
parent
fa7ee0b3b6
commit
ddd9136d10
@ -30,13 +30,6 @@ frappe.ui.form.on('Payment Entry', {
|
||||
}
|
||||
}
|
||||
});
|
||||
frm.set_query("bank_account", function() {
|
||||
return{
|
||||
"filters": {
|
||||
"party": frm.doc.party,
|
||||
}
|
||||
}
|
||||
});
|
||||
frm.set_query("contact_person", function() {
|
||||
if (frm.doc.party) {
|
||||
return {
|
||||
|
@ -567,7 +567,7 @@ def get_partywise_advanced_payment_amount(party_type="Customer"):
|
||||
data = frappe.db.sql(""" SELECT party, sum({0}) as amount
|
||||
FROM `tabGL Entry`
|
||||
WHERE party_type = %s and against_voucher is null GROUP BY party"""
|
||||
.format(("credit - debit") if party_type == "Customer" else "debit") , party_type, debug=1)
|
||||
.format(("credit - debit") if party_type == "Customer" else "debit") , party_type)
|
||||
|
||||
if data:
|
||||
return frappe._dict(data)
|
@ -83,8 +83,8 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||
"fieldtype": "Check"
|
||||
},
|
||||
{
|
||||
"fieldname": "include_non_finance_book_entries",
|
||||
"label": __("Include Non Finance Book Entries"),
|
||||
"fieldname": "include_default_book_entries",
|
||||
"label": __("Include Default Book Entries"),
|
||||
"fieldtype": "Check"
|
||||
}
|
||||
],
|
||||
|
@ -104,8 +104,8 @@ def get_rootwise_opening_balances(filters, report_type):
|
||||
|
||||
if filters.finance_book:
|
||||
fb_conditions = " and finance_book = %(finance_book)s"
|
||||
if filters.include_non_finance_book_entries:
|
||||
fb_conditions = " and (finance_book = %(finance_book)s or finance_book is null)"
|
||||
if filters.include_default_book_entries:
|
||||
fb_conditions = " and (finance_book in (%(finance_book)s, %(company_fb)s) or finance_book is null)"
|
||||
|
||||
additional_conditions += fb_conditions
|
||||
|
||||
@ -124,7 +124,8 @@ def get_rootwise_opening_balances(filters, report_type):
|
||||
"from_date": filters.from_date,
|
||||
"report_type": report_type,
|
||||
"year_start_date": filters.year_start_date,
|
||||
"finance_book": filters.finance_book
|
||||
"finance_book": filters.finance_book,
|
||||
"company_fb": frappe.db.get_value("Company", filters.company, 'default_finance_book')
|
||||
},
|
||||
as_dict=True)
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
"doctype": "Report",
|
||||
"idx": 0,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2018-11-22 17:40:11.317567",
|
||||
"modified": "2019-01-17 17:20:42.374958",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Trial Balance (Simple)",
|
||||
"owner": "Administrator",
|
||||
"prepared_report": 0,
|
||||
"query": "select fiscal_year as \"Fiscal Year:Data:80\",\n\tcompany as \"Company:Data:220\",\n\tposting_date as \"Posting Date:Date:100\",\n\taccount as \"Account:Data:380\",\n\tsum(debit) as \"Debit:Currency:140\",\n\tsum(credit) as \"Credit:Currency:140\"\nfrom `tabGL Entry`\ngroup by fiscal_year, company, posting_date, account\norder by fiscal_year, company, posting_date, account",
|
||||
"query": "select fiscal_year as \"Fiscal Year:Data:80\",\n\tcompany as \"Company:Data:220\",\n\tposting_date as \"Posting Date:Date:100\",\n\taccount as \"Account:Data:380\",\n\tsum(debit) as \"Debit:Currency:140\",\n\tsum(credit) as \"Credit:Currency:140\",\n\tfinance_book as \"Finance Book:Link/Finance Book:140\"\nfrom `tabGL Entry`\ngroup by fiscal_year, company, posting_date, account\norder by fiscal_year, company, posting_date, account",
|
||||
"ref_doctype": "GL Entry",
|
||||
"report_name": "Trial Balance (Simple)",
|
||||
"report_type": "Query Report",
|
||||
|
Loading…
x
Reference in New Issue
Block a user