File diff 2fddb86c05a9 → 2ea1af3149c2
stockcli/stock.py
Show inline comments
 
import logging
 
from operator import itemgetter
 
from typing import Any
 

	
 
@@ -130,6 +131,7 @@ def transfer_by_barcode(barcode: str) ->
 
    )
 

	
 
    if not from_id:
 
        logging.debug("User aborted task!")
 
        return
 

	
 
    grid = Table.grid(padding=DEFAULT_PADDING)
 
@@ -159,11 +161,13 @@ def transfer_by_barcode(barcode: str) ->
 
    )
 

	
 
    if not to_id:
 
        logging.debug("User aborted task!")
 
        return
 

	
 
    amount = int_prompt.ask("Amount (Enter 0 to abort)")
 

	
 
    if not amount:
 
        logging.debug("User aborted task!")
 
        return
 

	
 
    data = {"amount": amount, "location_id_from": from_id, "location_id_to": to_id}
 
@@ -200,6 +204,7 @@ def add_by_barcode(barcode: str) -> None
 
    amount = int_prompt.ask("Amount (Enter 0 to abort)")
 

	
 
    if not amount:
 
        logging.debug("User aborted task!")
 
        return
 

	
 
    data = {"amount": amount, "transaction_type": "purchase"}
 
@@ -238,6 +243,7 @@ def update_by_barcode(barcode: str) -> N
 
    amount = int_prompt.ask("Amount (Enter 0 to abort)")
 

	
 
    if not amount:
 
        logging.debug("User aborted task!")
 
        return
 

	
 
    data = {