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 +; + 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 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..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 @@ -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(); } 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");