2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Dialog for checking multiple items into a stock location

This commit is contained in:
Oliver Walters
2021-01-28 21:36:57 +11:00
parent 7e8def15ed
commit d61ae8532a
4 changed files with 163 additions and 24 deletions

View File

@ -160,7 +160,8 @@ class StockAdjust(APIView):
try:
quantity = Decimal(str(entry.get('quantity', None)))
except (ValueError, TypeError, InvalidOperation):
raise ValidationError({'quantity': 'Each entry must contain a valid quantity field'})
# Default to the quantity of the item
quantity = item.quantity
if quantity < 0:
raise ValidationError({'quantity': 'Quantity field must not be less than zero'})

View File

@ -460,7 +460,7 @@ $("#barcode-unlink").click(function() {
});
$("#barcode-scan-into-location").click(function() {
scanItemIntoLocation({{ item.id }});
scanItemsIntoLocation([{{ item.id }}]);
});
{% if item.in_stock %}