[ 2804606 ] Introduce NoUOMConversion AD_Message
https://sourceforge.net/tracker/?func=detail&aid=2804606&group_id=176962&atid=879335
This commit is contained in:
parent
31504f36a8
commit
0289e55d97
|
@ -23,6 +23,7 @@ import org.compiere.util.Env;
|
|||
*/
|
||||
public class NoUOMConversionException extends AdempiereException
|
||||
{
|
||||
public static final String AD_Message = "NoUOMConversion";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -35,23 +36,26 @@ public class NoUOMConversionException extends AdempiereException
|
|||
|
||||
private static String buildMessage(int M_Product_ID, int C_UOM_ID, int C_UOM_To_ID)
|
||||
{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuffer sb = new StringBuffer("@"+AD_Message+"@ - ");
|
||||
//
|
||||
sb.append("@M_Product_ID@: ");
|
||||
sb.append("@M_Product_ID@:");
|
||||
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
|
||||
if (product != null)
|
||||
{
|
||||
sb.append(product.getValue()).append("_").append(product.getName());
|
||||
}
|
||||
//
|
||||
sb.append(" @C_UOM_ID@: ");
|
||||
MUOM uom = MUOM.get(Env.getCtx(), C_UOM_ID);
|
||||
if (uom != null)
|
||||
if (C_UOM_ID > 0 || product == null)
|
||||
{
|
||||
sb.append(uom.getUOMSymbol());
|
||||
sb.append(" @C_UOM_ID@:");
|
||||
MUOM uom = MUOM.get(Env.getCtx(), C_UOM_ID);
|
||||
if (uom != null)
|
||||
{
|
||||
sb.append(uom.getUOMSymbol());
|
||||
}
|
||||
}
|
||||
//
|
||||
sb.append(" @C_UOM_To_ID@: ");
|
||||
sb.append(" @C_UOM_To_ID@:");
|
||||
MUOM uomTo = MUOM.get(Env.getCtx(), C_UOM_To_ID);
|
||||
if (uomTo != null)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
-- 11.06.2009 08:43:54 EEST
|
||||
-- -
|
||||
INSERT INTO AD_Message (MsgType,MsgText,CreatedBy,IsActive,Created,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,EntityType,Value,AD_Message_ID) VALUES ('E','No UOM conversion found',0,'Y',TO_DATE('2009-06-11 08:43:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2009-06-11 08:43:49','YYYY-MM-DD HH24:MI:SS'),0,0,0,'D','NoUOMConversion',53081)
|
||||
;
|
||||
|
||||
-- 11.06.2009 08:43:55 EEST
|
||||
-- -
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53081 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- 11.06.2009 08:44:22 EEST
|
||||
-- -
|
||||
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='Nu s-a gasit regula de conversie intre unitatile de masura',Updated=TO_DATE('2009-06-11 08:44:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Message_ID=53081 AND AD_Language='ro_RO'
|
||||
;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
-- 11.06.2009 08:43:54 EEST
|
||||
-- -
|
||||
INSERT INTO AD_Message (MsgType,MsgText,CreatedBy,IsActive,Created,Updated,UpdatedBy,AD_Client_ID,AD_Org_ID,EntityType,Value,AD_Message_ID) VALUES ('E','No UOM conversion found',0,'Y',TO_TIMESTAMP('2009-06-11 08:43:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2009-06-11 08:43:49','YYYY-MM-DD HH24:MI:SS'),0,0,0,'D','NoUOMConversion',53081)
|
||||
;
|
||||
|
||||
-- 11.06.2009 08:43:55 EEST
|
||||
-- -
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53081 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID)
|
||||
;
|
||||
|
||||
-- 11.06.2009 08:44:22 EEST
|
||||
-- -
|
||||
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='Nu s-a gasit regula de conversie intre unitatile de masura',Updated=TO_TIMESTAMP('2009-06-11 08:44:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Message_ID=53081 AND AD_Language='ro_RO'
|
||||
;
|
||||
|
Loading…
Reference in New Issue