IDEMPIERE-2392 Posted status incorrect when reposting on a period closed / add the case for draft orders

This commit is contained in:
Carlos Ruiz 2016-01-12 14:37:37 +01:00
parent 9e3d3ea03d
commit af9c479b91
1 changed files with 7 additions and 0 deletions

View File

@ -346,6 +346,13 @@ public class MPeriod extends X_C_Period
s_log.warning("Could not find C_DocType_ID (null or not Integer) for " + table.getTableName());
return true;
}
if (doctypeID == 0 && tableID == MOrder.Table_ID) {
idxdoctype = po.get_ColumnIndex("C_DocTypeTarget_ID");
objint = po.get_Value(idxdoctype);
if (objint != null && objint instanceof Integer) {
doctypeID = (Integer) objint;
}
}
MDocType dt = MDocType.get(ctx, doctypeID);
docBaseType = dt.getDocBaseType();
}