Skip to content

Commit

Permalink
Deepthi M|Gok-363|Updated to fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
deepthi-mantena committed Oct 3, 2023
1 parent 21f11ca commit f716fca
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/service/save-quantity.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import {
postRequest,
getRequest,
stockOperationURL,
stockOperationTypeURL,
stockTakeURL,
} from '../utils/api-utils';
import { getFormattedDate } from '../utils/date-utils';

const saveEditedQuantity = async (
productName,
Expand All @@ -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);
};
Expand Down

0 comments on commit f716fca

Please sign in to comment.