diff --git a/client/src/i18n/en/inventory.json b/client/src/i18n/en/inventory.json index eee33c21c5..55ac95a94a 100644 --- a/client/src/i18n/en/inventory.json +++ b/client/src/i18n/en/inventory.json @@ -1,6 +1,7 @@ { "INVENTORY": { "ADD_GROUP": "Add Inventory Group", + "OPEN_AMC_CALCULATION" : "View AMC Calculations", "ADD_METADATA": "Add Inventory Item", "ADD_TYPE": "Add Inventory Type", "ADD_UNIT": "Add Inventory unit form", diff --git a/client/src/i18n/en/stock.json b/client/src/i18n/en/stock.json index 3dc402c3af..e34550a6b0 100644 --- a/client/src/i18n/en/stock.json +++ b/client/src/i18n/en/stock.json @@ -115,6 +115,7 @@ "MONTH_OF_STOCK" : "Stock Months - Months until Stock Out", "MONTHLY_CONSUM" : "Average Monthly Consumption", "MONTHLY_CONSUMPTION" : { + "AVERAGE_MONTHLY_CONSUMPTION" : "Average Monthly Consumption", "ALGO_1" : "Algorithm 1", "ALGO_1_COMMENT" : "The average monthly consumption is obtained by dividing the quantity consumed during the period by the number of days with stock for the period, and by multiplying the result by 30.5.", "ALGO_2" : "Algorithm 2", @@ -122,7 +123,19 @@ "ALGO_3" : "Algorithm 3", "ALGO_3_COMMENT" : "The average consumption is obtained by dividing the quantity consumed during the period by the number of days in the period, and by multiplying the result obtained by 30.5.", "ALGO_4" : "Algorithm 4 (MSH)", - "ALGO_4_COMMENT" : "The average consumption is obtained by dividing the quantity consumed during the period by the difference of the number of months in the period minus the total number of days of stock out in the period. The MSH algorithm is recommended by the Management Sciences for Health organization (https://www.msh.org)." + "ALGO_4_COMMENT" : "The average consumption is obtained by dividing the quantity consumed during the period by the difference of the number of months in the period minus the total number of days of stock out in the period. The MSH algorithm is recommended by the Management Sciences for Health organization (https://www.msh.org).", + "FIRST_INVENTORY_MOVEMENT_DATE" : "First Recorded Movement", + "LAST_INVENTORY_MOVEMENT_DATE" : "Last Recorded Movement", + "DAYS_BEFORE_CONSUMPTION" : "Days before First Consumption", + "NUMBER_OF_MONTHS" : "Number of Months", + "SUM_CONSUMPTION_DAY" : "Stock Consumption", + "SUM_CONSUMED_QUANTITY" :"Quantity Consumed", + "SUM_DAYS" : "Total Days", + "SUM_STOCK_DAY" : "Stock Available in Depot", + "SUM_STOCK_OUT_DAYS" : "Stock Outs", + "TITLE" : "Average Monthly Consumption", + "DAYS" : "Days", + "MONTHS" : "Months" }, "MOTIF" : "Motive", "MOVEMENT" : "Movement", diff --git a/client/src/i18n/fr/inventory.json b/client/src/i18n/fr/inventory.json index 5038eafbc2..edac521540 100644 --- a/client/src/i18n/fr/inventory.json +++ b/client/src/i18n/fr/inventory.json @@ -1,6 +1,7 @@ { "INVENTORY": { "ADD_GROUP": "Ajouter un groupe d'inventaire", + "OPEN_AMC_CALCULATION" : "Voire CMM calcules", "ADD_METADATA": "Ajouter un inventaire", "ADD_TYPE": "Ajouter un type d'inventaire", "ADD_UNIT": "Ajouter une forme d'Inventaire", diff --git a/client/src/js/services/StockService.js b/client/src/js/services/StockService.js index 57b142df4f..df39a709ba 100644 --- a/client/src/js/services/StockService.js +++ b/client/src/js/services/StockService.js @@ -190,6 +190,11 @@ function StockService(Api, StockFilterer, HttpCache, util, Periods) { }); } + inventories.loadAMCForInventory = function loadAMCForInventory(inventoryUuid, depotUuid) { + return inventories.$http.get(`/depots/${depotUuid}/inventories/${inventoryUuid}/cmm`) + .then(util.unwrapHttpResponse); + }; + return { stocks, stockAssign, diff --git a/client/src/modules/stock/inventories/modals/amc.modal.html b/client/src/modules/stock/inventories/modals/amc.modal.html new file mode 100644 index 0000000000..da95bf85cf --- /dev/null +++ b/client/src/modules/stock/inventories/modals/amc.modal.html @@ -0,0 +1,115 @@ +
+
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_1
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_1_COMMENT
+
+
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_2
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_2_COMMENT
+
+
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_3
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_3_COMMENT
+
+
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_4
+
+ STOCK.MONTHLY_CONSUMPTION.ALGO_4_COMMENT
+
+
STOCK.MONTHLY_CONSUMPTION.ALGO_1 | +STOCK.MONTHLY_CONSUMPTION.ALGO_2 | +STOCK.MONTHLY_CONSUMPTION.ALGO_3 | +STOCK.MONTHLY_CONSUMPTION.ALGO_4 | +
---|---|---|---|
{{ModalCtrl.data.algo1}} | +{{ModalCtrl.data.algo2}} | +{{ModalCtrl.data.algo3}} | +{{ModalCtrl.data.algo_msh}} | +