IDEMPIERE-3769 IBAN : Invalid message is not translated - force to uppercase
This commit is contained in:
parent
d53ea58c2f
commit
82623d4399
|
@ -0,0 +1,10 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3769 : IBAN : Invalid message is not translated - force to uppercase
|
||||
-- Aug 1, 2018 8:56:43 AM CEST
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','IBAN is invalid',0,0,'Y',TO_DATE('2018-08-01 08:56:42','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-01 08:56:42','YYYY-MM-DD HH24:MI:SS'),0,200480,'InvalidIBAN','D','4cc792d9-9af0-4e37-b90a-7dcc9f5e82ec')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201808010900_IDEMPIERE-3769.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,7 @@
|
|||
-- IDEMPIERE-3769 : IBAN : Invalid message is not translated - force to uppercase
|
||||
-- Aug 1, 2018 8:56:43 AM CEST
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','IBAN is invalid',0,0,'Y',TO_TIMESTAMP('2018-08-01 08:56:42','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-01 08:56:42','YYYY-MM-DD HH24:MI:SS'),0,200480,'InvalidIBAN','D','4cc792d9-9af0-4e37-b90a-7dcc9f5e82ec')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201808010900_IDEMPIERE-3769.sql') FROM dual
|
||||
;
|
|
@ -24,6 +24,7 @@ import org.adempiere.util.PaymentUtil;
|
|||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.IBAN;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
|
@ -214,7 +215,7 @@ public class MBPBankAccount extends X_C_BP_BankAccount
|
|||
if (!Util.isEmpty(getIBAN())) {
|
||||
setIBAN(IBAN.normalizeIBAN(getIBAN()));
|
||||
if (!IBAN.isValid(getIBAN())) {
|
||||
log.saveError("Error", "IBAN is invalid");
|
||||
log.saveError("Error", Msg.getMsg(getCtx(), "InvalidIBAN"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.Properties;
|
|||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.IBAN;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
|
||||
|
@ -136,7 +137,7 @@ public class MBankAccount extends X_C_BankAccount
|
|||
if (!Util.isEmpty(getIBAN())) {
|
||||
setIBAN(IBAN.normalizeIBAN(getIBAN()));
|
||||
if (!IBAN.isValid(getIBAN())) {
|
||||
log.saveError("Error", "IBAN is invalid");
|
||||
log.saveError("Error", Msg.getMsg(getCtx(), "InvalidIBAN"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -804,7 +804,7 @@ public class MPayment extends X_C_Payment
|
|||
if (!Util.isEmpty(getIBAN())) {
|
||||
setIBAN(IBAN.normalizeIBAN(getIBAN()));
|
||||
if (!IBAN.isValid(getIBAN())) {
|
||||
log.saveError("Error", "IBAN is invalid");
|
||||
log.saveError("Error", Msg.getMsg(getCtx(), "InvalidIBAN"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce
|
|||
if (!Util.isEmpty(getIBAN())) {
|
||||
setIBAN(IBAN.normalizeIBAN(getIBAN()));
|
||||
if (!IBAN.isValid(getIBAN())) {
|
||||
log.saveError("Error", "IBAN is invalid");
|
||||
log.saveError("Error", Msg.getMsg(getCtx(), "InvalidIBAN"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class IBAN {
|
|||
{
|
||||
if (iban!=null)
|
||||
{
|
||||
return iban.trim().replace(" ", "") ;
|
||||
return iban.trim().replace(" ", "").toUpperCase() ;
|
||||
}
|
||||
return null ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue