2015-03-03 14:55:30 +05:30
|
|
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2013-08-05 14:59:54 +05:30
|
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
|
2014-02-14 15:47:51 +05:30
|
|
|
frappe.query_reports["Accounts Receivable"] = {
|
2013-04-22 13:14:52 +05:30
|
|
|
"filters": [
|
|
|
|
{
|
|
|
|
"fieldname":"company",
|
2014-04-14 16:25:30 +05:30
|
|
|
"label": __("Company"),
|
2013-04-22 13:14:52 +05:30
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Company",
|
2015-12-23 16:37:00 +05:30
|
|
|
"default": frappe.defaults.get_user_default("Company")
|
2013-04-22 13:14:52 +05:30
|
|
|
},
|
|
|
|
{
|
2014-09-11 19:27:24 +05:30
|
|
|
"fieldname":"customer",
|
|
|
|
"label": __("Customer"),
|
2013-04-22 13:14:52 +05:30
|
|
|
"fieldtype": "Link",
|
2014-09-11 19:27:24 +05:30
|
|
|
"options": "Customer"
|
2013-04-22 13:14:52 +05:30
|
|
|
},
|
2017-04-24 17:03:50 +05:30
|
|
|
{
|
|
|
|
"fieldname":"customer_group",
|
|
|
|
"label": __("Customer Group"),
|
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Customer Group"
|
|
|
|
},
|
|
|
|
{
|
2018-01-09 15:39:35 +05:30
|
|
|
"fieldname":"payment_terms_template",
|
|
|
|
"label": __("Payment Terms Template"),
|
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Payment Terms Template"
|
2017-04-24 17:03:50 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldtype": "Break",
|
|
|
|
},
|
2013-04-22 13:14:52 +05:30
|
|
|
{
|
|
|
|
"fieldname":"report_date",
|
2015-08-24 14:31:07 +05:30
|
|
|
"label": __("As on Date"),
|
2013-04-22 13:14:52 +05:30
|
|
|
"fieldtype": "Date",
|
2017-05-30 12:54:42 +05:30
|
|
|
"default": frappe.datetime.get_today()
|
2013-04-22 13:14:52 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"ageing_based_on",
|
2014-04-14 16:25:30 +05:30
|
|
|
"label": __("Ageing Based On"),
|
2013-04-22 13:14:52 +05:30
|
|
|
"fieldtype": "Select",
|
2017-05-30 12:54:42 +05:30
|
|
|
"options": 'Posting Date\nDue Date',
|
2013-04-22 13:14:52 +05:30
|
|
|
"default": "Posting Date"
|
2014-10-03 15:27:53 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"range1",
|
|
|
|
"label": __("Ageing Range 1"),
|
|
|
|
"fieldtype": "Int",
|
|
|
|
"default": "30",
|
|
|
|
"reqd": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"range2",
|
|
|
|
"label": __("Ageing Range 2"),
|
|
|
|
"fieldtype": "Int",
|
|
|
|
"default": "60",
|
|
|
|
"reqd": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"range3",
|
|
|
|
"label": __("Ageing Range 3"),
|
|
|
|
"fieldtype": "Int",
|
|
|
|
"default": "90",
|
|
|
|
"reqd": 1
|
2013-04-22 13:14:52 +05:30
|
|
|
}
|
2017-01-03 16:29:41 +05:30
|
|
|
],
|
|
|
|
|
|
|
|
onload: function(report) {
|
|
|
|
report.page.add_inner_button(__("Accounts Receivable Summary"), function() {
|
|
|
|
var filters = report.get_values();
|
|
|
|
frappe.set_route('query-report', 'Accounts Receivable Summary', {company: filters.company});
|
|
|
|
});
|
|
|
|
}
|
2014-09-11 19:27:24 +05:30
|
|
|
}
|