Skip to content

Commit

Permalink
Added voucher code in attendees data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Yeranosyan authored and Sergey Yeranosyan committed Dec 1, 2023
1 parent 8c837a0 commit 7dbb6c6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public ResponseEntity<String> rearrangeCategories(@PathVariable("eventName") Str
}

private static final String PAYMENT_METHOD = "Payment Method";
private static final List<String> FIXED_FIELDS = Arrays.asList("ID", "Category", "Event", "Status", "OriginalPrice", "PaidPrice", "Discount", "VAT", "ReservationID", "Full Name", "First Name", "Last Name", "E-Mail", "Locked", "Language", "Confirmation", "Billing Address", "Country Code", "Payment ID", PAYMENT_METHOD);
private static final List<String> FIXED_FIELDS = Arrays.asList("ID", "Category", "Event", "Status", "OriginalPrice", "PaidPrice", "Discount", "VAT", "ReservationID", "Full Name", "First Name", "Last Name", "E-Mail", "Locked", "Language", "Confirmation", "Billing Address", "Country Code", "Voucher Code", "Payment ID", PAYMENT_METHOD);
private static final List<SerializablePair<String, String>> FIXED_PAIRS = FIXED_FIELDS.stream().map(f -> SerializablePair.of(f, f)).toList();
private static final String FISCAL_CODE = "Fiscal Code";
private static final String REFERENCE_TYPE = "Reference Type";
Expand Down Expand Up @@ -415,6 +415,7 @@ private Stream<String[]> exportLines(String eventName, Principal principal, List
if(fields.contains("Confirmation")) {line.add(reservation.getConfirmationTimestamp().withZoneSameInstant(eventZoneId).toString());}
if(fields.contains("Billing Address")) {line.add(reservation.getBillingAddress());}
if(fields.contains("Country Code")) {line.add(reservation.getVatCountryCode());}
if(fields.contains("Voucher Code")) {line.add(trs.getPromoCode());}
boolean paymentIdRequested = fields.contains("Payment ID");
boolean paymentGatewayRequested = fields.contains(PAYMENT_METHOD);
if((paymentIdRequested || paymentGatewayRequested)) {
Expand Down

0 comments on commit 7dbb6c6

Please sign in to comment.