Search in sources :

Example 1 with MDiscountSchema

use of org.compiere.model.MDiscountSchema in project adempiere by adempiere.

the class DiscountSchemaReSeq method doIt.

//	prepare
/**
	 * 	Execute
	 *	@return info
	 */
protected String doIt() throws Exception {
    log.info("M_DiscountSchema_ID=" + p_M_DiscountSchema_ID);
    if (p_M_DiscountSchema_ID == 0)
        throw new AdempiereUserError("@M_DiscountSchema_ID@ = 0");
    MDiscountSchema ds = new MDiscountSchema(getCtx(), p_M_DiscountSchema_ID, get_TrxName());
    if (ds.get_ID() == 0)
        throw new AdempiereUserError("@NotFound@ M_DiscountSchema_ID=" + p_M_DiscountSchema_ID);
    //
    int updated = ds.reSeq();
    return "@Updated@ #" + updated;
}
Also used : MDiscountSchema(org.compiere.model.MDiscountSchema) AdempiereUserError(org.compiere.util.AdempiereUserError)

Aggregations

MDiscountSchema (org.compiere.model.MDiscountSchema)1 AdempiereUserError (org.compiere.util.AdempiereUserError)1