IDEMPIERE-1750:Restore M_ProductionPlan backward compatibility
This commit is contained in:
parent
7cbee09a69
commit
7d437aee54
|
@ -76,11 +76,23 @@ public class Doc_Production extends Doc
|
||||||
private DocLine[] loadLines(X_M_Production prod)
|
private DocLine[] loadLines(X_M_Production prod)
|
||||||
{
|
{
|
||||||
ArrayList<DocLine> list = new ArrayList<DocLine>();
|
ArrayList<DocLine> list = new ArrayList<DocLine>();
|
||||||
// Production
|
String sqlPL = null;
|
||||||
// -- ProductionLine - the real level
|
if (prod.isUseProductionPlan()){
|
||||||
String sqlPL = "SELECT * FROM M_ProductionLine pl "
|
// Production
|
||||||
+ "WHERE pl.M_Production_ID=? "
|
// -- ProductionLine - the real level
|
||||||
+ "ORDER BY pl.Line";
|
sqlPL = "SELECT * FROM "
|
||||||
|
+ " M_ProductionLine pro_line INNER JOIN M_ProductionPlan plan ON pro_line.M_ProductionPlan_id = plan.M_ProductionPlan_id "
|
||||||
|
+ " INNER JOIN M_Production pro ON pro.M_Production_id = plan.M_Production_id "
|
||||||
|
+ " WHERE pro.M_Production_ID=? "
|
||||||
|
+ " ORDER BY pro_line.Line";
|
||||||
|
}else{
|
||||||
|
// Production
|
||||||
|
// -- ProductionLine - the real level
|
||||||
|
sqlPL = "SELECT * FROM M_ProductionLine pl "
|
||||||
|
+ "WHERE pl.M_Production_ID=? "
|
||||||
|
+ "ORDER BY pl.Line";
|
||||||
|
}
|
||||||
|
|
||||||
PreparedStatement pstmtPL = null;
|
PreparedStatement pstmtPL = null;
|
||||||
ResultSet rsPL = null;
|
ResultSet rsPL = null;
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue