We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 108a74c commit d817ecdCopy full SHA for d817ecd
model.py
@@ -20,3 +20,6 @@ def __init__(self, ref: str, sku: str, qty: int, eta: Optional[date]):
20
21
def allocate(self, line: OrderLine):
22
self.available_quantity -= line.qty
23
+
24
+ def can_allocate(self, line: OrderLine) -> bool:
25
+ return self.sku == line.sku and self.available_quantity >= line.qty
0 commit comments