setGrnProducts method

void setGrnProducts(
  1. Content data
)

Implementation

void setGrnProducts(Content data) {
  selectedGrnOrder.value = data;
  List<ProductContentModel> products = [];
  for (final ProductDetail value in data.productDetails ?? []) {
    var grnProduct = ProductContentModel(
      productCode: value.productCode,
      productName: value.productName,
      totalOrderedQuantity: value.count,
    );
    products.add(grnProduct);
  }
  productDataList.value = products;
  productDataScannedList.value = products;
}