getPackUnitOfMeasures method

String? getPackUnitOfMeasures({
  1. String? headerMaterial,
})

Implementation

String? getPackUnitOfMeasures({
  String? headerMaterial,
}) {
  HuItem? huItem = this?.toHuItem?.firstWhereOrNull((i) {
    if (headerMaterial != null) return i.material == headerMaterial;
    return i.huItemType == '1';
  });

  bool hasPackQty = huItem?.packQuantity?.isNotEmpty ?? false;
  if (hasPackQty) return huItem?.baseUnitQuantityIso;

  return null;
}