String issueDateString =
CalendarUtil.toLocalDate(invoiceType.getIssueDate().getValue()).toString("yyyy-MM-dd");
if (issueDateString != null) {
sb.append(issueDateString);
}
IDType invoiceID = invoiceType.getID();
if (invoiceID != null) {
if (!sb.toString().isEmpty()) { // it means that the issue date is already appended
sb.append("_");
}
sb.append(invoiceID.getValue());
}
InvoiceCreationInput input = (InvoiceCreationInput)getInput();
sb.append(input.getInvoiceOutputFormat().getFileSuffix());
}
if (!sb.toString().isEmpty()) {