65 lines
1.4 KiB
JavaScript
65 lines
1.4 KiB
JavaScript
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
frappe.query_reports["General Ledger"] = {
|
|
"filters": [
|
|
{
|
|
"fieldname":"company",
|
|
"label": __("Company"),
|
|
"fieldtype": "Link",
|
|
"options": "Company",
|
|
"default": frappe.defaults.get_user_default("company"),
|
|
"reqd": 1
|
|
},
|
|
{
|
|
"fieldname":"from_date",
|
|
"label": __("From Date"),
|
|
"fieldtype": "Date",
|
|
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
|
"reqd": 1,
|
|
"width": "60px"
|
|
},
|
|
{
|
|
"fieldname":"to_date",
|
|
"label": __("To Date"),
|
|
"fieldtype": "Date",
|
|
"default": frappe.datetime.get_today(),
|
|
"reqd": 1,
|
|
"width": "60px"
|
|
},
|
|
{
|
|
"fieldtype": "Break",
|
|
},
|
|
{
|
|
"fieldname":"account",
|
|
"label": __("Account"),
|
|
"fieldtype": "Link",
|
|
"options": "Account",
|
|
"get_query": function() {
|
|
var company = frappe.query_report.filters_by_name.company.get_value();
|
|
return {
|
|
"doctype": "Account",
|
|
"filters": {
|
|
"company": company,
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"fieldname":"voucher_no",
|
|
"label": __("Voucher No"),
|
|
"fieldtype": "Data",
|
|
},
|
|
{
|
|
"fieldname":"group_by_voucher",
|
|
"label": __("Group by Voucher"),
|
|
"fieldtype": "Check",
|
|
"default": 1
|
|
},
|
|
{
|
|
"fieldname":"group_by_account",
|
|
"label": __("Group by Account"),
|
|
"fieldtype": "Check",
|
|
}
|
|
]
|
|
} |