brotherton-erpnext/erpnext/stock/report/stock_balance/stock_balance.js
Suraj Shetty bc001d2d9a feat: Add stock ageing data to stock balance report (#19036)
* feat: Add stock ageing data to stock balance report

* fix: Use fifo queue warehouse wise

* fix: "Stock Ledger Entry" get query

* fix: Remove unwanted quotes in item details query

* fix: Check if no SLE was passed

* fix: Codacy

* fix: Add logic to include additional UOM columns

* fix: Show stock ageing data optionally
2019-09-16 19:57:04 +05:30

89 lines
1.9 KiB
JavaScript

// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors
// For license information, please see license.txt
frappe.query_reports["Stock Balance"] = {
"filters": [
{
"fieldname":"from_date",
"label": __("From Date"),
"fieldtype": "Date",
"width": "80",
"reqd": 1,
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
},
{
"fieldname":"to_date",
"label": __("To Date"),
"fieldtype": "Date",
"width": "80",
"reqd": 1,
"default": frappe.datetime.get_today()
},
{
"fieldname": "item_group",
"label": __("Item Group"),
"fieldtype": "Link",
"width": "80",
"options": "Item Group"
},
{
"fieldname":"brand",
"label": __("Brand"),
"fieldtype": "Link",
"options": "Brand"
},
{
"fieldname": "item_code",
"label": __("Item"),
"fieldtype": "Link",
"width": "80",
"options": "Item",
"get_query": function() {
return {
query: "erpnext.controllers.queries.item_query",
};
}
},
{
"fieldname": "warehouse",
"label": __("Warehouse"),
"fieldtype": "Link",
"width": "80",
"options": "Warehouse",
get_query: () => {
var warehouse_type = frappe.query_report.get_filter_value('warehouse_type');
if(warehouse_type){
return {
filters: {
'warehouse_type': warehouse_type
}
};
}
}
},
{
"fieldname": "warehouse_type",
"label": __("Warehouse Type"),
"fieldtype": "Link",
"width": "80",
"options": "Warehouse Type"
},
{
"fieldname":"include_uom",
"label": __("Include UOM"),
"fieldtype": "Link",
"options": "UOM"
},
{
"fieldname": "show_variant_attributes",
"label": __("Show Variant Attributes"),
"fieldtype": "Check"
},
{
"fieldname": 'show_stock_ageing_data',
"label": __('Show Stock Ageing Data'),
"fieldtype": 'Check'
},
]
};