inventoryBusyStocktakeId function

String? inventoryBusyStocktakeId(
  1. Object? error
)

Die Inventur, die einen Standort belegt (stocktake_location_busy, details['stocktakeId']): weiterzaehlen statt neu anlegen. null, wenn der Fehler ein anderer ist oder der Server keine Kennung nennt.

Implementation

String? inventoryBusyStocktakeId(Object? error) {
  if (inventoryErrorCode(error) != 'stocktake_location_busy') return null;
  final wert = (error as KasseneckApiError).details['stocktakeId'];
  return wert is String && wert.isNotEmpty ? wert : null;
}