Skip to content

Commit

Permalink
Improved: changed the name & datatype of the variable storing the qoh…
Browse files Browse the repository at this point in the history
… in the service function(#416)
  • Loading branch information
R-Sourabh committed Nov 12, 2024
1 parent b37c53f commit 355ec08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/ProductService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const fetchProducts = async (query: any): Promise <any> => {
}

const getInventoryAvailableByFacility = async (productId: any): Promise<any> => {
let inventoryAvailableByFacility = {}
let productQoh = ''
const payload = {
productId: productId,
facilityId: store.getters['user/getCurrentFacility']?.facilityId
Expand All @@ -24,14 +24,14 @@ const getInventoryAvailableByFacility = async (productId: any): Promise<any> =>
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 = {
Expand Down

0 comments on commit 355ec08

Please sign in to comment.