{extends file="{$mvcView->getModulePath()}/View/_tpl/humanReadableFile/base.tpl"}

{block name="itinerary-data"}
	<tbody>
		<tr>
			<td colspan="2">
				<table class="itinerary">
					<thead>
						<tr class="header">
							<th colspan="2">date</th>
							<th rowspan="2">location</th>
						</tr>
						<tr class="subheader">
							<th>check in</th>
							<th>check out</th>
						</tr>
					</thead>
					{$segments = $transaction->itinerary->getSegments()}
					{$segment=$segments[0]}
					<tbody class="departure">
						<tr>
							<td>{if $segment->departure->date}{$segment->departure->date|dateTimeFormat} {$segment->departure->time}{/if}</td>
							<td>{if $segment->destination->date}{$segment->destination->date|dateTimeFormat} {$segment->destination->time}{/if}</td>

							{strip}
							<td>
								<span class="text-autoSelectable note">{if $segment->departure->airportCode}{$segment->departure->airportCode}{/if}</span>

								{$s=""}
								{if (string)$segment->departure->airportCode}
									{$s} {stationLabel ref={$segment->departure->airportCode}}
									{$s=","}
								{/if}

								{if (string)$segment->departure->cityId}
									{$s} {cityLabel ref={$segment->departure->cityId} hideLink=1}
									{$s=","}
								{/if}

								{if (string)$segment->departure->countryCode}
									{$s} {countryLabel ref={$segment->departure->countryCode}}
									{$s=","}
								{/if}
							</td>
							{/strip}
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
	</tbody>

{/block}

{block name="supplier-data"}
	<tr>
		<td class="label">name</td>
		<td class="value">
			<span class="note" tooltip="chainCode">{(string)$transaction->supplier->accomodation_chainCode}</span>
			{$transaction->supplier->name}
		</td>
	</tr>
	
	<tr>
		<td class="label">rate</td>
		<td class="value">
			<span class="note" tooltip="rate plan">{(string)$transaction->supplier->accomodation_ratePlan}</span>
			{$transaction->supplier->accomodation_ratePlan_translation}
		</td>
	</tr>
	
	<tr>
		<td class="label">room(s)</td>
		<td class="value">
			{$transaction->supplier->accomodation_numberOfRooms}/{$transaction->supplier->accomodation_roomType_translation|default:$transaction->supplier->accomodation_roomType}/{$transaction->supplier->accomodation_roomClass}
		</td>
	</tr>
	<tr>
		<td class="label">bed(s)</td>
		<td class="value">
			{$transaction->supplier->accomodation_numberOfBeds}/{$transaction->supplier->accomodation_bedType}
		</td>
	</tr>
{/block}