SAS
BOOKING COMPLETED
Booking reference $bookingReference
#foreach($connection in $connections)
#foreach($segment in $connection.segments) #if($connection.origin.code ==$segment.departureAirport.code) $dateTime.format($segment.departureDateTimeInLocal, "dd MMMM yyyy") #end #end #foreach($segment in $connection.segments) #if($connection.origin.code ==$segment.departureAirport.code) $segment.departureCity.name $connection.origin.code #end #end #foreach($segment in $connection.segments) #if($connection.destination.code ==$segment.arrivalAirport.code) $segment.arrivalCity.name #end #end $connection.destination.code
#end
#set($paymentDetails ="") #set($paymentMethod = $paymentInfo) #if($paymentMethod.type == "CC") #set($cardTypeName = "") #if($paymentMethod.creditCardDetails.creditCardType == "CA")#set($cardTypeName = "Master card")#end #if($paymentMethod.creditCardDetails.creditCardType == "AX")#set($cardTypeName = "Amex")#end #if($paymentMethod.creditCardDetails.creditCardType == "VI")#set($cardTypeName = "Visa")#end #if($paymentMethod.creditCardDetails.creditCardType == "DC")#set($cardTypeName = "Diners Club")#end #if($paymentMethod.creditCardDetails.creditCardType == "DS")#set($cardTypeName = "Discover")#end #if($paymentMethod.creditCardDetails.creditCardType == "TP")#set($cardTypeName = "Airplus")#end #if($paymentMethod.creditCardDetails.creditCardType == "TO")#set($cardTypeName = "Maestro")#end #if($paymentMethod.creditCardDetails.creditCardType == "VE")#set($cardTypeName = "Visa Elektron")#end #if($paymentMethod.creditCardDetails.creditCardType == "DK")#set($cardTypeName = "Dankort")#end #if($paymentMethod.creditCardDetails.creditCardType == "JC")#set($cardTypeName = "JCB")#end #set($paymentDetails = "$cardTypeName ending in **** $stringUtils.substring($paymentMethod.creditCardDetails.accountNumber, 12, 16) ") #end #if($paymentMethod.type.getName() == "INST") #set($paymentDetails = "your Klarna Account") #end #if($paymentMethod.type.getName() == "PAYPAL") #set($paymentDetails = "your Paypal Account") #end #if($paymentMethod.type.getName() == "IB") #set($paymentDetails = "your Internet Banking Account") #end #if($paymentMethod.type.getName() == "ACC") #set($paymentDetails = "your SasCredits Account") #end #end #end #set($insurancePolicyNumber ="") #set($isInsuranceAvailable = "") #foreach($insurance in $insuranceProducts) #set($isInsuranceAvailable = "true") #set($insurancePolicyNumber =$insurance.policyNumber) #end #if($isInsuranceAvailable !="") #end

YOUR ITINERARY

#foreach($connection in $connections) #foreach($segment in $connection.segments) #if($connection.origin.code ==$segment.departureAirport.code) #set($departureDateTime =$dateTime.format($segment.departureDateTimeInLocal, "dd MMMM yyyy")) #end #end #foreach($segment in $connection.segments) #if($connection.origin.code == $segment.departureAirport.code) #end #foreach($viaValue in $connection.via) #if($viaValue.code == $segment.arrivalAirport.code) #end #end #if($connection.destination.code == $segment.arrivalAirport.code) #end #end #set($baseAllowance = 0) #set($boughtAllowance = 0) #set($extraAllowance = 0) #set($maxWeightInKgs = 0) #set($Integer = 0) #foreach($passenger in $passengers) #if($passenger.baggageAllowanceInformation) #foreach($baggageAllowance in $passenger.baggageAllowanceInformation) #if($connection.id == $baggageAllowance.connectionId) #set($baseAllowance = $baseAllowance + $Integer.parseInt($baggageAllowance.baseAllowance)) #set($boughtAllowance = $boughtAllowance + $baggageAllowance.boughtAllowance) #set($extraAllowance = $extraAllowance + $baggageAllowance.extraAllowance) #set($maxWeightInKgs = $baggageAllowance.maxWeightInKgs) #end #end #end #end #set($extraBags = "") #if($baseAllowance > 0) #set($extraBags = "${baseAllowance} extra bags purchased") #end #if($boughtAllowance > 0) #set($extraBags = "${extraBags} + ${boughtAllowance} bags free baggage allowance") #end #if($extraAllowance > 0) #set($extraBags = "${extraBags} + ${extraAllowance} bags tier level allowance") #end #if($maxWeightInKgs > 0) #set($extraBags = "${extraBags} (${maxWeightInKgs})kg max") #end

$connection.boundType

$departureDateTime - #foreach($segment in $connection.segments) #if($connection.origin.code == $segment.departureAirport.code) $segment.departureCity.name #end #end $connection.origin.code #foreach($segment in $connection.segments) #if($connection.destination.code == $segment.arrivalAirport.code) $segment.arrivalCity.name #end #end $connection.destination.code
Departure $segment.departureCity.name $segment.departureAirport.code Terminal $segment.departureTerminal $dateTime.format($segment.departureDateTimeInLocal, "EEE, dd MMMM yyyy") $stringUtils.substring($segment.departureDateTimeInLocal, 11, 16) $dateTime.formatDuration($segment.duration) $segment.marketingCarrier.code $segment.flightNumber Operated by $segment.marketingCarrier.name $segment.aircraft.name #foreach($fare in $connection.fares) #if($segment.id == $fare.segmentId) Booking Class $fare.bookingClass #end #end $connection.productName
#set($seatNumbers ="") #set($isAncillaryAvailable="") #set($isBagAvailable="") #foreach($passenger in $passengers) #if($passenger.baggageAllowanceInformation) #set($isBagAvailable="true") #end #end #if($ancillaryProducts) #foreach($ancillaryProduct in $ancillaryProducts) #if( $ancillaryProduct.associatedSegment == $segment.id) #if($ancillaryProduct.seatNumber) #set($seatNumbers = "${seatNumbers} ${ancillaryProduct.seatNumber}") #end #end #end #end #if($seatNumbers != "" ) #end #if($seatNumbers != "") $seatNumbers #end
Layover $segment.arrivalCity.name $segment.arrivalAirport.code Terminal $segment.arrivalTerminal $dateTime.format($segment.arrivalDateTimeInLocal, "EEE, dd MMMM yyyy") $dateTime.format($segment.arrivalDateTimeInLocal, "HH:mm") - $dateTime.plusDuration($segment.arrivalDateTimeInLocal, "HH:mm", $viaValue.haltDuration) $dateTime.format($viaValue.haltDuration)
Arrival $segment.arrivalCity.name $segment.arrivalAirport.code Terminal $segment.arrivalTerminal $dateTime.format($segment.arrivalDateTimeInLocal, "EEE, dd MMMM yyyy") $stringUtils.substring($segment.arrivalDateTimeInLocal, 11, 16) $dateTime.formatDuration($segment.duration) $segment.marketingCarrier.code $segment.flightNumber Operated by $segment.marketingCarrier.name $segment.aircraft.name #foreach($fare in $connection.fares) #if($segment.id == $fare.segmentId) Booking Class $fare.bookingClass #end #end $connection.productName
#set($isBagAvailable="") #set($seatNumbers ="") #foreach($passenger in $passengers) #if($passenger.baggageAllowanceInformation) #set($isBagAvailable="true") #end #end #if($ancillaryProducts) #foreach($ancillaryProduct in $ancillaryProducts) #if( $ancillaryProduct.associatedSegment == $segment.id) #if($ancillaryProduct.seatNumber) #set($seatNumbers = "${seatNumbers} ${ancillaryProduct.seatNumber}") #end #end #end #end #if($seatNumbers != "" ) #end #if($seatNumbers != "") $seatNumbers #end
#set($ancillaryUrl ="${addBags}") #set($lastName ="${passengers[0].identityInformation.lastName}") #set($ancillaryUrl = $ancillaryUrl.replace("lastName","${lastName}").replace("bookingReference","${bookingReference}")) Reserve a seat, add a meal or baggage
#end
#foreach($passenger in $passengers) #set($primaryEmail = "") #if($passenger.identityInformation.lastName) #set($lastName =$passenger.identityInformation.lastName) #end #if($passenger.identityInformation.dateOfBirth) #set($dateOfBirth =$dateTime.format($passenger.identityInformation.dateOfBirth, "yyyy-MM-dd")) #end #if($passenger.contactInformation.email) #set($email =$passenger.contactInformation.email) #end #if($passenger.contactInformation) #set($mobile = "${passenger.contactInformation.mobile.contactNumber}") #end #set($extraBags = "") #set($baseAllowance = 0) #set($boughtAllowance = 0) #set($extraAllowance = 0) #set($maxWeightInKgs = 0) #set($Integer = 0) #if($passenger.baggageAllowanceInformation) #foreach($baggageAllowance in $passenger.baggageAllowanceInformation) #set($baseAllowance = $baseAllowance + $Integer.parseInt($baggageAllowance.baseAllowance)) #set($boughtAllowance = $boughtAllowance + $baggageAllowance.boughtAllowance) #set($extraAllowance = $extraAllowance + $baggageAllowance.extraAllowance) #set($maxWeightInKgs = $baggageAllowance.maxWeightInKgs) #end #end #if($baseAllowance > 0) #set($extraBags = "${boughtAllowance} bags") #end #if($maxWeightInKgs > 0) #set($extraBags = "${extraBags} (${maxWeightInKgs}kg)") #end
#if($velocityCount==1 && $passenger.isPrimary) #set($passengerType = "PRIMARY TRAVELER") #else #set($passengerType = "TRAVELER $velocityCount ($passenger.type)") #end

$passengerType

#set($firstName ="") #set($middleName ="") #set($lastName ="") #set($email ="") #set($dateOfBirth ="") #set($mobile = "") #if($passenger.identityInformation.middleName) #set($middleName =$passenger.identityInformation.middleName) #end #if($passenger.identityInformation.firstName) #set($firstName =$passenger.identityInformation.firstName) First and middle name $firstName $middleName #end Last name $lastName Date of birth $dateOfBirth Email address $email
Mobile number $mobile Passport nr. EuroBonus nr. #set($ebNumber ="") #if($passenger.identityInformation.loyaltyInformation) #set($ebNumber =$passenger.identityInformation.loyaltyInformation[0].frequentFlyerNumber) #end #set($ebUrl = $ebNumberRegisterUrl) #if($ebNumber !="") $ebNumber #else Add EuroBonus no. or sign up #end Baggage allowance #if($extraBags !="") incl. $extraBags #end
#end
#set($departureCode = "") #set($arrivalCode = "") #set($departureDate = "") #set($arrivalDate = "") #set($isRoundTrip = "") #foreach($connection in $connections) #if($connection.boundType=="OutBound") #set($departureCode = $connection.origin.code) #set($arrivalCode = $connection.destination.code) #foreach($segment in $connection.segments) #if($connection.origin.code ==$segment.departureAirport.code) #set($departureDate = $dateTime.format($segment.departureDateTimeInLocal, 'dd MMM')) #end #end #end #if($connection.boundType=="Inbound") #set($isRoundTrip = "true") #foreach($segment in $connection.segments) #if($connection.destination.code ==$segment.arrivalAirport.code) #set($arrivalDate = $dateTime.format($segment.arrivalDateTimeInLocal, 'dd MMM')) #end #end #if($arrivalCode != $connection.origin.code) #set($arrivalCode = "${arrivalCode} / ${connection.origin.code} - ${connection.destination.code}") #end #end #end #if($isRoundTrip != "") #end
#set ($travellers = "") #set ($adultCount = 0) #set ($youthCount = 0) #set ($childCount = 0) #set ($infantCount = 0)

SUMMARY OF PRICE OF FLIGHTS AND EXTRAS

#foreach($connection in $connections)
#if($connection.boundType == "OutBound") #end #if($connection.boundType =="Inbound") #end $connection.origin.code - $connection.destination.code $connection.productName #foreach($segment in $connection.segments) #if($connection.origin.code == $segment.departureAirport.code) $stringUtils.substring($segment.departureDateTimeInLocal, 11, 16) - #end #if($connection.destination.code == $segment.arrivalAirport.code) $stringUtils.substring($segment.arrivalDateTimeInLocal, 11, 16) #end #end
#end
#set($seatTotalCount = 0) #set($bagTotalCount = 0) #set($calculatedpassengerCount =0) #foreach($passenger in $passengers) #set ($calculatedpassengerCount= $calculatedpassengerCount + 1) #end #set($passengerCount =0) #foreach($passenger in $passengers) #set ($passengerCount= $passengerCount + 1) #set($firstName ="") #set($middleName ="") #set($lastName ="") #set($email ="") #set($dateOfBirth ="") #set($mobile = "") #if($passenger.identityInformation.firstName) #set($firstName =$passenger.identityInformation.firstName) #end #if($passenger.identityInformation.middleName) #set($middleName =$passenger.identityInformation.middleName) #end #if($passenger.identityInformation.lastName) #set($lastName =$passenger.identityInformation.lastName) #end #if($passenger.contactInformation.email) #set($email =$passenger.contactInformation.email) #end #if($passenger.identityInformation.dateOfBirth) #set($dateOfBirth =$passenger.identityInformation.dateOfBirth) #end #if($passenger.contactInformation) #set($mobile = "${passenger.contactInformation.mobile.overseasCode} ${passenger.contactInformation.mobile.areaCode} ${passenger.contactInformation.mobile.contactNumber}") #end #if($passenger.type == "ADT") #set ($adultCount = $adultCount + 1) #end #if($passenger.type == "YTH") #set ($youthCount = $youthCount + 1) #end #if($passenger.type == "CHD") #set ($childCount = $childCount + 1) #end #if($passenger.type == "INF") #set ($infantCount = $infantCount + 1) #end #foreach($pricePerPassengers in $price.pricePerPassenger) #if($pricePerPassengers.passengerId == $passenger.id && $pricePerPassengers.type == $passenger.type) #set($totalPrice = $pricePerPassengers.price.totalPrice) #set($seatCount = 0) #set($seatPrice = 0) #set($bagCount = 0) #set($bagPrice = 0) #if($ancillaryProducts) #foreach($ancillaryProduct in $ancillaryProducts) #if($ancillaryProduct.associatedPassenger == $passenger.id) #if($ancillaryProduct.seatNumber) #set($seatCount =${seatCount} + 1) #set($seatPrice =${seatPrice} + $ancillaryProduct.price.amount) #set($totalPrice = ${totalPrice} + ${seatPrice}) #end #if($ancillaryProduct.numberOfUnits > 0) #set($bagCount =${bagCount} + 1) #set($bagPrice =${bagPrice} + $ancillaryProduct.price.amount) #set($totalPrice = ${totalPrice} + ${bagPrice}) #end #end #end #set($seatTotalCount = $seatTotalCount + ${seatCount}) #set($bagTotalCount =${bagTotalCount} + ${bagCount}) #end #set($insurancePrice=0.0) #if($insuranceProducts) #foreach($insuranceproduct in $insuranceProducts) #set ($insurancePrice =$textutils.parseFloat($insuranceproduct.price)) #end #end #set($totalPrice = ${totalPrice} + ${insurancePrice}) #if($ancillaryProducts) #if($seatCount > 0) #end #if($bagCount > 0) #end #end #if($calculatedpassengerCount == $passengerCount) #set($insurancePrice="") #if($insuranceProducts) #foreach($insuranceproduct in $insuranceProducts) #set ($insurancePrice ="${insuranceproduct.price} ${price.currency}") #end #end #end
$firstName $lastName $passenger.type #if($connections.size() > 1) , return #end $totalPrice $price.currency
ticket fare $pricePerPassengers.price.basePrice $price.currency
taxes & fees $pricePerPassengers.price.totalTax $price.currency
#if($seatCount == 1) $seatCount extra seat #end #if($seatCount > 1) $seatCount extra seats #end $seatPrice $price.currency
#if($bagCount ==1) $bagCount extra bag #end #if($bagCount > 1) $bagCount extra bags #end $bagPrice $price.currency
+ Insurance*** $insurancePrice
#end #end #end #if($adultCount == 1) #set ($travellers = "$adultCount Adult") #end #if($youthCount == 1) #set ($travellers = "${travellers} ${youthCount} Youth") #end #if($infantCount == 1) #set ($travellers = "${travellers} ${infantCount} infant") #end #if($adultCount > 1) #set ($travellers = "$adultCount Adults") #end #if($youthCount > 1) #set ($travellers = "${travellers} ${youthCount} Youths") #end #if($childCount > 0) #set ($travellers = "${travellers} ${childCount} Child") #end #if($infantCount > 1) #set ($travellers = "${travellers} ${infantCount} infants") #end
ROUND TRIP DATES TRAVELERS EXTRAS
$departureCode - $arrivalCode $departureDate - $arrivalDate $travellers #set($commaValue ="") #if($bagTotalCount == 1) #set($commaValue =",") $bagTotalCount bag #end #if($seatTotalCount == 1) $commaValue $seatTotalCount aem.email.booking.seat #end #if($bagTotalCount > 1) #set($commaValue =",") $bagTotalCount bags #end #if($seatTotalCount > 1) $commaValue $seatTotalCount Seat #end
TOTAL
$price.totalPrice $price.currency incl. $price.totalTax $price.currency
taxes & fees
#if($paymentMethod.type.getName() == "CC") #end
Payment method Charged to $paymentDetails #foreach($passenger in $passengers) #if($passenger.isPrimary) Confirmation sent to $passenger.contactInformation.email #end #end
#set($fareFamilies = []) #foreach($connection in $connections) #if($connection.productCode && !$fareFamilies.contains($connection.productCode)) $fareFamilies.add($connection.productCode) #end #end #foreach($fareFamily in $fareFamilies) #if($fareFamily) #set($fareRule = $fareRuleHelper.getFareDescription($fareFamily))

Fare rules $fareRule.heading

Changes: $fareRule.changeLine Refund: $fareRule.refundLine Child discount: $fareRule.childDiscountLine

This booking was created: $dateTime.currentDateTimeInGMT("dd MMMM yyyy, HH:mm") GMT

#set($documentNumber ="") #set($commaValue="") #foreach($document in $documentInfo) #set($documentNumber = "${documentNumber} ${commaValue} ${document.number}") #set($commaValue=",") #end #set($documentNumber = $documentNumber.replace("[","").replace("]","")) #if($documentnumber !="")

Ticket number(s) $documentNumber

#end

Insurance: Policy number $insurancePolicyNumber

Star Alliance