Show inventory stock amount in product dropdown
This commit is contained in:
parent
0104bde234
commit
532e35affc
|
|
@ -821,6 +821,19 @@ class _InvoiceEditItemsDesktopState extends State<InvoiceEditItemsDesktop> {
|
||||||
EntityAutocompleteListTile(
|
EntityAutocompleteListTile(
|
||||||
onTap: (entity) => onSelected(
|
onTap: (entity) => onSelected(
|
||||||
entity as ProductEntity),
|
entity as ProductEntity),
|
||||||
|
overrideSuggestedLabel:
|
||||||
|
(entity) {
|
||||||
|
var label =
|
||||||
|
entity.listDisplayName;
|
||||||
|
if (state.company
|
||||||
|
.trackInventory) {
|
||||||
|
final product = entity
|
||||||
|
as ProductEntity;
|
||||||
|
label +=
|
||||||
|
' [${product.stockQuantity}]';
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
},
|
||||||
overrideSuggestedAmount:
|
overrideSuggestedAmount:
|
||||||
(entity) {
|
(entity) {
|
||||||
final product =
|
final product =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue