<?php

$where = " WHERE 1=1";
$next_page_condition = "";

if($_REQUEST['hide_top']){
	$next_page_condition.="&hide_top=1";
}
if($_REQUEST['hide_left']){
	$next_page_condition.="&hide_left=1";
}

?>

<style type="text/css">
	.custom-bordered td, th {
			border: 1px solid #dee2e6;
		}

	.custom-bordered tfoot td[colspan="6"].text-end {
			border-left: none !important;
			border-bottom: none !important;
		}
    .label {
			display: inline-block;
			width: 120px; /* Adjust this width as needed */
			font-weight: ;
		}
	@page {
		margin: 0;
		/* size: landscape; */
		size: potrait;
		/* DIN A4 standard, Europe */
	}

	@media print {
		.bgblack {
			background-color: #000;
		}

		.font50print40 {
			font-size: 40px;
		}

		.content-wrapper,
		.right-side {
			background-color: #fff;
		}

		.box {
			border-top: 0 solid #d2d6de !important;
			box-shadow: none !important;
		}

		p {
			white-space: inherit !important;
		}

		.col-sm-1,
		.col-sm-2,
		.col-sm-3,
		.col-sm-4,
		.col-sm-5,
		.col-sm-6,
		.col-sm-7,
		.col-sm-8,
		.col-sm-9,
		.col-sm-10,
		.col-sm-11,
		.col-sm-12 {
			float: left;
		}

		.col-sm-12 {
			width: 100%;
		}

		.col-sm-11 {
			width: 91.66666667%;
		}

		.col-sm-10 {
			width: 83.33333333%;
		}

		.col-sm-9 {
			width: 75%;
		}

		.col-sm-8 {
			width: 66.66666667%;
		}

		.col-sm-7 {
			width: 58.33333333%;
		}

		.col-sm-6 {
			width: 50%;
		}

		.col-sm-5 {
			width: 41.66666667%;
		}

		.col-sm-4 {
			width: 33.33333333%;
		}

		.col-sm-3 {
			width: 25%;
		}

		.col-sm-2 {
			width: 16.66666667%;
		}

		.col-sm-1 {
			width: 8.33333333%;
		}
	}

	.col-sm-1,
	.col-sm-2,
	.col-sm-3,
	.col-sm-4,
	.col-sm-5,
	.col-sm-6,
	.col-sm-7,
	.col-sm-8,
	.col-sm-9,
	.col-sm-10,
	.col-sm-11,
	.col-sm-12 {
		float: left;
	}

	.col-sm-12 {
		width: 100%;
	}

	.col-sm-11 {
		width: 91.66666667%;
	}

	.col-sm-10 {
		width: 83.33333333%;
	}

	.col-sm-9 {
		width: 75%;
	}

	.col-sm-8 {
		width: 66.66666667%;
	}

	.col-sm-7 {
		width: 58.33333333%;
	}

	.col-sm-6 {
		width: 50%;
	}

	.col-sm-5 {
		width: 41.66666667%;
	}

	.col-sm-4 {
		width: 33.33333333%;
	}

	.col-sm-3 {
		width: 25%;
	}

	.col-sm-2 {
		width: 16.66666667%;
	}

	.col-sm-1 {
		width: 8.33333333%;
	}
</style>
<div class="container mt-3">
	<div class="row justify-content-center">
		<div class="col-sm-12">
			<div class="card">
				<div class="card-body">
					<div class="row mb-2">
						<div class="col-sm-3">
							<img src="../images/thermo_po.jpg" style="width: 280px;margin-top: 0;"/>
						</div>
						<div class="col-sm-6" style="text-align:center;">
							<b><h1 style="text-align:center;margin-top: 0;font-weight:bold;">THERMOTEC PLASTICS</h1></b>
							
						</div>
						<div class="col-sm-3">
							<b>Works Order Route Card</b><br>
							<b>33470.00</b>
						</div>
						<div class="col-sm-12" style="text-align:center;">
							<hr style="margin-top: 15px;border-top: 2px solid #000;" />
						</div>
					</div>
					<div class="row mb-2">
						<div class="col-sm-3">
							<div style="border-right: 2px solid #dee2e6;height: 170px;width: 100%;float: left;">
								<p style="margin: 1px 0;">Part to Manufacture</p>
								<p style="margin: 2px 0;">362-8136-ML</p>
								<p style="margin: 2px 0;">BUMPER ASLH MOULDING</p>
								<p style="margin: 2px 0;">CNC Program No</p>
							</div>
						</div>
						<div class="col-sm-3">
							<div style="border-right: 2px solid #dee2e6;height: 170px;width: 100%;float: left;">
								<p style="margin: 1px 0;">Master Sample</p>
								<p style="margin: 2px 0;">Location</p>
								<p style="margin: 4px 0;">Tool Location</p>
							</div>
						</div>
						<div class="col-sm-3">
							<div style="border-right: 2px solid #dee2e6;height: 170px;width: 100%;float: left;">
								<p style="margin: 1px 0;">Job Details</p>
								<p style="margin: 2px 0;">Qty to Make</p>
								<p style="margin: 2px 0;">519</p>
								<p style="margin: 2px 0;">Date Required</p>
								<p style="margin: 2px 0;">30 Aug 2024</p>
							</div>
						</div>
						<div class="col-sm-3">
							<div style="height: 170px;width: 100%;float: left;">
								<p style="margin: 1px 0;">Customer Details</p>
								<p style="margin: 2px 0;">Customer</p>
								<p style="margin: 2px 0;">Internal Works Order</p>
								<p style="margin: 2px 0;">Sales Order</p>
								<p style="margin: 2px 0;">For Stock</p>
							</div>
						</div>
					</div>

					<div class="my-4"></div>
					<div class="my-4"></div>
					<div class="container" style="width:100%; float:left; margin-top:12px;">
						<div><h5>Materials Required</h5></div>
							<table class="table custom-bordered">
								<thead>
									<tr>
										<th>Type</th>
										<th>Part Number</th>
										<th>Description</th>
										<th>Required</th>
										<th>Balance</th>
										<th>Component Comments</th>
									</tr>
								</thead>
								<tbody>
								<?
								//while($row_brought_out_part =mysqli_fetch_array($sql_brought_out_part)){ 
									//$row_brought_out_part=utility::validate_crypt_data($row_brought_out_part);
					         	?>
									<tr>
										<td>BI<?php //echo $row_brought_out_part['exch_rate']?></td>
										<td>16X7M M WASHER<?php //echo $row_brought_out_part['duty_percent']?></td>
										<td>RUBBER WASHER 16MM <?php //echo $row_brought_out_part['price']?></td>
										<td>2,000 EACH<?php //echo $row_brought_out_part['number']?></td>
										<td>1,020 EACH<?php //echo $row_brought_out_part['scrap_percent']?></td>
										<td><?php //echo $row_brought_out_part['handling_percent']?></td>
									</tr>
								<? //} ?>	
								</tbody>
							</table>
					</div>	
                        <div class="row mb-4">
							<div class="col-sm-12">
								<div style="border:2px solid #dee2e6;height: 180px;width: 100%;float: left;">
									<b style="display:block;text-transform:uppercase;border-bottom:2px solid #dee2e6;padding: 5px;">Notes & Special Instructions</b> 
									<p style="padding: 5px;margin-bottom: 0;margin-top: 5px;">
									<? echo $order_notes;?>
									</p>
								</div>
							</div>
						</div>					
				<div class="my-4"></div>
				<div class="container" style="width:100%; float:left; margin-top:10px;">
						<div><h5>Manufacturing/ Inspection Data</h5></div>
							<table class="table custom-bordered">
								<thead>
									<tr>
										<td>Op</td>
										<td>Resource Details</td>
										<td>Operation Times</td>
										<td>1st Off</td>
										<td>Qty Good</td>
										<td>Scrap</td>
										<td>Reason1</td>
										<td>Reason2</td>
										<td>Date</td>
										<td>Operator</td>
									</tr>
								</thead>
								<tbody>
								<?
								//$total_cost_sum = 0;
								//while($row_tooling =mysqli_fetch_array($sql_tooling)){ 
									//$row_tooling=utility::validate_crypt_data($row_tooling);
									 //$total_cost_sum += $row_tooling['total_cost'];
					         	?>
									<tr>
										<td>10<?php echo $row_tooling['tool_description']?></td>
										<td>HP1<?php echo $row_tooling['supplier']?></td>
										<td><?php echo $row_tooling['lead_time']?></td>
										<td><?php echo $row_tooling['parts_per_tool']?></td>
										<td><?php echo $row_tooling['tool_life']?></td>
										<td><?php echo $row_tooling['cost']?></td>
										<td><?php echo $row_tooling['number']?></td>
										<td><?php echo $row_tooling['other']?></td>
										<td><?php echo $row_tooling['total_cost']?></td>
										<td><?php echo $row_tooling['total_cost']?></td>
									</tr>
								<? //} ?>	
								</tbody>
							</table>
					</div>
					<br>
					<div class="my-4" style="font-style: italic; width:100%; float:left; margin-top:10px;">
						<p>Print Copy 3, Printed on 12Nov 2024 at 2:30 pm</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>