fix: Sider and Server side test
- args passed to wrong function
- missing space around '='
diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py
index 0136007..75e235a 100644
--- a/erpnext/stock/report/stock_ageing/stock_ageing.py
+++ b/erpnext/stock/report/stock_ageing/stock_ageing.py
@@ -13,7 +13,7 @@
Filters = frappe._dict
-def execute(filters: Filters =None) -> Tuple:
+def execute(filters: Filters = None) -> Tuple:
to_date = filters["to_date"]
columns = get_columns(filters)
@@ -213,10 +213,10 @@
f"{cint(filters['range3']) + 1} - {_('Above')}"
]
for i, label in enumerate(ranges):
- fieldname = 'range' + str(i+1)
- add_column(range_columns, label=f"Age ({label})",fieldname=fieldname)
+ fieldname = 'range' + str(i+1)
+ add_column(range_columns, label=f"Age ({label})",fieldname=fieldname)
-def add_column(range_columns: List, label:str, fieldname: str, fieldtype: str ='Float', width: int =140):
+def add_column(range_columns: List, label:str, fieldname: str, fieldtype: str = 'Float', width: int = 140):
range_columns.append(dict(
label=label,
fieldname=fieldname,
@@ -228,7 +228,7 @@
class FIFOSlots:
"Returns FIFO computed slots of inwarded stock as per date."
- def __init__(self, filters: Dict =None , sle: List =None):
+ def __init__(self, filters: Dict = None , sle: List = None):
self.item_details = {}
self.transferred_item_details = {}
self.serial_no_batch_purchase_details = {}
@@ -245,7 +245,7 @@
consumed/updated and maintained via FIFO. **
}
"""
- if self.sle == None:
+ if self.sle is None:
self.sle = self.__get_stock_ledger_entries()
for d in self.sle:
@@ -358,7 +358,8 @@
posting_date <= %(to_date)s and
is_cancelled != 1
{sle_conditions}
- order by posting_date, posting_time, sle.creation, actual_qty""" #nosec
+ order by posting_date, posting_time, sle.creation, actual_qty
+ """ #nosec
.format(
item_conditions=self.__get_item_conditions(),
sle_conditions=self.__get_sle_conditions()
diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py
index 44d52f7..b4f43a7 100644
--- a/erpnext/stock/report/stock_balance/stock_balance.py
+++ b/erpnext/stock/report/stock_balance/stock_balance.py
@@ -33,7 +33,7 @@
if filters.get('show_stock_ageing_data'):
filters['show_warehouse_wise_stock'] = True
- item_wise_fifo_queue = FIFOSlots().generate(filters, sle)
+ item_wise_fifo_queue = FIFOSlots(filters, sle).generate()
# if no stock ledger entry found return
if not sle:
diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py
index e5003ee..22bdb89 100644
--- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py
+++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py
@@ -33,7 +33,7 @@
item_map = get_item_details(items, sle, filters)
iwb_map = get_item_warehouse_map(filters, sle)
warehouse_list = get_warehouse_list(filters)
- item_ageing = FIFOSlots().generate(filters)
+ item_ageing = FIFOSlots(filters).generate()
data = []
item_balance = {}
item_value = {}