diff --git a/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy b/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy index afb2df2aef..921969e504 100644 --- a/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy +++ b/applications/product/groovyScripts/facility/facility/CountFacilityInventoryByProduct.groovy @@ -181,7 +181,8 @@ if (action) { checkTime = UtilDateTime.toTimestamp(cal.getTime()) searchParameterString += "&monthsInPastLimit=" + monthsInPastLimitStr } catch (Exception e) { - // Ignore + Debug.logError(e, "Caught an exception : " + e.toString(), module) + request.setAttribute("_ERROR_MESSAGE", "An exception occured please check the log") } } @@ -278,7 +279,8 @@ if (action) { try { salesUsageQuantity += salesUsageItem.getDouble("quantity").doubleValue() } catch (Exception e) { - // Ignore + Debug.logError(e, "Caught an exception : " + e.toString(), module) + request.setAttribute("_ERROR_MESSAGE", "An exception occured please check the log") } } } @@ -299,7 +301,8 @@ if (action) { try { productionUsageQuantity += productionUsageItem.getDouble("quantity").doubleValue() } catch (Exception e) { - // Ignore + Debug.logError(e, "Caught an exception : " + e.toString(), module) + request.setAttribute("_ERROR_MESSAGE", "An exception occured please check the log") } } } diff --git a/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy b/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy index 8de93367ca..b5a3b03de3 100644 --- a/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy +++ b/applications/product/groovyScripts/facility/facility/ViewFacilityInventoryByProduct.groovy @@ -174,7 +174,8 @@ if (action) { checkTime = UtilDateTime.toTimestamp(cal.getTime()) searchParameterString += "&monthsInPastLimit=" + monthsInPastLimitStr } catch (Exception e) { - // Ignore + Debug.logError(e, "Caught an exception : " + e.toString(), module) + request.setAttribute("_ERROR_MESSAGE", "An exception occured please check the log") } } diff --git a/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy b/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy index bf976d1194..ea2293f175 100644 --- a/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy +++ b/applications/product/groovyScripts/facility/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy @@ -216,8 +216,10 @@ if (productIdToReceive) { if (productQtyToReceive) { try { quantity = Double.parseDouble(productQtyToReceive) - } catch (Exception e) { + } catch (NumberFormatException nfe) { // Ignore the quantity update if there's a problem parsing it + Debug.logError(nfe, "Caught an exception : " + nfe.toString(), module) + request.setAttribute("_ERROR_MESSAGE", "An exception occured please check the log") } }