mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 10:15:32 +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:
@ -58,8 +58,9 @@ class BarcodeHandler {
|
||||
*
|
||||
* Returns true only if the barcode scanner should remain open
|
||||
*/
|
||||
Future<void> processBarcode(String barcode, {String url = "barcode/"}) async {
|
||||
|
||||
Future<void> processBarcode(String barcode,
|
||||
{String url = "barcode/",
|
||||
Map<String, dynamic> extra_data = const {}}) async {
|
||||
debug("Scanned barcode data: '${barcode}'");
|
||||
|
||||
barcode = barcode.trim();
|
||||
@ -82,6 +83,7 @@ class BarcodeHandler {
|
||||
url,
|
||||
body: {
|
||||
"barcode": barcode,
|
||||
...extra_data,
|
||||
},
|
||||
expectedStatusCode: null, // Do not show an error on "unexpected code"
|
||||
);
|
||||
|
Reference in New Issue
Block a user