<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">

		<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
		<!--[if lt IE 9]>
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
	</head>

	<body style="font-family: Lucida Console">
		<h2 class="text-center"><b>№{{ $production->order_id }}</b></h2>
		<h3><b>{{ $production->name }}</b></h3>
		@if (isset($input['success']) && $input['success'] == 1)
			@if($production->partner->is_franchisees_order) <h3>Франчайзи: {{ $production->partner->user->last_name }} {{ $production->partner->user->first_name }}</h3> @endif
			<h3><b>{{ $production->partner->name }}</b></h3>
			<h4><b>{{ $production->partner->address }}</b></h4>
			<?php
				$date = explode(' ', $production->partner->datetime_of_agree);
				$date[0] = explode('-', $date[0]);
			?>
			<p><b>{{ "{$date[0][2]}.{$date[0][1]}.{$date[0][0]} {$date[1]}" }}</b></p>
		@else
			<?php
				$date = explode(' ', date('Y-m-d H:i:s'));
				$date[0] = explode('-', $date[0]);
			?>
			<p><b>{{ $production->partner->comment_to_production }}</b></p>
			<p><b>{{ "{$date[0][2]}.{$date[0][1]}.{$date[0][0]} {$date[1]}" }}</b></p>
		@endif
		<p><b>{{ $production->partner->getRawTransportTypeName() }}</b></p>

		<script src="{{ asset('js/jquery-2.1.1.min.js') }}"></script>
		<script src="{{ asset('js/bootstrap.min.js') }}"></script>
		<script>
			$(document).ready(function(){
				window.onafterprint = function() {
					window.close();
				}
				window.print();
			});
		</script>
	</body>
</html>
