
<?php
include"alertandmark.php";
?>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>Add Purchase Form</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Purchase</a></li>
              <li class="breadcrumb-item active">Purchase Form</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
	   <div class="card card-info">
              <div class="card-header">
                <h3 class="card-title"> Purchase</h3>
              </div>
              <!-- /.card-header -->
              <!-- form start -->
              <form action='purchase_action.php' method='POST'>
                <div class="card-body">
                  <div class="form-group">
                    <label for="exampleInputEmail1">Product name <?php  echo $mandatory_star; ?> </label>
                  <select class="form-control select2" style="width: 100%;" name='product_name' required>
                   
				   <?php				
				include"config.php";

$sql="select * from product order by product_id desc";
$result=mysqli_query($conn,$sql);

if(mysqli_num_rows($result)>0)
{
	while($row=mysqli_fetch_assoc($result))
	{
		
	echo" <option>". $row['product_name']." </option>
";
}}
						?>
				   
				   
				   
				   
                   
                  </select>
				  
                  
                   
				  <div class="form-group">
                    <label for="exampleInputEmail1">Purchased Qty</label>
                    <input type="size" class="form-control" id="exampleInputEmail1" placeholder="Product Qty" name='purchase_qty'>
                  </div>
				  
				   <div class="form-group">
                    <label for="exampleInputEmail1">Product Vendor <?php  echo $mandatory_star; ?> </label>
                  <select class="form-control select2" style="width: 100%;" required>
                   
				   <?php				
				include"config.php";

$sql="select * from vendor order by vendor_id desc";
$result=mysqli_query($conn,$sql);

if(mysqli_num_rows($result)>0)
{
	while($row=mysqli_fetch_assoc($result))
	{
		
	echo" <option>". $row['vendor_name']."</option>
";
}}
						?>
				   
         </select>
				  
                  </div>
				  
				  
				   <div class="form-group">
                    <label for="exampleInputEmail1">Purchase date</label>
                    <input type="date" class="form-control" id="exampleInputEmail1" placeholder="Purchase date" name="purchase_date">
                  </div>
				  
				  <div class="form-group">
                    <label for="exampleInputEmail1">Mfg date</label>
                    <input type="date" class="form-control" id="exampleInputEmail1" placeholder="mfg date" name="purchase_mfg_date">
                  </div>
				  
				  <div class="form-group">
                    <label for="exampleInputEmail1">Expire date</label>
                    <input type="date" class="form-control" id="exampleInputEmail1" placeholder="Expire date" name="purchase_expr_date">
                  </div>
				   
				  
         
                  <div class="form-group">
                    <label for="exampleInputFile">Purchase Invoice</label>
                    <div class="input-group">
                      <div class="custom-file">
                        <input type="file" class="custom-file-input" id="exampleInputFile">
                        <label class="custom-file-label" for="exampleInputFile">Choose file</label>
                      </div>
                      <div class="input-group-append">
                        <span class="input-group-text">Upload</span>
                      </div>
                    </div>
                  </div>
                 
				   <div class="form-group">
                    <label for="exampleInputFile">Purchase GRN</label>
                    <div class="input-group">
                      <div class="custom-file">
                        <input type="file" class="custom-file-input" id="exampleInputFile">
                        <label class="custom-file-label" for="exampleInputFile">Choose file</label>
                      </div>
                      <div class="input-group-append">
                        <span class="input-group-text">Upload</span>
                      </div>
                    </div>
                  </div>
                 
				   <div class="form-group">
                    <label for="exampleInputFile">Purchase Receipt</label>
                    <div class="input-group">
                      <div class="custom-file">
                        <input type="file" class="custom-file-input" id="exampleInputFile">
                        <label class="custom-file-label" for="exampleInputFile">Choose file</label>
                      </div>
                      <div class="input-group-append">
                        <span class="input-group-text">Upload</span>
                      </div>
                    </div>
                  </div>
                 
                </div>
                <!-- /.card-body -->

                <div class="card-footer">
                  <button type="submit" class="btn btn-primary">Submit</button>
                </div>
				
				
				

              </form>
            </div>
	</div>
    </section>
	           