2013-11-20 07:29:58 +00:00
|
|
|
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-08-05 09:29:54 +00:00
|
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
|
2014-02-14 10:17:51 +00:00
|
|
|
frappe.query_reports["Accounts Payable"] = {
|
2013-04-23 10:06:26 +00:00
|
|
|
"filters": [
|
|
|
|
{
|
|
|
|
"fieldname":"company",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Company"),
|
2013-04-23 10:06:26 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Company",
|
2014-03-14 09:40:42 +00:00
|
|
|
"default": frappe.defaults.get_user_default("company")
|
2013-04-23 10:06:26 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"account",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Account"),
|
2013-04-23 10:06:26 +00:00
|
|
|
"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();
|
2013-04-23 10:06:26 +00:00
|
|
|
return {
|
2014-05-28 07:26:28 +00:00
|
|
|
"query": "erpnext.controllers.queries.get_account_list",
|
2013-04-23 10:06:26 +00:00
|
|
|
"filters": {
|
2014-03-21 05:44:49 +00:00
|
|
|
"report_type": "Balance Sheet",
|
2013-04-23 10:06:26 +00:00
|
|
|
"company": company,
|
|
|
|
"master_type": "Supplier"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"report_date",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Date"),
|
2013-04-23 10:06:26 +00:00
|
|
|
"fieldtype": "Date",
|
|
|
|
"default": get_today()
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"ageing_based_on",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Ageing Based On"),
|
2013-04-23 10:06:26 +00:00
|
|
|
"fieldtype": "Select",
|
|
|
|
"options": 'Posting Date' + NEWLINE + 'Due Date',
|
|
|
|
"default": "Posting Date"
|
|
|
|
}
|
|
|
|
]
|
2014-04-25 13:05:45 +00:00
|
|
|
}
|