<!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="<?php echo 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">
		<h4> <?php echo $today; ?> </h4>
		<table class="table table-striped table-bordered">
			<thead>
				<th>Номер</th>
				<th>Заказ</th>
				<th>Каркас</th>
				<th>Обшита</th>
			</thead>
			<tbody>
		    <?php foreach($productions as $production): ?>
					<tr>
						<td><b><nobr><?php echo $production->partner->getRawTransportTypeName(); ?>, №<?php echo $production->order_id; ?></nobr></b></td>
					  <td><?php echo $production->name; ?> <p><b><?php echo $production->partner->comment_to_production; ?></b></p> <?php if($production->production_master_id == 0 || $production->production_master_id == '0'): ?> - <b>Взять со склада</b> <?php endif; ?></td>
						<td></td>
						<td></td>
					</tr>
		    <?php endforeach; ?>
		  </tbody>
		</table>
		
		<script src="<?php echo asset('js/jquery-2.1.1.min.js'); ?>"></script>
		<script src="<?php echo asset('js/bootstrap.min.js'); ?>"></script>
		<script>
			$(document).ready(function(){
				window.onafterprint = function() {
					window.close();
				}
				window.print();
			});
		</script>
	</body>
</html>
