stock method

Future<StockList> stock({
  1. String? locationId,
  2. String? articleId,
  3. bool? belowMinimum,
})

Bestand je Artikel und Standort (listMyStock), Mengen in Tausendstel der Basiseinheit. Recht stockView; StockList.values nur mit stockCosts, sonst null.

Ein leerer Filter gilt wie keiner; belowMinimum geht nur als true hinaus (false filtert am Server nicht). Eine fehlende oder gebrochene Menge wird nie zu 0, sondern endet mit KasseneckValidationError (kind: response) – „Lager voruebergehend nicht verfuegbar“, der Verkauf laeuft weiter.

Implementation

Future<StockList> stock({String? locationId, String? articleId, bool? belowMinimum}) async {
  const name = Aufrufe.listMyStock;
  final daten = await transport.call(name, params: {
    if (locationId != null && locationId.isNotEmpty) 'locationId': locationId,
    if (articleId != null && articleId.isNotEmpty) 'articleId': articleId,
    if (belowMinimum == true) 'belowMinimum': true,
  });
  return lagerBestandslisteLesen(name, daten);
}