Fixed bug dealing with outputing a printformat for a process when AD_PrintFormat_ID was 0.
This commit is contained in:
parent
5320ff73a8
commit
412aadbb28
|
@ -997,43 +997,46 @@ public class PackOut extends SvrProcess
|
||||||
{}
|
{}
|
||||||
pstmtP = null;
|
pstmtP = null;
|
||||||
}
|
}
|
||||||
|
if(m_Process.getAD_PrintFormat_ID() != 0) {
|
||||||
|
|
||||||
m_Printformat = new X_AD_PrintFormat (getCtx(), m_Process.getAD_PrintFormat_ID(), null);
|
m_Printformat = new X_AD_PrintFormat (getCtx(), m_Process.getAD_PrintFormat_ID(), null);
|
||||||
atts = createPrintformatBinding(atts,m_Printformat);
|
atts = createPrintformatBinding(atts,m_Printformat);
|
||||||
hd_menu.startElement("","","printformat",atts);
|
hd_menu.startElement("","","printformat",atts);
|
||||||
|
|
||||||
String sql2 = "SELECT * FROM AD_PrintFormatItem WHERE AD_PrintFormat_ID= " + rs1.getInt("AD_Printformat_ID");
|
String sql2 = "SELECT * FROM AD_PrintFormatItem WHERE AD_PrintFormat_ID= " + rs1.getInt("AD_Printformat_ID");
|
||||||
PreparedStatement pstmt2 = null;
|
PreparedStatement pstmt2 = null;
|
||||||
pstmt2 = DB.prepareStatement (sql2, get_TrxName());
|
pstmt2 = DB.prepareStatement (sql2, get_TrxName());
|
||||||
try {
|
try {
|
||||||
ResultSet rs2 = pstmt2.executeQuery();
|
ResultSet rs2 = pstmt2.executeQuery();
|
||||||
while (rs2.next())
|
while (rs2.next())
|
||||||
{
|
{
|
||||||
m_PrintFormatItem = new X_AD_PrintFormatItem (getCtx(), rs2.getInt("AD_PrintFormatItem_ID"), null);
|
m_PrintFormatItem = new X_AD_PrintFormatItem (getCtx(), rs2.getInt("AD_PrintFormatItem_ID"), null);
|
||||||
atts = createPrintformatItemBinding(atts,m_PrintFormatItem);
|
atts = createPrintformatItemBinding(atts,m_PrintFormatItem);
|
||||||
hd_menu.startElement("","","printformatitem",atts);
|
hd_menu.startElement("","","printformatitem",atts);
|
||||||
hd_menu.endElement("","","printformatitem");
|
hd_menu.endElement("","","printformatitem");
|
||||||
}
|
}
|
||||||
rs2.close();
|
rs2.close();
|
||||||
pstmt2.close();
|
pstmt2.close();
|
||||||
pstmt2 = null;
|
pstmt2 = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
log.log(Level.SEVERE,"printformatitem", e);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (pstmt2 != null)
|
|
||||||
pstmt2.close ();
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{}
|
{
|
||||||
pstmt2 = null;
|
log.log(Level.SEVERE,"printformatitem", e);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (pstmt2 != null)
|
||||||
|
pstmt2.close ();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{}
|
||||||
|
pstmt2 = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
hd_menu.endElement("","","process");
|
hd_menu.endElement("","","process");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue