<div id="modal-tambah" class="modal fade" role="dialog">
		<div class="modal-dialog modal-md">
			<div class="modal-content">
				<form role="form" id="form-tambah" method="post" action="input.php" autocomplete="off">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">&times;</button>
					<h4 class="modal-title">Tambah Data Planning</h4>
				</div>
					<div class="modal-body">
					<table style="width: 100%; background-color: white;">
					<tr>
						<th width="20%">DATE PLAN</th>
						<td><input type="text" class="input-tanggal" id="date_plan" name="date_plan" data-date-format="dd-mm-yy">
							<p style="color:red" id="error_date_plan"></p></td>
					</tr>
					<tr>
					<th>MESIN</th>
					<td><select id="mesin" name="mesin">
							<option selected></option>
							<?php 
							include"koneksi.php";
							$data = mysqli_query ($koneksi, " select 
													MesinID,
													Mesin
												from 
												mesin 
												order by MesinID DESC");
							while ($row = mysqli_fetch_array ($data))
							{
							?>
							<option value="<?php echo  $row['MesinID']; ?>"><?php echo $row['Mesin']; ?></option>
							<?php } ?>
						</select>
						<p style="color:red" id="error_mesin"></p>
					</td>
					</tr>
					<tr>
						<th>PRODUCT</th>
						<td><select id="product" name="product">
								<option selected></option>
								<?php 
								include"koneksi.php";
								$data2 = mysqli_query ($koneksi, " select 
														ProductID,
														ItemDescription,
														SLoc,
														QtyUnit
												  from 
												  product 
												  order by ProductID DESC");
								while ($row2 = mysqli_fetch_array ($data2))
								{
								?>
								<option value="<?php echo  $row2['ProductID']; ?>"><?php echo $row2['ItemDescription']; ?> | <?php echo $row2['SLoc']; ?> @ <?php echo $row2['QtyUnit']; ?> pcs</option>
								<?php } ?>
							</select>
							<p style="color:red" id="error_product"></p></td>
					</tr>
					<tr>
						<th>MATERIAL</th>
						<td>
						<select id="material" name="material">
								<option selected></option>
								<?php 
								include"koneksi.php";
								$data3 = mysqli_query ($koneksi, " select 
														MaterialID,
														RawMat
												  from 
												  material 
												  order by MaterialID DESC");
								while ($row3 = mysqli_fetch_array ($data3))
								{
								?>
								<option value="<?php echo  $row3['MaterialID']; ?>"><?php echo $row3['RawMat']; ?></option>
								<?php } ?>
							</select>
							<p style="color:red" id="error_material"></p>
						</td>
					</tr>
					<tr>
						<th>QUANTITY</th>
						<td>
							<input id="qty" name="qty">
							<p style="color:red" id="error_qty"></p>
						</td>
					</tr>
					<tr>
						<th>PRIORITAS</th>
						<td>
							<input id="prioritas" name="prioritas">
							<p style="color:red" id="error_prioritas"></p>
						</td>
					</tr>
					<tr>
						<th>POOR</th>
						<td><select name="poor" id="poor">
								<option selected></option><?php 
								include"koneksi.php";
								$data1 = mysqli_query ($koneksi, " select 
														POOR
												  from 
												  plan 
												  group by POOR
												  order by POOR Desc
												  LIMIT 15");
								while ($row1 = mysqli_fetch_array ($data1))
								{
								?>
								<option value="<?php echo  $row1['POOR']; ?>" ><?php echo $row1['POOR']; ?></option>
								<?php } ?>
								<option value="supplain">POOR BARU</option>
							</select>

							<input class="form-control" type="text" id="poor2" name="poor2" placeholder="Masukkan POOR Baru..">
							<!-- <input class="form-control" id="poor" name="poor">
							<p style="color:red" id="error_poor"></p> --></td>
					</tr>
					</table>
									
					</div>
					
					<div class="modal-footer">
						<button type="button" class="btn btn-info" data-dismiss="modal">Batal</button>
						<button type="submit" class="btn btn-primary" >Simpan</button>
					</div>
				</form>		
			</div>
		</div>
	</div>
	
	


	<div id="modal-edit" class="modal fade" role="dialog">
		<div class="modal-dialog modal-md">
			<div class="modal-content">
				<form role="form" id="form-edit" method="post" action="input.php" autocomplete="off">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">&times;</button>
					<h4 class="modal-title">Edit Planning</h4>
				</div>
					<div class="modal-body">
						<div id="data-edit">
						
						</div>				
					</div>
					
					<div class="modal-footer">
						<button type="button" class="btn btn-info" data-dismiss="modal">Batal</button>
						<button type="submit" class="btn btn-primary" >Simpan</button>
					</div>
				</form>		
			</div>
		</div>
	</div> 