| 
									
										
										
										
											2017-04-17 16:51:49 +02:00
										 |  |  | <div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2 main"> | 
					
						
							|  |  |  | 	<h1 class="page-header">Purchase</h1> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	<form id="purchase-form"> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 		<div class="form-group"> | 
					
						
							| 
									
										
										
										
											2017-04-17 16:51:49 +02:00
										 |  |  | 			<label for="product_id">Product  <i class="fa fa-barcode"></i></label> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 			<select class="form-control combobox" id="product_id" name="product_id" required> | 
					
						
							|  |  |  | 				<option value=""></option> | 
					
						
							|  |  |  | 				<?php foreach ($products as $product) : ?>
 | 
					
						
							| 
									
										
										
										
											2017-04-18 23:04:26 +02:00
										 |  |  | 					<option data-additional-searchdata="<?php echo $product->barcode; ?>" value="<?php echo $product->id; ?>"><?php echo $product->name; ?></option>
 | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 				<?php endforeach; ?>
 | 
					
						
							|  |  |  | 			</select> | 
					
						
							|  |  |  | 			<div class="help-block with-errors"></div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 		<div class="form-group"> | 
					
						
							|  |  |  | 			<label for="best_before_date">Best before</label> | 
					
						
							|  |  |  | 			<div class="input-group date"> | 
					
						
							| 
									
										
										
										
											2017-04-17 16:51:49 +02:00
										 |  |  | 				<input type="text" data-isodate="isodate" class="form-control datepicker" id="best_before_date" name="best_before_date" required autocomplete="off"> | 
					
						
							|  |  |  | 				<div id="best_before_date-datepicker-button" class="input-group-addon"> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 					<i class="fa fa-calendar"></i> | 
					
						
							|  |  |  | 				</div> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="help-block with-errors"></div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-17 16:51:49 +02:00
										 |  |  | 		<div class="form-group"> | 
					
						
							| 
									
										
										
										
											2017-04-20 17:10:21 +02:00
										 |  |  | 			<label for="amount">Amount  <span id="new_amount_qu_unit" class="small text-muted"></span></label> | 
					
						
							| 
									
										
										
										
											2017-04-17 16:51:49 +02:00
										 |  |  | 			<input type="number" class="form-control" id="amount" name="amount" value="1" min="1" required> | 
					
						
							|  |  |  | 			<div class="help-block with-errors"></div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 		<button id="save-purchase-button" type="submit" class="btn btn-default">OK</button> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 	</form> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-18 20:05:02 +02:00
										 |  |  | <div class="col-sm-6 col-md-5 col-lg-3 main well"> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 	<h3>Product overview <strong><span id="selected-product-name"></span></strong></h3> | 
					
						
							|  |  |  | 	<h4><strong>Purchase quantity:</strong> <span id="selected-product-purchase-qu-name"></span></h4> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	<p> | 
					
						
							|  |  |  | 		<strong>Stock amount:</strong> <span id="selected-product-stock-amount"></span> <span id="selected-product-stock-qu-name"></span><br /> | 
					
						
							| 
									
										
										
										
											2017-04-16 23:11:03 +02:00
										 |  |  | 		<strong>Last purchased:</strong> <span id="selected-product-last-purchased"></span> <time id="selected-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br /> | 
					
						
							|  |  |  | 		<strong>Last used:</strong> <span id="selected-product-last-used"></span> <time id="selected-product-last-used-timeago" class="timeago timeago-contextual"></time> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 	</p> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | </div> |