MPPOrderBOMLine: throw exception if using not supported component types

This commit is contained in:
teo_sarca 2008-09-01 14:26:09 +00:00
parent 7ecf75273a
commit 24fd729e47
1 changed files with 9 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MProduct;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -208,6 +209,10 @@ public class MPPOrderBOMLine extends X_PP_Order_BOMLine
{
this.setQtyRequiered(this.getQtyBOM());
}
else
{
throw new AdempiereException("@NotSupported@ @ComponentType@ "+this.getComponentType());
}
}
else
{
@ -224,6 +229,10 @@ public class MPPOrderBOMLine extends X_PP_Order_BOMLine
{
this.setQtyRequiered(this.getQtyBOM());
}
else
{
throw new AdempiereException("@NotSupported@ @ComponentType@ "+this.getComponentType());
}
}
// Set Scrap of Component