2015-03-03 09:25:30 +00:00
|
|
|
// Copyright (c) 2015, Frappe 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 Receivable"] = {
|
2013-04-22 07:44:52 +00:00
|
|
|
"filters": [
|
|
|
|
{
|
|
|
|
"fieldname":"company",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Company"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Company",
|
2015-12-23 11:07:00 +00:00
|
|
|
"default": frappe.defaults.get_user_default("Company")
|
2013-04-22 07:44:52 +00:00
|
|
|
},
|
|
|
|
{
|
2014-09-11 13:57:24 +00:00
|
|
|
"fieldname":"customer",
|
|
|
|
"label": __("Customer"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Link",
|
2014-09-11 13:57:24 +00:00
|
|
|
"options": "Customer"
|
2013-04-22 07:44:52 +00:00
|
|
|
},
|
2017-04-24 11:33:50 +00:00
|
|
|
{
|
|
|
|
"fieldname":"customer_group",
|
|
|
|
"label": __("Customer Group"),
|
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Customer Group"
|
|
|
|
},
|
|
|
|
{
|
2018-01-09 10:09:35 +00:00
|
|
|
"fieldname":"payment_terms_template",
|
|
|
|
"label": __("Payment Terms Template"),
|
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Payment Terms Template"
|
2017-04-24 11:33:50 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldtype": "Break",
|
|
|
|
},
|
2013-04-22 07:44:52 +00:00
|
|
|
{
|
|
|
|
"fieldname":"report_date",
|
2015-08-24 09:01:07 +00:00
|
|
|
"label": __("As on Date"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Date",
|
2017-05-30 07:24:42 +00:00
|
|
|
"default": frappe.datetime.get_today()
|
2013-04-22 07:44:52 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"ageing_based_on",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Ageing Based On"),
|
2013-04-22 07:44:52 +00:00
|
|
|
"fieldtype": "Select",
|
2017-05-30 07:24:42 +00:00
|
|
|
"options": 'Posting Date\nDue Date',
|
2013-04-22 07:44:52 +00:00
|
|
|
"default": "Posting Date"
|
2014-10-03 09:57:53 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"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
|
2018-02-07 13:02:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"show_pdc_in_print",
|
|
|
|
"label": __("Show PDC in Print"),
|
|
|
|
"fieldtype": "Check",
|
2013-04-22 07:44:52 +00:00
|
|
|
}
|
2017-01-03 10:59:41 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
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 13:57:24 +00:00
|
|
|
}
|