diff --git a/migration/i2.0/oracle/201403242011_IDEMPIERE-1852.sql b/migration/i2.0/oracle/201403242011_IDEMPIERE-1852.sql new file mode 100644 index 0000000000..b946502b18 --- /dev/null +++ b/migration/i2.0/oracle/201403242011_IDEMPIERE-1852.sql @@ -0,0 +1,19 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Mar 24, 2014 8:09:18 PM COT +-- IDEMPIERE-1852 Translation: Accounting Fact Reconcilation (manual) +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('I','DR',200260,'D','40c2b5df-fe62-4d94-9376-fa82bfe99969','DR','Y',TO_DATE('2014-03-24 20:09:17','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2014-03-24 20:09:17','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Mar 24, 2014 8:09:35 PM COT +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('I','CR',200261,'D','c4c434ec-7516-46c0-ad29-122c2b871b04','CR','Y',TO_DATE('2014-03-24 20:09:35','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2014-03-24 20:09:35','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Mar 24, 2014 8:10:25 PM COT +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('I','DR/CR',200262,'D','41ceddd4-a1d0-4387-8d64-f10391a9badf','DR/CR','Y',TO_DATE('2014-03-24 20:10:24','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2014-03-24 20:10:24','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +SELECT register_migration_script('201403242011_IDEMPIERE-1852.sql') FROM dual +; + diff --git a/migration/i2.0/postgresql/201403242011_IDEMPIERE-1852.sql b/migration/i2.0/postgresql/201403242011_IDEMPIERE-1852.sql new file mode 100644 index 0000000000..6be9934eb1 --- /dev/null +++ b/migration/i2.0/postgresql/201403242011_IDEMPIERE-1852.sql @@ -0,0 +1,16 @@ +-- Mar 24, 2014 8:09:18 PM COT +-- IDEMPIERE-1852 Translation: Accounting Fact Reconcilation (manual) +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('I','DR',200260,'D','40c2b5df-fe62-4d94-9376-fa82bfe99969','DR','Y',TO_TIMESTAMP('2014-03-24 20:09:17','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2014-03-24 20:09:17','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Mar 24, 2014 8:09:35 PM COT +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('I','CR',200261,'D','c4c434ec-7516-46c0-ad29-122c2b871b04','CR','Y',TO_TIMESTAMP('2014-03-24 20:09:35','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2014-03-24 20:09:35','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Mar 24, 2014 8:10:25 PM COT +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,Created,AD_Client_ID,AD_Org_ID) VALUES ('I','DR/CR',200262,'D','41ceddd4-a1d0-4387-8d64-f10391a9badf','DR/CR','Y',TO_TIMESTAMP('2014-03-24 20:10:24','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2014-03-24 20:10:24','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +SELECT register_migration_script('201403242011_IDEMPIERE-1852.sql') FROM dual +; + diff --git a/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java b/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java index 4eb1bbf4ce..a07b3f11ee 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/FactReconcile.java @@ -55,8 +55,8 @@ public class FactReconcile { Vector columnNames = new Vector(); columnNames.add(Msg.translate(Env.getCtx(), "Amt")); //columnNames.add(Msg.translate(Env.getCtx(), "AmtAcct")); - columnNames.add("DR/CR"); - columnNames.add("Fact Acct"); + columnNames.add(Msg.translate(Env.getCtx(), "DR/CR")); + columnNames.add(Msg.translate(Env.getCtx(), "Selected")); columnNames.add(Msg.translate(Env.getCtx(), "C_BPartner_ID")); columnNames.add(Msg.translate(Env.getCtx(), "DateAcct")); columnNames.add(Msg.translate(Env.getCtx(), "GL_Category_ID")); @@ -74,16 +74,20 @@ public class FactReconcile { Vector> data = new Vector>(); - StringBuilder sql = new StringBuilder("SELECT abs(fa.amtacctdr-fa.amtacctcr), (fa.amtacctdr-fa.amtacctcr)," // 1-2 - + " (CASE WHEN (fa.amtacctdr-fa.amtacctcr) < 0 THEN 'CR' ELSE 'DR' END), fa.Fact_Acct_ID, bp.name, DateAcct," - + " glc.name, p.name, Qty, fa.Description, r.MatchCode, fa.DateTrx, o.value" - + " FROM Fact_Acct fa" - + " LEFT OUTER JOIN Fact_Reconciliation r ON (fa.Fact_Acct_ID=r.Fact_Acct_ID)" - + " LEFT OUTER JOIN C_BPartner bp ON (fa.C_BPartner_ID=bp.C_BPartner_ID)" - + " LEFT OUTER JOIN AD_Org o ON (o.AD_Org_ID=fa.AD_Org_ID)" - + " LEFT OUTER JOIN M_Product p ON (p.M_Product_ID=fa.M_Product_ID)" - + " LEFT OUTER JOIN GL_Category glc ON (fa.GL_Category_ID=glc.GL_Category_ID)" - + " WHERE fa.AD_Client_ID=?"); + StringBuilder sql = new StringBuilder("SELECT abs(fa.amtacctdr-fa.amtacctcr), (fa.amtacctdr-fa.amtacctcr),") // 1-2 + .append(" (CASE WHEN (fa.amtacctdr-fa.amtacctcr) < 0 THEN ") + .append(DB.TO_STRING(Msg.translate(Env.getCtx(), "CR"))) + .append(" ELSE ") + .append(DB.TO_STRING(Msg.translate(Env.getCtx(), "DR"))) + .append(" END), fa.Fact_Acct_ID, bp.name, DateAcct,") + .append(" glc.name, p.name, Qty, fa.Description, r.MatchCode, fa.DateTrx, o.value") + .append(" FROM Fact_Acct fa") + .append(" LEFT OUTER JOIN Fact_Reconciliation r ON (fa.Fact_Acct_ID=r.Fact_Acct_ID)") + .append(" LEFT OUTER JOIN C_BPartner bp ON (fa.C_BPartner_ID=bp.C_BPartner_ID)") + .append(" LEFT OUTER JOIN AD_Org o ON (o.AD_Org_ID=fa.AD_Org_ID)") + .append(" LEFT OUTER JOIN M_Product p ON (p.M_Product_ID=fa.M_Product_ID)") + .append(" LEFT OUTER JOIN GL_Category glc ON (fa.GL_Category_ID=glc.GL_Category_ID)") + .append(" WHERE fa.AD_Client_ID=?"); // role security sql = new StringBuilder( MRole.getDefault(Env.getCtx(), false).addAccessSQL( sql.toString(), "fa", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO ) );