getPurchaseOrderItemByMatBatch method
Implementation
Future<PurchaseOrderItem> getPurchaseOrderItemByMatBatch({
required String poNumber,
required String material,
required String? batch,
Options? getPOItemsOptions,
}) async {
List<PurchaseOrderItem> orderItems = await getPurchaseOrderItems(
poNumber: poNumber,
getPOItemsOptions: getPOItemsOptions,
);
final orderItem = orderItems.getOrderItemByMaterialAndBatch(
material: material,
batch: batch,
);
if (orderItem != null) {
return orderItem;
} else {
throw Exception(
'There is no order item '
'which matches provided material and batch',
);
}
}