2013-08-05 09:29:54 +00:00
|
|
|
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-04-22 07:44:52 +00:00
|
|
|
wn.query_reports["Accounts Receivable"] = {
|
|
|
|
"filters": [
|
|
|
|
{
|
|
|
|
"fieldname":"company",
|
2013-09-30 21:06:29 +00:00
|
|
|
"label": wn._("Company"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Company",
|
2013-07-26 07:32:18 +00:00
|
|
|
"default": wn.defaults.get_default("company")
|
2013-04-22 07:44:52 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"account",
|
2013-09-30 21:06:29 +00:00
|
|
|
"label": wn._("Account"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"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": {
|
|
|
|
"is_pl_account": "No",
|
|
|
|
"debit_or_credit": "Debit",
|
|
|
|
"company": company,
|
|
|
|
"master_type": "Customer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"report_date",
|
2013-09-30 21:06:29 +00:00
|
|
|
"label": wn._("Date"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Date",
|
|
|
|
"default": get_today()
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"ageing_based_on",
|
2013-09-30 21:06:29 +00:00
|
|
|
"label": wn._("Ageing Based On"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Select",
|
|
|
|
"options": 'Posting Date' + NEWLINE + 'Due Date',
|
|
|
|
"default": "Posting Date"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|