Files
d.velop/Optima/_Groovy/dbsCaseContractHooks_prefixGen.groovy

15 lines
617 B
Groovy

public class dbsCaseContractHooks_prefixGen {
/* ########################################################################################
* ################### The functions below may be edited by customers #####################
* ########################################################################################
*/
public String generateContractNumberPrefix(String configuredPrefix) {
int year = Calendar.getInstance().get( Calendar.YEAR);
if ( configuredPrefix == null || configuredPrefix == ""){
return "${year}-";
} else {
return "${configuredPrefix}-${year}-";
}
}
}