diff --git a/src/service/save-quantity.js b/src/service/save-quantity.js index d137d47..3c1bbbe 100644 --- a/src/service/save-quantity.js +++ b/src/service/save-quantity.js @@ -1,11 +1,8 @@ import { postRequest, getRequest, - stockOperationURL, - stockOperationTypeURL, stockTakeURL, } from '../utils/api-utils'; -import { getFormattedDate } from '../utils/date-utils'; const saveEditedQuantity = async ( productName, @@ -21,16 +18,15 @@ const itemStockSummaryList = []; const itemResponse = await getRequest(`/openmrs/ws/rest/v2/inventory/item?v=full&q=${encodedProductName}`); const itemUuid = itemResponse.results[0]?.uuid; itemStockSummaryList.push({ - item: itemUuid, - expiration: expiration, - quantity: quantity, - actualQuantity: actualQuantity, + item: itemUuid, + expiration, + quantity, + actualQuantity, }); const requestBody = { operationNumber: "", stockroom: sourceUuid, - itemStockSummaryList: itemStockSummaryList, - + itemStockSummaryList, }; return postRequest(stockTakeURL, requestBody); };