WGraph.java edited for resolving ticket https://idempiere.atlassian.net/browse/IDEMPIERE-2332
This commit is contained in:
parent
000825464c
commit
f71dab3174
|
@ -15,6 +15,7 @@ package org.adempiere.webui.apps.graph;
|
||||||
|
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -33,7 +34,9 @@ import org.compiere.model.MLookupInfo;
|
||||||
import org.compiere.model.MMeasure;
|
import org.compiere.model.MMeasure;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
import org.zkoss.zhtml.A;
|
import org.zkoss.zhtml.A;
|
||||||
import org.zkoss.zhtml.Br;
|
import org.zkoss.zhtml.Br;
|
||||||
import org.zkoss.zhtml.Table;
|
import org.zkoss.zhtml.Table;
|
||||||
|
@ -98,6 +101,8 @@ public class WGraph extends Div implements IdSpace {
|
||||||
|
|
||||||
private String m_yAxisLabel;
|
private String m_yAxisLabel;
|
||||||
|
|
||||||
|
public DecimalFormat format = DisplayType.getNumberFormat(DisplayType.Amount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -393,14 +398,14 @@ public class WGraph extends Div implements IdSpace {
|
||||||
Td td = new Td();
|
Td td = new Td();
|
||||||
td.setSclass("pa-label");
|
td.setSclass("pa-label");
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
Text text = new Text("Target");
|
Text text = new Text(Msg.getElement(Env.getCtx(), "MeasureTarget"));
|
||||||
td.appendChild(text);
|
td.appendChild(text);
|
||||||
td = new Td();
|
td = new Td();
|
||||||
td.setDynamicProperty("colspan", "2");
|
td.setDynamicProperty("colspan", "2");
|
||||||
td.setSclass("pa-tdcontent");
|
td.setSclass("pa-tdcontent");
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
text = new Text(m_goal.getMeasureTarget().setScale(2,
|
text = new Text(format.format(m_goal.getMeasureTarget().setScale(2,
|
||||||
BigDecimal.ROUND_HALF_UP).toPlainString());
|
BigDecimal.ROUND_HALF_UP)));
|
||||||
td.appendChild(text);
|
td.appendChild(text);
|
||||||
|
|
||||||
tr = new Tr();
|
tr = new Tr();
|
||||||
|
@ -408,14 +413,14 @@ public class WGraph extends Div implements IdSpace {
|
||||||
td = new Td();
|
td = new Td();
|
||||||
td.setSclass("pa-label");
|
td.setSclass("pa-label");
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
text = new Text("Actual");
|
text = new Text(Msg.getElement(Env.getCtx(), "MeasureActual"));
|
||||||
td.appendChild(text);
|
td.appendChild(text);
|
||||||
td = new Td();
|
td = new Td();
|
||||||
td.setDynamicProperty("colspan", "2");
|
td.setDynamicProperty("colspan", "2");
|
||||||
td.setSclass("pa-tdcontent");
|
td.setSclass("pa-tdcontent");
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
text = new Text(m_goal.getMeasureActual().setScale(2,
|
text = new Text(format.format(m_goal.getMeasureActual().setScale(2,
|
||||||
BigDecimal.ROUND_HALF_UP).toPlainString());
|
BigDecimal.ROUND_HALF_UP)));
|
||||||
td.appendChild(text);
|
td.appendChild(text);
|
||||||
|
|
||||||
GraphColumn[] bList = getGraphColumnList();
|
GraphColumn[] bList = getGraphColumnList();
|
||||||
|
@ -466,11 +471,11 @@ public class WGraph extends Div implements IdSpace {
|
||||||
|
|
||||||
});
|
});
|
||||||
a.setDynamicProperty("href", "javascript:;");
|
a.setDynamicProperty("href", "javascript:;");
|
||||||
text = new Text(value.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
text = new Text(format.format(value.setScale(2, BigDecimal.ROUND_HALF_UP)));
|
||||||
a.appendChild(text);
|
a.appendChild(text);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
text = new Text(value.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
text = new Text(format.format(value.setScale(2, BigDecimal.ROUND_HALF_UP)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tr = new Tr();
|
tr = new Tr();
|
||||||
|
|
Loading…
Reference in New Issue