diff --git a/migration/iD10/oracle/202203041241_IDEMPIERE-1450.sql b/migration/iD10/oracle/202203041241_IDEMPIERE-1450.sql new file mode 100644 index 0000000000..5a314bd061 --- /dev/null +++ b/migration/iD10/oracle/202203041241_IDEMPIERE-1450.sql @@ -0,0 +1,18 @@ +-- IDEMPIERE-1450 Translation missing for Matching Purchase Order +SELECT register_migration_script('202203041241_IDEMPIERE-1450.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Mar 4, 2022, 12:41:42 PM CET +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','No posting if not matched to Shipment',0,0,'Y',TO_TIMESTAMP('2022-03-04 12:41:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-03-04 12:41:41','YYYY-MM-DD HH24:MI:SS'),100,200735,'NoPostingIfNotMatchedToShipment','D','ec8dce54-1223-4afe-a713-2f0521fbaa7d') +; + +-- Mar 4, 2022, 12:52:28 PM CET +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','Purchase Order not convertible - {0}',0,0,'Y',TO_TIMESTAMP('2022-03-04 12:52:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-03-04 12:52:28','YYYY-MM-DD HH24:MI:SS'),100,200736,'PurchaseOrderNotConvertible','D','41e7cf54-92cd-40fc-a83b-a9d7ccd61c8e') +; + +-- Mar 4, 2022, 12:58:26 PM CET +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','Failed to create reversal entry for ACCTTYPE_PPVOffset',0,0,'Y',TO_TIMESTAMP('2022-03-04 12:58:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-03-04 12:58:25','YYYY-MM-DD HH24:MI:SS'),100,200737,'FailedToCreateReversalEntryForACCTTYPE_PPVOffset','D','d21f4540-1966-44df-a1a6-56330dbf53b4') +; + diff --git a/migration/iD10/postgresql/202203041241_IDEMPIERE-1450.sql b/migration/iD10/postgresql/202203041241_IDEMPIERE-1450.sql new file mode 100644 index 0000000000..267686670e --- /dev/null +++ b/migration/iD10/postgresql/202203041241_IDEMPIERE-1450.sql @@ -0,0 +1,15 @@ +-- IDEMPIERE-1450 Translation missing for Matching Purchase Order +SELECT register_migration_script('202203041241_IDEMPIERE-1450.sql') FROM dual; + +-- Mar 4, 2022, 12:41:42 PM CET +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','No posting if not matched to Shipment',0,0,'Y',TO_TIMESTAMP('2022-03-04 12:41:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-03-04 12:41:41','YYYY-MM-DD HH24:MI:SS'),100,200735,'NoPostingIfNotMatchedToShipment','D','ec8dce54-1223-4afe-a713-2f0521fbaa7d') +; + +-- Mar 4, 2022, 12:52:28 PM CET +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','Purchase Order not convertible - {0}',0,0,'Y',TO_TIMESTAMP('2022-03-04 12:52:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-03-04 12:52:28','YYYY-MM-DD HH24:MI:SS'),100,200736,'PurchaseOrderNotConvertible','D','41e7cf54-92cd-40fc-a83b-a9d7ccd61c8e') +; + +-- Mar 4, 2022, 12:58:26 PM CET +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','Failed to create reversal entry for ACCTTYPE_PPVOffset',0,0,'Y',TO_TIMESTAMP('2022-03-04 12:58:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-03-04 12:58:25','YYYY-MM-DD HH24:MI:SS'),100,200737,'FailedToCreateReversalEntryForACCTTYPE_PPVOffset','D','d21f4540-1966-44df-a1a6-56330dbf53b4') +; + diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index 8fba5daa8f..5da6c9066f 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -47,6 +47,7 @@ import org.compiere.model.X_M_InOut; import org.compiere.process.DocAction; import org.compiere.util.DB; import org.compiere.util.Env; +import org.compiere.util.Msg; import org.compiere.util.Util; /** @@ -269,7 +270,7 @@ public class Doc_MatchPO extends Doc if (m_matchPO.getRef_MatchPO_ID() > 0) return facts; - p_Error = "No posting if not matched to Shipment"; + p_Error = Msg.getMsg(Env.getCtx(), "NoPostingIfNotMatchedToShipment"); return null; } @@ -321,7 +322,7 @@ public class Doc_MatchPO extends Doc m_oLine.getAD_Client_ID(), m_oLine.getAD_Org_ID()); if (rate == null) { - p_Error = "Purchase Order not convertible - " + as.getName(); + p_Error = Msg.getMsg(Env.getCtx(), "PurchaseOrderNotConvertible", new String[] {as.getName()}); return null; } amt = amt.multiply(rate); @@ -354,7 +355,7 @@ public class Doc_MatchPO extends Doc m_oLine.getAD_Client_ID(), m_oLine.getAD_Org_ID()); if (rate == null) { - p_Error = "Purchase Order not convertible - " + as.getName(); + p_Error = Msg.getMsg(Env.getCtx(), "PurchaseOrderNotConvertible", new String[] {as.getName()}); return null; } poCost = poCost.multiply(rate); @@ -399,8 +400,8 @@ public class Doc_MatchPO extends Doc FactLine dr = fact.createLine(null, getAccount(Doc.ACCTTYPE_PPVOffset, as), as.getC_Currency_ID(), Env.ONE); if (!dr.updateReverseLine(MMatchPO.Table_ID, m_matchPO.getM_MatchPO_ID(), 0, Env.ONE)) - { - p_Error = "Failed to create reversal entry for ACCTTYPE_PPVOffset"; + { + p_Error = Msg.getMsg(Env.getCtx(), "FailedToCreateReversalEntryForACCTTYPE_PPVOffset"); return null; } } @@ -416,8 +417,8 @@ public class Doc_MatchPO extends Doc costs = BigDecimal.ZERO; } else - { - p_Error = "Resubmit - No Costs for " + product.getName(); + { + p_Error = Msg.getMsg(Env.getCtx(), "Resubmit - No Costs for") + product.getName(); log.log(Level.SEVERE, p_Error); return null; }