Merge 3f4ce3cb1cb3
This commit is contained in:
commit
efa49af7fa
|
@ -61,7 +61,7 @@ public class MPrintFormat extends X_AD_PrintFormat
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8307496567084341384L;
|
||||
private static final long serialVersionUID = -1378114118642378625L;
|
||||
|
||||
/**
|
||||
* Public Constructor.
|
||||
|
@ -803,17 +803,27 @@ public class MPrintFormat extends X_AD_PrintFormat
|
|||
return pf;
|
||||
} // createFromReportView
|
||||
|
||||
private static void setUniqueName(int AD_Client_ID, MPrintFormat pf, String basename) {
|
||||
public static void setUniqueName(int AD_Client_ID, MPrintFormat pf, String basename) {
|
||||
String name = basename;
|
||||
pf.setName(name);
|
||||
boolean dateAsSuffix = true;
|
||||
boolean sleep = false;
|
||||
while (exists(AD_Client_ID, name)) {
|
||||
while (exists(AD_Client_ID, pf.getName())) {
|
||||
if (sleep)
|
||||
Env.sleep(1); // wait 1 sec to get next second in datetime
|
||||
else
|
||||
sleep = true;
|
||||
if (dateAsSuffix) {
|
||||
name = basename + "_" + getDateTime();
|
||||
} else {
|
||||
name = getDateTime() + "_" + basename;
|
||||
}
|
||||
pf.setName(name);
|
||||
if (sleep && !name.equals(pf.getName())) {
|
||||
// there has been already one iteration and the name is being truncated
|
||||
// change method to put date as prefix
|
||||
dateAsSuffix = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1029,8 +1039,8 @@ public class MPrintFormat extends X_AD_PrintFormat
|
|||
// Set Name - Remove TEMPLATE - add copy
|
||||
to.setName(Util.replace(to.getName(), "TEMPLATE", String.valueOf(to_Client_ID)));
|
||||
to.setName(to.getName()
|
||||
+ " - " + Util.cleanAmp(Msg.getMsg(ctx, "Copy"))
|
||||
+ " " + getDateTime()); // unique name
|
||||
+ " - " + Util.cleanAmp(Msg.getMsg(ctx, "Copy")));
|
||||
setUniqueName(to.getAD_Client_ID(), to, to.getName());
|
||||
//
|
||||
to.saveEx();
|
||||
|
||||
|
|
|
@ -1473,8 +1473,10 @@ public class FinReport extends SvrProcess
|
|||
pf = MPrintFormat.get (getCtx(), AD_PrintFormat_ID, false); // use Cache
|
||||
|
||||
// Print Format Sync
|
||||
if (!m_report.getName().equals(pf.getName()))
|
||||
if (!m_report.getName().equals(pf.getName())) {
|
||||
pf.setName(m_report.getName());
|
||||
MPrintFormat.setUniqueName(pf.getAD_Client_ID(), pf, pf.getName());
|
||||
}
|
||||
if (m_report.getDescription() == null)
|
||||
{
|
||||
if (pf.getDescription () != null)
|
||||
|
|
|
@ -516,6 +516,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
|
|||
}
|
||||
|
||||
public void copyFormat(){
|
||||
pfi.clear();
|
||||
MPrintFormat newpf=MPrintFormat.copyToClient(m_ctx, m_reportEngine.getPrintFormat().get_ID() ,Env.getAD_Client_ID(m_ctx));
|
||||
|
||||
for (MPrintFormatItem item : newpf.getAllItems("IsPrinted DESC, NULLIF(SeqNo,0), Name"))
|
||||
|
|
|
@ -204,7 +204,7 @@ public class NumberBox extends Div
|
|||
decimalBox.setId(decimalBox.getUuid());
|
||||
txtCalc.setId(txtCalc.getUuid());
|
||||
|
||||
txtCalc.setWidgetListener("onKeyPress", "return calc.validate('" +
|
||||
txtCalc.setWidgetListener("onKeyUp", "return calc.validate('" +
|
||||
decimalBox.getId() + "','" + txtCalc.getId()
|
||||
+ "'," + integral + "," + (int)separatorChar + ", event);");
|
||||
txtCalc.setMaxlength(250);
|
||||
|
|
|
@ -532,7 +532,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
} else{
|
||||
uc = new MTabCustomization(Env.getCtx(), 0, null);
|
||||
uc.setAD_Tab_ID(m_AD_Tab_ID);
|
||||
uc.setAD_User_ID(m_AD_User_ID);
|
||||
uc.set_ValueOfColumn("AD_User_ID", m_AD_User_ID);
|
||||
uc.setCustom(custom.toString());
|
||||
}
|
||||
if (uc.getCustom() == null || uc.getCustom().trim().length() == 0)
|
||||
|
|
|
@ -18,7 +18,7 @@ function Calc()
|
|||
|
||||
if(key == 13 || key == 61) // Enter, =
|
||||
{
|
||||
evaluate(displayTextId, calcTextId);
|
||||
evaluate(displayTextId, calcTextId, String.fromCharCode(separatorKey));
|
||||
return false;
|
||||
}
|
||||
else if (key == 0) // control, delete, ...
|
||||
|
|
Loading…
Reference in New Issue