From 6151f11ccdfeb8acd982d81e46f8e23e2aa5bf2a Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Wed, 12 Jul 2023 18:24:34 -0400 Subject: [PATCH] Opp amount but in CrmImportEvent --- .../com/impactupgrade/nucleus/model/CrmImportEvent.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/impactupgrade/nucleus/model/CrmImportEvent.java b/src/main/java/com/impactupgrade/nucleus/model/CrmImportEvent.java index ed6f782e0..a81cbd798 100644 --- a/src/main/java/com/impactupgrade/nucleus/model/CrmImportEvent.java +++ b/src/main/java/com/impactupgrade/nucleus/model/CrmImportEvent.java @@ -503,7 +503,10 @@ private static BigDecimal getAmount(CaseInsensitiveMap data, String colu if (!data.containsKey(columnName)) { return null; } - return new BigDecimal(data.get(columnName).replace("$", "").replace(",", "") - .trim()).setScale(2, RoundingMode.CEILING); + String n = data.get(columnName); + if (Strings.isNullOrEmpty(n)) { + return null; + } + return new BigDecimal(n.replace("$", "").replace(",", "").trim()).setScale(2, RoundingMode.CEILING); } }