2015-03-03 09:25:30 +00:00
|
|
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2013-12-26 05:37:58 +00:00
|
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
|
2014-02-14 10:17:51 +00:00
|
|
|
frappe.query_reports["Stock Ageing"] = {
|
2013-12-26 05:37:58 +00:00
|
|
|
"filters": [
|
|
|
|
{
|
|
|
|
"fieldname":"company",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Company"),
|
2013-12-26 05:37:58 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Company",
|
2015-12-23 11:07:00 +00:00
|
|
|
"default": frappe.defaults.get_user_default("Company"),
|
2013-12-26 05:37:58 +00:00
|
|
|
"reqd": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"to_date",
|
2019-03-19 20:36:39 +00:00
|
|
|
"label": __("As On Date"),
|
2013-12-26 05:37:58 +00:00
|
|
|
"fieldtype": "Date",
|
2014-02-14 10:17:51 +00:00
|
|
|
"default": frappe.datetime.get_today(),
|
2013-12-26 05:37:58 +00:00
|
|
|
"reqd": 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"warehouse",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Warehouse"),
|
2013-12-26 05:37:58 +00:00
|
|
|
"fieldtype": "Link",
|
2021-09-12 11:08:18 +00:00
|
|
|
"options": "Warehouse",
|
|
|
|
get_query: () => {
|
|
|
|
const company = frappe.query_report.get_filter_value("company");
|
|
|
|
return {
|
|
|
|
filters: {
|
|
|
|
...company && {company},
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2013-12-26 05:37:58 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"item_code",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Item"),
|
2013-12-26 05:37:58 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Item"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"fieldname":"brand",
|
2014-04-14 10:55:30 +00:00
|
|
|
"label": __("Brand"),
|
2013-12-26 05:37:58 +00:00
|
|
|
"fieldtype": "Link",
|
|
|
|
"options": "Brand"
|
2019-03-19 20:36:39 +00:00
|
|
|
},
|
2020-07-08 13:53:13 +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
|
|
|
|
},
|
2019-03-19 20:36:39 +00:00
|
|
|
{
|
2019-07-13 16:28:32 +00:00
|
|
|
"fieldname":"show_warehouse_wise_stock",
|
|
|
|
"label": __("Show Warehouse-wise Stock"),
|
2019-03-19 20:36:39 +00:00
|
|
|
"fieldtype": "Check",
|
|
|
|
"default": 0
|
2013-12-26 05:37:58 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|