From 355ec0842ee2cb06fc994e829c4af3171b3f30a9 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Tue, 12 Nov 2024 15:28:48 +0530 Subject: [PATCH] Improved: changed the name & datatype of the variable storing the qoh in the service function(#416) --- src/services/ProductService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/ProductService.ts b/src/services/ProductService.ts index 7b91916a..160f6616 100644 --- a/src/services/ProductService.ts +++ b/src/services/ProductService.ts @@ -11,7 +11,7 @@ const fetchProducts = async (query: any): Promise => { } const getInventoryAvailableByFacility = async (productId: any): Promise => { - let inventoryAvailableByFacility = {} + let productQoh = '' const payload = { productId: productId, facilityId: store.getters['user/getCurrentFacility']?.facilityId @@ -24,14 +24,14 @@ const getInventoryAvailableByFacility = async (productId: any): Promise => data: payload }) if (!hasError(resp)) { - inventoryAvailableByFacility = resp?.data.quantityOnHandTotal; + productQoh = resp?.data.quantityOnHandTotal; } else { throw resp.data; } } catch (err) { console.error(err) } - return inventoryAvailableByFacility + return productQoh; } export const ProductService = {