Sales order barcode (#466)

* Add barcode handler for allocating stock to sales order

* Refactor sales order allocation fields

* Improve barcode handling

* Handle barcode scan from sales order line detail view

* Remove debug statements
This commit is contained in:
Oliver 2023-12-13 23:49:55 +11:00 committed by GitHub
parent edde9a9585
commit 571b491846
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 179 additions and 25 deletions

View file

@ -146,6 +146,23 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
}
)
);
if (api.supportsBarcodeSOAllocateEndpoint) {
actions.add(
SpeedDialChild(
child: FaIcon(FontAwesomeIcons.rightToBracket),
label: L10().allocateStock,
onTap: () async {
scanBarcode(
context,
handler: SOAllocateStockHandler(
salesOrder: widget.order,
)
);
}
)
);
}
}
return actions;