BF [1733602] - Price List including Tax Error

http://sourceforge.net/tracker/index.php?func=detail&aid=1733602&group_id=176962&atid=879332
Query only Active Records.
This commit is contained in:
trifonnt 2009-12-08 09:14:04 +00:00
parent 85ce8aa09d
commit bc3add14a7
1 changed files with 1 additions and 0 deletions

View File

@ -74,6 +74,7 @@ public class MTaxCategory extends X_C_TaxCategory
String whereClause = COLUMNNAME_C_TaxCategory_ID+"=? AND "+ COLUMNNAME_IsDefault+"='Y'"; String whereClause = COLUMNNAME_C_TaxCategory_ID+"=? AND "+ COLUMNNAME_IsDefault+"='Y'";
List<MTax> list = new Query(getCtx(), MTax.Table_Name, whereClause, get_TrxName()) List<MTax> list = new Query(getCtx(), MTax.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{getC_TaxCategory_ID()}) .setParameters(new Object[]{getC_TaxCategory_ID()})
.setOnlyActiveRecords(true)
.list(); .list();
if (list.size() == 0) { if (list.size() == 0) {
throw new AdempiereException("NoDefaultTaxRate"); // Error - should be at least one default throw new AdempiereException("NoDefaultTaxRate"); // Error - should be at least one default