From e6aba812ebbd856743acb42cdb0c403789ec2612 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 20 Jun 2013 17:24:54 -0500 Subject: [PATCH 1/5] =?UTF-8?q?IDEMPIERE-1084=20Quote=20Convert=20?= =?UTF-8?q?=E2=80=93=20Conversion=20to=20to-many=20documents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oracle/201306201723_IDEMPIERE-1084.sql | 13 +++++++++++++ .../postgresql/201306201723_IDEMPIERE-1084.sql | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 migration/i1.0b-release/oracle/201306201723_IDEMPIERE-1084.sql create mode 100644 migration/i1.0b-release/postgresql/201306201723_IDEMPIERE-1084.sql diff --git a/migration/i1.0b-release/oracle/201306201723_IDEMPIERE-1084.sql b/migration/i1.0b-release/oracle/201306201723_IDEMPIERE-1084.sql new file mode 100644 index 0000000000..77a4271e9e --- /dev/null +++ b/migration/i1.0b-release/oracle/201306201723_IDEMPIERE-1084.sql @@ -0,0 +1,13 @@ +-- Jun 20, 2013 4:54:19 PM COT +-- IDEMPIERE-1084 Quote Convert - Conversion to to-many documents +INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Description,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,AD_Org_ID,IsActive,AD_Client_ID) VALUES ('C_DocType.DocBaseType=''SOO'' AND C_DocType.DocSubTypeSO NOT IN (''OB'',''ON'',''RM'')',200045,'D','C_DocType Quote Convert','Target Document Types for Quote Convert','S','82d2bc56-2dff-42af-bcfc-3a74f345e7b1',100,100,TO_DATE('2013-06-20 16:54:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-06-20 16:54:17','YYYY-MM-DD HH24:MI:SS'),0,'Y',0) +; + +-- Jun 20, 2013 4:54:26 PM COT +-- IDEMPIERE-1084 Quote Convert - Conversion to to-many documents +UPDATE AD_Process_Para SET AD_Val_Rule_ID=200045,Updated=TO_DATE('2013-06-20 16:54:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=375 +; + +SELECT register_migration_script('201306201723_IDEMPIERE-1084.sql') FROM dual +; + diff --git a/migration/i1.0b-release/postgresql/201306201723_IDEMPIERE-1084.sql b/migration/i1.0b-release/postgresql/201306201723_IDEMPIERE-1084.sql new file mode 100644 index 0000000000..6678a9d0d6 --- /dev/null +++ b/migration/i1.0b-release/postgresql/201306201723_IDEMPIERE-1084.sql @@ -0,0 +1,13 @@ +-- Jun 20, 2013 4:54:19 PM COT +-- IDEMPIERE-1084 Quote Convert - Conversion to to-many documents +INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Description,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,AD_Org_ID,IsActive,AD_Client_ID) VALUES ('C_DocType.DocBaseType=''SOO'' AND C_DocType.DocSubTypeSO NOT IN (''OB'',''ON'',''RM'')',200045,'D','C_DocType Quote Convert','Target Document Types for Quote Convert','S','82d2bc56-2dff-42af-bcfc-3a74f345e7b1',100,100,TO_TIMESTAMP('2013-06-20 16:54:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-06-20 16:54:17','YYYY-MM-DD HH24:MI:SS'),0,'Y',0) +; + +-- Jun 20, 2013 4:54:26 PM COT +-- IDEMPIERE-1084 Quote Convert - Conversion to to-many documents +UPDATE AD_Process_Para SET AD_Val_Rule_ID=200045,Updated=TO_TIMESTAMP('2013-06-20 16:54:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=375 +; + +SELECT register_migration_script('201306201723_IDEMPIERE-1084.sql') FROM dual +; + From 534f192b6d3d20c2c9fc991322daee0be4834588 Mon Sep 17 00:00:00 2001 From: "Hesham S. Ahmed" Date: Thu, 20 Jun 2013 17:54:25 -0500 Subject: [PATCH 2/5] IDEMPIERE-1082 Migration script fails on OS X due to non standard sed flag --- migration/migrate_postgresql.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/migrate_postgresql.sh b/migration/migrate_postgresql.sh index 0c6338a100..3a212556e2 100644 --- a/migration/migrate_postgresql.sh +++ b/migration/migrate_postgresql.sh @@ -28,7 +28,7 @@ do ls $DIR/postgresql/*.sql | while read file; do echo "SELECT '`basename "$file"`' AS Filename;" echo - cat "$file" | dos2unix | sed 's/commit[ ]*;//I' + cat "$file" | dos2unix | sed 's/[Cc][Oo][Mm][Mm][Ii][Tt][ ]*;//' echo echo done @@ -39,7 +39,7 @@ then ls $DIRINI/../processes_post_migration/postgresql/*.sql | while read file; do echo "SELECT '`basename $file`' AS Filename;" echo - cat $file | dos2unix | sed 's/commit[ ]*;//I' + cat $file | dos2unix | sed 's/[Cc][Oo][Mm][Mm][Ii][Tt][ ]*;//' echo echo done @@ -49,7 +49,7 @@ then ls $DIRINI/../my_processes_post_migration/postgresql/*.sql | while read file; do echo "SELECT '`basename "$file"`' AS Filename;" echo - cat "$file" | dos2unix | sed 's/commit[ ]*;//I' + cat "$file" | dos2unix | sed 's/[Cc][Oo][Mm][Mm][Ii][Tt][ ]*;//' echo echo done From 91adf94efbd1af6b6c66dec275d06d699ec7df8a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 20 Jun 2013 18:40:10 -0500 Subject: [PATCH 3/5] IDEMPIERE-1080 Wrong decimal presentation on Payment Allocation / based on patch from Richard Morales --- .../adempiere/webui/component/WListItemRenderer.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java index 6b0d0a3a06..200a4244ad 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListItemRenderer.java @@ -39,6 +39,7 @@ import org.compiere.minigrid.IDColumn; import org.compiere.model.MImage; import org.compiere.util.DisplayType; import org.compiere.util.Env; +import org.compiere.util.Language; import org.compiere.util.MSort; import org.compiere.util.Util; import org.zkoss.image.AImage; @@ -254,9 +255,11 @@ public class WListItemRenderer implements ListitemRenderer, EventListene } else { - DecimalFormat format = (field instanceof BigDecimal || field instanceof Double || field instanceof Float) - ? DisplayType.getNumberFormat(DisplayType.Amount, AEnv.getLanguage(Env.getCtx())) - : DisplayType.getNumberFormat(DisplayType.Integer, AEnv.getLanguage(Env.getCtx())); + Language lang = AEnv.getLanguage(Env.getCtx()); + int displayType = (field instanceof BigDecimal || field instanceof Double || field instanceof Float) + ? DisplayType.Amount + : DisplayType.Integer; + DecimalFormat format = DisplayType.getNumberFormat(displayType, lang); // set cell value to allow sorting listcell.setValue(field.toString()); @@ -264,6 +267,8 @@ public class WListItemRenderer implements ListitemRenderer, EventListene if (isCellEditable) { NumberBox numberbox = new NumberBox(false); + numberbox.getDecimalbox().setFormat(format.toPattern()); + numberbox.getDecimalbox().setLocale(lang.getLocale()); numberbox.setFormat(format); numberbox.setValue(field); // numberbox.setWidth("100px"); From c3533a5dd9241be97689c8247781e77d20280bf6 Mon Sep 17 00:00:00 2001 From: Richard Morales Date: Thu, 20 Jun 2013 19:36:37 -0500 Subject: [PATCH 4/5] IDEMPIERE-1081 Process Allocation processing wrongly against a charge --- .../src/org/adempiere/webui/apps/form/WAllocation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index 63fefa2b78..85e5390d95 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -447,7 +447,7 @@ public class WAllocation extends Allocation String name = e.getPropertyName(); Object value = e.getNewValue(); if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value); - if (value == null) + if (value == null && !name.equals("C_Charge_ID")) return; // Organization @@ -460,7 +460,7 @@ public class WAllocation extends Allocation // Charge else if (name.equals("C_Charge_ID") ) { - m_C_Charge_ID = ((Integer) value).intValue(); + m_C_Charge_ID = value!=null? ((Integer) value).intValue() : 0; setAllocateButton(); } From 830fb842fc38acdc3501cee1234c04d5551bef6d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 20 Jun 2013 19:37:36 -0500 Subject: [PATCH 5/5] IDEMPIERE-1081 Process Allocation processing wrongly against a charge / peer review --- .../WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index 85e5390d95..67cd41b7c6 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -348,7 +348,7 @@ public class WAllocation extends Allocation // Charge AD_Column_ID = 61804; // C_AllocationLine.C_Charge_ID MLookup lookupCharge = MLookupFactory.get (Env.getCtx(), form.getWindowNo(), 0, AD_Column_ID, DisplayType.TableDir); - chargePick = new WTableDirEditor("C_Charge_ID", true, false, true, lookupCharge); + chargePick = new WTableDirEditor("C_Charge_ID", false, false, true, lookupCharge); chargePick.setValue(new Integer(m_C_Charge_ID)); chargePick.addValueChangeListener(this); } // dynInit