<table class="services list">
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['hour']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['service']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['serviceName']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['attribute']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['departure']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['details']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['passengers']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['product']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['serviceType']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['serviceSource']}</th>
	<th>{$_LANG['Orders']['MiceProject']['reports']['details']['serviceDescription']}</th>



	{counter name=resultsCount start=0 print=false}

	{foreach $formData['reportData']['time'] as $day}

		{$OK = false}
		<tbody>
			{foreach $formData['reportData']['services'] as $service}
				{if ($day>= $service['startTime'] && $service['endTime']>= $day && $service['endTime']) || ($day== $service['startTime'] && !$service['endTime'])}
					{$OK = true}
				{/if}
			{/foreach}

		{if $OK}
			<tr>
				<td colspan="11" style="text-align: center; background-color: #D7E5F5; color: #000; font-weight: bold;">
					{$day|dateTimeFormat}
				</td>
			</tr>
		{/if}

		{foreach $formData['reportData']['services'] as $service}
			{if ($day>= $service['startTime'] && $service['endTime']>= $day && $service['endTime']) || ($day== $service['startTime'] && !$service['endTime'])}
				<tr>
					<td>
						{if $service['startTime'] and $service['endTime']}
							{$service['startTime']}-{$service['endTime']}
						{elseif $service['startTime']}
							{$service['startTime']}
						{elseif $service['endTime']}
							{$service['endTime']}
						{else}

						{/if}
					</td>

					<td>{$service['serviceName']}</td>

					<td>{if $service['productName']}
								{$service['productName']}
							{elseif $service['supplierProduct']['productName']}
								{$service['supplierProduct']['productName']}
							{else}

							{/if}</td>

					<td>{$service['categoryReadable']}</td>

					<td>
						{if $service['departureCityId'] && $service['destinationCityId']}
							{if $service['departureCountryCode']==$service['destinationCountryCode']}
								{cityLabel ref=$service['departureCityId']}
								/
								{cityLabel ref=$service['destinationCityId']}
								({countryLabel ref=$service['destinationCountryCode']})
							{else}
								{cityLabel ref=$service['departureCityId']}
								({countryLabel ref=$service['departureCountryCode']})
								/
								{cityLabel ref=$service['destinationCityId']}
								({countryLabel ref=$service['destinationCountryCode']})
							{/if}
						{elseif $service['departureCityId']}
							{cityLabel ref=$service['departureCityId']}
							({countryLabel ref=$service['departureCountryCode']})/&nbsp;
						{elseif $service['destinationCityId']}
							&nbsp;/{cityLabel ref=$service['destinationCityId']}
							({countryLabel ref=$service['destinationCountryCode']})
						{else}
							-
						{/if}
					</td>

					<td>{$service['multiplierReadable']}</td>

					<td>{$service['pax']}</td>

					<td>
						{if $service['idSupplier'] && $service['idSupplierProduct']}
							{supplierProductLabel ref=$service['idSupplierProduct']}
							/
							{supplierLabel ref=$service['idSupplier']}
						{elseif $service['idSupplier']}
							{supplierLabel ref=$service['idSupplier']}
						{else}
							-
						{/if}
					</td>

					<td>
						{if $service['productTypeCode']}
							{$service['productTypeReadable']}
						{/if}
					</td>

					<td>{$service['serviceSourceReadable']}</td>

					<td>{$service['description']}</td>
				</tr>
			{/if}
		{/foreach}

	</tbody>
	{/foreach}
</table>