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
|
|
|
|
wn.query_reports["General Ledger"] = {
|
|
"filters": [
|
|
{
|
|
"fieldname":"company",
|
|
"label": wn._("Company"),
|
|
"fieldtype": "Link",
|
|
"options": "Company",
|
|
"default": wn.defaults.get_user_default("company"),
|
|
"reqd": 1
|
|
},
|
|
{
|
|
"fieldname":"from_date",
|
|
"label": wn._("From Date"),
|
|
"fieldtype": "Date",
|
|
"default": wn.datetime.add_months(wn.datetime.get_today(), -1),
|
|
"reqd": 1,
|
|
"width": "60px"
|
|
},
|
|
{
|
|
"fieldname":"to_date",
|
|
"label": wn._("To Date"),
|
|
"fieldtype": "Date",
|
|
"default": wn.datetime.get_today(),
|
|
"reqd": 1,
|
|
"width": "60px"
|
|
},
|
|
{
|
|
"fieldtype": "Break",
|
|
},
|
|
{
|
|
"fieldname":"account",
|
|
"label": wn._("Account"),
|
|
"fieldtype": "Link",
|
|
"options": "Account",
|
|
"get_query": function() {
|
|
var company = wn.query_report.filters_by_name.company.get_value();
|
|
return {
|
|
"query": "accounts.utils.get_account_list",
|
|
"filters": {
|
|
"company": company,
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"fieldname":"voucher_no",
|
|
"label": wn._("Voucher No"),
|
|
"fieldtype": "Data",
|
|
},
|
|
{
|
|
"fieldname":"group_by_voucher",
|
|
"label": wn._("Group by Voucher"),
|
|
"fieldtype": "Check",
|
|
"default": 1
|
|
},
|
|
{
|
|
"fieldname":"group_by_account",
|
|
"label": wn._("Group by Account"),
|
|
"fieldtype": "Check",
|
|
}
|
|
]
|
|
} |