IDEMPIERE-1286 Improve address validation configuration to support external services
This commit is contained in:
parent
c250df9d25
commit
32b7640889
|
@ -82,7 +82,7 @@ public class MAddressTransaction extends X_C_AddressTransaction
|
||||||
{
|
{
|
||||||
setErrorMessage(null);
|
setErrorMessage(null);
|
||||||
|
|
||||||
boolean processed = false;
|
boolean processed = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IAddressValidation validation = Core.getAddressValidation(getMAddressValidation());
|
IAddressValidation validation = Core.getAddressValidation(getMAddressValidation());
|
||||||
|
@ -91,7 +91,7 @@ public class MAddressTransaction extends X_C_AddressTransaction
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
processed = validation.onlineValidate(getCtx(), this, get_TrxName());
|
processed = validation.onlineValidate(getCtx(), this, get_TrxName());
|
||||||
if (!processed)
|
if (!processed || !isValid())
|
||||||
setErrorMessage("From " + getMAddressValidation().getName() + ": " + getResult());
|
setErrorMessage("From " + getMAddressValidation().getName() + ": " + getResult());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public class MAddressTransaction extends X_C_AddressTransaction
|
||||||
MOnlineTrxHistory history = new MOnlineTrxHistory(getCtx(), 0, get_TrxName());
|
MOnlineTrxHistory history = new MOnlineTrxHistory(getCtx(), 0, get_TrxName());
|
||||||
history.setAD_Table_ID(MAddressTransaction.Table_ID);
|
history.setAD_Table_ID(MAddressTransaction.Table_ID);
|
||||||
history.setRecord_ID(getC_AddressTransaction_ID());
|
history.setRecord_ID(getC_AddressTransaction_ID());
|
||||||
history.setIsError(!processed);
|
history.setIsError(!(processed && isValid()));
|
||||||
history.setProcessed(processed);
|
history.setProcessed(processed);
|
||||||
|
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
|
|
Loading…
Reference in New Issue