feat: repr, eq and iter for fifo queue
diff --git a/erpnext/stock/valuation.py b/erpnext/stock/valuation.py
index 33191d8..617e1ca 100644
--- a/erpnext/stock/valuation.py
+++ b/erpnext/stock/valuation.py
@@ -23,6 +23,17 @@
def __init__(self, state: Optional[List[FifoBin]]):
self.queue: List[FifoBin] = state if state is not None else []
+ def __repr__(self):
+ return str(self.queue)
+
+ def __iter__(self):
+ return iter(self.queue)
+
+ def __eq__(self, other):
+ if isinstance(other, list):
+ return self.queue == other
+ return self.queue == other.queue
+
def get_state(self) -> List[FifoBin]:
"""Get current state of queue."""
return self.queue