BF [ 1899477 ] MCash.getLines should return only active lines

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=1899477&group_id=176962
This commit is contained in:
teo_sarca 2009-02-06 14:21:09 +00:00
parent 3e26b0b633
commit 9fb64ab142
1 changed files with 7 additions and 6 deletions

View File

@ -45,6 +45,7 @@ import org.compiere.util.TimeUtil;
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>BF [ 1831997 ] Cash journal allocation reversed
* <li>BF [ 1894524 ] Pay an reversed invoice
* <li>BF [ 1899477 ] MCash.getLines should return only active lines
*/
public class MCash extends X_C_Cash implements DocAction
{
@ -212,12 +213,12 @@ public class MCash extends X_C_Cash implements DocAction
return m_lines;
}
String whereClause ="C_Cash_ID=?";
List <MCashLine> list = new Query(getCtx(), MCashLine.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{getC_Cash_ID()})
.setOrderBy("Line")
.list()
;
String whereClause =MCashLine.COLUMNNAME_C_Cash_ID+"=?";
List<MCashLine> list = new Query(getCtx(),MCashLine.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{getC_Cash_ID()})
.setOrderBy(MCashLine.COLUMNNAME_Line)
.setOnlyActiveRecords(true)
.list();
m_lines = list.toArray(new MCashLine[list.size()]);
return m_lines;