2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-07-11 08:04:14 +00:00

Add POReceiveBarcodeHandler to support barcode/po-receive/ endpoint (#421)

* Add POReceiveBarcodeHandler to support barcode/po-receive/ endpoint

* Remove german translation

* Add api version checks

* Add getOverlayText method to barcode handler

* Bump required API version to 139

* Update barcode.dart

The "quantity" field is not an integer, and can cause the app to crash if not handled correctly

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
Bobbe
2023-10-19 14:28:32 +02:00
committed by GitHub
parent c76309341b
commit 67fd6a564a
7 changed files with 185 additions and 2 deletions

View File

@ -104,6 +104,21 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> {
);
}
if (api.supportsBarcodePOReceiveEndpoint) {
actions.add(
SpeedDialChild(
child: Icon(Icons.barcode_reader),
label: L10().scanReceivedParts,
onTap:() async {
scanBarcode(
context,
handler: POReceiveBarcodeHandler(location: location),
);
},
)
);
}
// Scan this location into another one
if (InvenTreeStockLocation().canEdit) {
actions.add(