2013-12-06 11:06:23 +00:00
|
|
|
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
|
2014-02-14 10:17:51 +00:00
|
|
|
frappe.query_reports["General Ledger"] = {
|
2013-12-06 11:06:23 +00:00
|
|
|
"filters": [
|
|
|
|
{
|
|
|
|
"fieldname":"company",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Company"),
|
2013-12-06 11:06:23 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Company",
|
2014-02-14 10:17:51 +00:00
|
|
|
"default": frappe.defaults.get_user_default("company"),
|
2013-12-06 11:06:23 +00:00
|
|
|
"reqd": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"from_date",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("From Date"),
|
2013-12-06 11:06:23 +00:00
|
|
|
"fieldtype": "Date",
|
2014-02-14 10:17:51 +00:00
|
|
|
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
2013-12-06 11:06:23 +00:00
|
|
|
"reqd": 1,
|
|
|
|
"width": "60px"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"to_date",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("To Date"),
|
2013-12-06 11:06:23 +00:00
|
|
|
"fieldtype": "Date",
|
2014-02-14 10:17:51 +00:00
|
|
|
"default": frappe.datetime.get_today(),
|
2013-12-06 11:06:23 +00:00
|
|
|
"reqd": 1,
|
|
|
|
"width": "60px"
|
2013-12-27 12:03:55 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldtype": "Break",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"account",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Account"),
|
2013-12-27 12:03:55 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Account",
|
|
|
|
"get_query": function() {
|
2014-02-14 10:17:51 +00:00
|
|
|
var company = frappe.query_report.filters_by_name.company.get_value();
|
2013-12-27 12:03:55 +00:00
|
|
|
return {
|
2013-12-30 14:58:14 +00:00
|
|
|
"doctype": "Account",
|
2013-12-27 12:03:55 +00:00
|
|
|
"filters": {
|
|
|
|
"company": company,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"voucher_no",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Voucher No"),
|
2013-12-27 12:03:55 +00:00
|
|
|
"fieldtype": "Data",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"group_by_voucher",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Group by Voucher"),
|
2013-12-27 12:03:55 +00:00
|
|
|
"fieldtype": "Check",
|
|
|
|
"default": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"group_by_account",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Group by Account"),
|
2013-12-27 12:03:55 +00:00
|
|
|
"fieldtype": "Check",
|
2013-12-06 11:06:23 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|