Skip to content

Commit c0938ac

Browse files
committed
start on service for change quantity [change_quantity_service]
1 parent d5d5b92 commit c0938ac

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/allocation/services.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,13 @@ def allocate(
3131
batchref = product.allocate(line)
3232
uow.commit()
3333
return batchref
34+
35+
36+
def change_batch_quantity(
37+
ref: str, qty: int,
38+
uow: unit_of_work.AbstractUnitOfWork
39+
):
40+
with uow:
41+
product = uow.products.get_by_batchref(batchref=ref)
42+
product.change_batch_quantity(ref=ref, qty=qty)
43+
uow.commit()

0 commit comments

Comments
 (0)