brotherton-erpnext/erpnext/accounts/report/general_ledger/general_ledger.js

65 lines
1.4 KiB
JavaScript
Raw Normal View History

// 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"] = {
"filters": [
{
"fieldname":"company",
2014-02-14 10:17:51 +00:00
"label": frappe._("Company"),
"fieldtype": "Link",
"options": "Company",
2014-02-14 10:17:51 +00:00
"default": frappe.defaults.get_user_default("company"),
"reqd": 1
},
{
"fieldname":"from_date",
2014-02-14 10:17:51 +00:00
"label": frappe._("From Date"),
"fieldtype": "Date",
2014-02-14 10:17:51 +00:00
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
"reqd": 1,
"width": "60px"
},
{
"fieldname":"to_date",
2014-02-14 10:17:51 +00:00
"label": frappe._("To Date"),
"fieldtype": "Date",
2014-02-14 10:17:51 +00:00
"default": frappe.datetime.get_today(),
"reqd": 1,
"width": "60px"
},
{
"fieldtype": "Break",
},
{
"fieldname":"account",
2014-02-14 10:17:51 +00:00
"label": frappe._("Account"),
"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();
return {
2013-12-30 14:58:14 +00:00
"doctype": "Account",
"filters": {
"company": company,
}
}
}
},
{
"fieldname":"voucher_no",
2014-02-14 10:17:51 +00:00
"label": frappe._("Voucher No"),
"fieldtype": "Data",
},
{
"fieldname":"group_by_voucher",
2014-02-14 10:17:51 +00:00
"label": frappe._("Group by Voucher"),
"fieldtype": "Check",
"default": 1
},
{
"fieldname":"group_by_account",
2014-02-14 10:17:51 +00:00
"label": frappe._("Group by Account"),
"fieldtype": "Check",
}
]
}