From 72a2978dcf28fb5082bf13b0a6084447bc21ea2c Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Thu, 5 Jun 2008 11:43:21 +0000 Subject: [PATCH] FR [ 1985321 ] CalloutEngine introduce NO_ERROR constant --- base/src/org/compiere/model/CalloutEngine.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/base/src/org/compiere/model/CalloutEngine.java b/base/src/org/compiere/model/CalloutEngine.java index 761370ff43..279a64e4d5 100644 --- a/base/src/org/compiere/model/CalloutEngine.java +++ b/base/src/org/compiere/model/CalloutEngine.java @@ -31,6 +31,9 @@ import org.compiere.util.*; */ public class CalloutEngine implements Callout { + /** No error return value. Use this when you are returning from a callout without error */ + public static final String NO_ERROR = ""; + /** * Constructor */ @@ -215,11 +218,11 @@ public class CalloutEngine implements Callout public String dateAcct (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { if (isCalloutActive()) // assuming it is resetting value - return ""; + return NO_ERROR; if (value == null || !(value instanceof Timestamp)) - return ""; + return NO_ERROR; mTab.setValue("DateAcct", value); - return ""; + return NO_ERROR; } // dateAcct /** @@ -235,7 +238,7 @@ public class CalloutEngine implements Callout public String rate (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { if (isCalloutActive() || value == null) // assuming it is Conversion_Rate - return ""; + return NO_ERROR; BigDecimal rate1 = (BigDecimal)value; BigDecimal rate2 = Env.ZERO; @@ -249,7 +252,7 @@ public class CalloutEngine implements Callout else mTab.setValue("MultiplyRate", rate2); log.info(mField.getColumnName() + "=" + rate1 + " => " + rate2); - return ""; + return NO_ERROR; } // rate /**