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

44 lines
1.1 KiB
JavaScript
Raw Normal View History

2013-11-20 07:29:58 +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["Accounts Receivable"] = {
"filters": [
{
"fieldname":"company",
2014-02-14 10:17:51 +00:00
"label": frappe._("Company"),
"fieldtype": "Link",
"options": "Company",
2014-03-14 09:40:42 +00:00
"default": frappe.defaults.get_user_default("company")
},
{
"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 {
"query": "accounts.utils.get_account_list",
"filters": {
"report_type": "Balance Sheet",
"company": company,
"master_type": "Customer"
}
}
}
},
{
"fieldname":"report_date",
2014-02-14 10:17:51 +00:00
"label": frappe._("Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"ageing_based_on",
2014-02-14 10:17:51 +00:00
"label": frappe._("Ageing Based On"),
"fieldtype": "Select",
"options": 'Posting Date' + NEWLINE + 'Due Date',
"default": "Posting Date"
}
]
}