Search in sources :

Example 1 with MYear

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

the class YearCreatePeriods method doIt.

//	prepare
/**
	 * 	Process
	 *	@return info
	 *	@throws Exception
	 */
protected String doIt() throws Exception {
    MYear year = new MYear(getCtx(), yearId, get_TrxName());
    if (yearId == 0 || year.get_ID() != yearId)
        throw new AdempiereUserError("@NotFound@: @C_Year_ID@ - " + yearId);
    log.info(year.toString());
    //
    if (year.createStdPeriods(null, getStartDate(), getDateFormat()))
        return "@OK@";
    return "@Error@";
}
Also used : AdempiereUserError(org.compiere.util.AdempiereUserError) MYear(org.compiere.model.MYear)

Aggregations

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