From 3184fed1a16c197b99c15a1fc89424813530cfdf Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sun, 16 Feb 2014 12:06:16 -0500 Subject: [PATCH] IDEMPIERE-1758 Currency conversion rate default for ValidTo is misleading --- .../src/org/compiere/model/MConversionRate.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MConversionRate.java b/org.adempiere.base/src/org/compiere/model/MConversionRate.java index fda74dc6b9..9c2874da9e 100644 --- a/org.adempiere.base/src/org/compiere/model/MConversionRate.java +++ b/org.adempiere.base/src/org/compiere/model/MConversionRate.java @@ -32,7 +32,6 @@ import org.compiere.util.DB; import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg; -import org.compiere.util.TimeUtil; import org.compiere.util.Trx; /** @@ -403,8 +402,11 @@ public class MConversionRate extends X_C_Conversion_Rate // Date Range Check Timestamp from = getValidFrom(); - if (getValidTo() == null) - setValidTo (TimeUtil.getDay(2056, 1, 29)); // no exchange rates after my 100th birthday + if (getValidTo() == null) { + // setValidTo (TimeUtil.getDay(2056, 1, 29)); // no exchange rates after my 100th birthday + log.saveError("FillMandatory", Msg.getElement(getCtx(), COLUMNNAME_ValidTo)); + return false; + } Timestamp to = getValidTo(); if (to.before(from))