Skip to content

Commit

Permalink
[PRDP-148] Cleaned code
Browse files Browse the repository at this point in the history
  • Loading branch information
svariant committed Oct 5, 2023
1 parent f70f531 commit a625b5f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ public boolean verifyAndUpdateReceipt(Receipt receipt, PdfGeneration pdfGenerati

private PdfMetadata generateAndSavePDFReceipt(BizEvent bizEvent, String templateSuffix, ReceiptPDFTemplate completeTemplate) {
try {
String dateFormatted = DateTimeFormatter.BASIC_ISO_DATE.format(LocalDate.now()).substring(2);
String blobName = TEMPLATE_PREFIX + "-" + dateFormatted + "-" + bizEvent.getId() + "-" + templateSuffix;
String dateFormatted = LocalDate.now().format(DateTimeFormatter.ofPattern("yyMMdd"));
String blobName = String.format("%s-%s-%s-%s", TEMPLATE_PREFIX, dateFormatted, bizEvent.getId(), templateSuffix);
PdfEngineResponse pdfEngineResponse = generatePdf(completeTemplate);
return saveToBlobStorage(pdfEngineResponse, blobName);
} catch (PDFReceiptGenerationException e) {
Expand Down

0 comments on commit a625b5f

Please sign in to comment.