deleteSingleAsset method
Implementation
Future<void> deleteSingleAsset(
String assetId, ProductContentModel product) async {
currentProduct = product;
switch (currentScan) {
case ScanType.collectStock:
await callDeleteAssetByIdApi(
assetId, null, null, product.productCode, false);
break;
case ScanType.sellThru:
await callDeleteAssetByIdApi(
assetId, null, null, product.productCode, false);
break;
case ScanType.spotSellThru:
await callDeleteAssetByIdApi(
assetId, null, null, product.productCode, false);
break;
case ScanType.grn:
await deleteAssetGrn(assetId, product);
break;
default:
title = "collectStock";
break;
}
}