From 37dbc7043a17f62bbbc150ba25a093c99cbe2408 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 22 Jul 2022 17:54:46 +0530 Subject: [PATCH] fix: dont show zero qty available items in stock ageing report (cherry picked from commit 5da7e01db205098a5075def850a478a77931af78) --- erpnext/stock/report/stock_ageing/stock_ageing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index 1956238331e0..7c430e491abd 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -34,6 +34,9 @@ def format_report_data(filters: Filters, item_details: Dict, to_date: str) -> Li precision = cint(frappe.db.get_single_value("System Settings", "float_precision", cache=True)) for item, item_dict in item_details.items(): + if not flt(item_dict.get("total_qty"), precision): + continue + earliest_age, latest_age = 0, 0 details = item_dict["details"]