2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Add barcode handler to scan stock item into location

This commit is contained in:
Oliver Walters
2021-01-29 00:28:50 +11:00
parent db6aae8a78
commit c00e367ae5
3 changed files with 53 additions and 9 deletions

View File

@ -253,7 +253,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
_quantityController.clear();
_notesController.clear();
var response = await item.transferStock(quantity, location.pk, notes: notes);
var response = await item.transferStock(location.pk, quantity: quantity, notes: notes);
// TODO - Error handling (potentially return false?)
refresh();
@ -525,6 +525,10 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
leading: FaIcon(FontAwesomeIcons.exchangeAlt),
trailing: FaIcon(FontAwesomeIcons.qrcode),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => InvenTreeQRView(StockItemScanIntoLocationHandler(item)))
);
},
)
);