Skip to content

Commit

Permalink
Merge branch 'master' into bndtools
Browse files Browse the repository at this point in the history
  • Loading branch information
hengsin committed Oct 13, 2024
2 parents 8a71ff0 + 862ac00 commit 75967d8
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 3 deletions.
19 changes: 19 additions & 0 deletions migration/iD12/oracle/202410111608_IDEMPIERE-4297.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- IDEMPIERE-4297 - Add Status Line Dashboard Examples to GW
SELECT register_migration_script('202410111608_IDEMPIERE-4297.sql') FROM dual;

SET SQLBLANKLINES ON
SET DEFINE OFF

-- Oct 11, 2024, 4:08:54 PM CEST
UPDATE AD_StatusLine SET SQLStatement='SELECT COALESCE(SUM(grandtotal),0)
FROM rv_c_invoice
WHERE docstatus IN (''CO'',''CL'')
AND issotrx = ''Y''
AND ad_client_id = @#AD_Client_ID@
',Updated=TO_TIMESTAMP('2024-10-11 16:08:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_StatusLine_ID=200023
;

-- Oct 11, 2024, 4:09:16 PM CEST
UPDATE AD_Message SET MsgText='Total Sales: {0,number,currency}',Updated=TO_TIMESTAMP('2024-10-11 16:09:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200902
;

16 changes: 16 additions & 0 deletions migration/iD12/postgresql/202410111608_IDEMPIERE-4297.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- IDEMPIERE-4297 - Add Status Line Dashboard Examples to GW
SELECT register_migration_script('202410111608_IDEMPIERE-4297.sql') FROM dual;

-- Oct 11, 2024, 4:08:54 PM CEST
UPDATE AD_StatusLine SET SQLStatement='SELECT COALESCE(SUM(grandtotal),0)
FROM rv_c_invoice
WHERE docstatus IN (''CO'',''CL'')
AND issotrx = ''Y''
AND ad_client_id = @#AD_Client_ID@
',Updated=TO_TIMESTAMP('2024-10-11 16:08:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_StatusLine_ID=200023
;

-- Oct 11, 2024, 4:09:16 PM CEST
UPDATE AD_Message SET MsgText='Total Sales: {0,number,currency}',Updated=TO_TIMESTAMP('2024-10-11 16:09:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200902
;

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import org.adempiere.webui.window.WImageDialog;
import org.compiere.model.GridField;
import org.compiere.model.MImage;
import org.compiere.model.MSysConfig;
import org.compiere.util.CLogger;
import org.compiere.util.CacheMgt;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.zkoss.image.AImage;
Expand Down Expand Up @@ -158,6 +160,8 @@ public void setValue(Object value)
m_mImage = null;
AImage img = null;
getComponent().setContent(img);
getComponent().setWidth(null);
getComponent().setHeight(null);
return;
}
// Get/Create Image
Expand All @@ -175,6 +179,18 @@ public void setValue(Object value)
}
}
getComponent().setContent(img);
if (img != null)
{
String width = MSysConfig.getIntValue(MSysConfig.ZK_THUMBNAIL_IMAGE_WIDTH, 100, Env.getAD_Client_ID(Env.getCtx()))+"px";
String height = MSysConfig.getIntValue(MSysConfig.ZK_THUMBNAIL_IMAGE_HEIGHT, 100, Env.getAD_Client_ID(Env.getCtx()))+"px";
getComponent().setWidth(width);
getComponent().setHeight(height);
}
else
{
getComponent().setWidth(null);
getComponent().setHeight(null);
}
}

@Override
Expand Down Expand Up @@ -210,6 +226,7 @@ public void onEvent(Event event) throws Exception {
newValue = Integer.valueOf(AD_Image_ID);
//
m_mImage = null; // force reload
CacheMgt.get().reset(MImage.Table_Name, AD_Image_ID);
setValue(newValue); // set explicitly
//
ValueChangeEvent vce = new ValueChangeEvent(WImageEditor.this, gridField.getColumnName(), oldValue, newValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ private void init()
{
getComponent().setSrc(null);
getComponent().setSclass("image-field image-fit-contain");
getComponent().setWidth("100px");
getComponent().setHeight("100px");
}

@Override
Expand Down Expand Up @@ -163,7 +161,16 @@ public void setValue(Object value)
{
oldValue = null;
getComponent().setSrc(null);
return;
getComponent().setWidth(null);
getComponent().setHeight(null);
return;
}
else
{
String width = MSysConfig.getIntValue(MSysConfig.ZK_THUMBNAIL_IMAGE_WIDTH, 100, Env.getAD_Client_ID(Env.getCtx()))+"px";
String height = MSysConfig.getIntValue(MSysConfig.ZK_THUMBNAIL_IMAGE_HEIGHT, 100, Env.getAD_Client_ID(Env.getCtx()))+"px";
getComponent().setWidth(width);
getComponent().setHeight(height);
}
//
if (log.isLoggable(Level.FINE)) log.fine(value.toString());
Expand Down

0 comments on commit 75967d8

Please sign in to comment.