15 lines
617 B
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}-";
|
|
}
|
|
}
|
|
} |