Skip to content

Commit a597a4e

Browse files
committed
Change handling double values
1 parent 46729a2 commit a597a4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

omods/core/omod/src/main/java/org/openmrs/module/icare/web/controller/StoreController.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -968,13 +968,13 @@ public Map<String,Object> getStockItemsSummaryCost(
968968
List<Object[]> results = response.getResults();
969969
Map<String,Object> outputData = new HashMap<>();
970970
for (Object[] result: results) {
971-
Double totalBuyingAmount = Double.valueOf(result[0].toString());
971+
double totalBuyingAmount = Double.parseDouble(result[0].toString());
972972
Item item = (Item) result[1];
973973
StockInvoice stockInvoiceData = (StockInvoice) result[2];
974-
Double totalItemAmount = Double.valueOf(result[3].toString());
975-
Double totalItemIncomeExpected = null;
974+
double totalItemAmount = Double.parseDouble(result[3].toString());
975+
double totalItemIncomeExpected = 0.0;
976976
if (paymentScheme != null) {
977-
totalItemIncomeExpected = Double.valueOf(result[4].toString());
977+
totalItemIncomeExpected = Double.parseDouble(result[4].toString());
978978
}
979979
Map<String,Object> itemBuyAndSellDetails = item.toMap();
980980
if (!item.getPrices().isEmpty()) {

0 commit comments

Comments
 (0)