
<?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 Expense Form</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">Expense Form</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
	   <div class="card card-info">
              <div class="card-header">
                <h3 class="card-title"> Expense</h3>
              </div>
              <!-- /.card-header -->
              <!-- form start -->
              <form action='add_expense_action.php' method='POST'>
                <div class="card-body">
                  
				  <div class="form-group">
                        <label> Expense Title</label>
                        <select class="form-control" name='expense_title'>
					<?php	
						include"config.php";

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

if(mysqli_num_rows($result)>0)
{
	while($row=mysqli_fetch_assoc($result))
	{
		
	echo"<option>". $row['expense_item_title']."</option>";
	}}

?>
						
                        </select>
                      </div>
				  				   <div class="form-group">
                    <label for="exampleInputEmail1">Amount</label>
                    <input type="number" class="form-control" id="exampleInputEmail1" placeholder="Enter Amount" name="expense_amount">
                  </div>
				  
<div class="form-group">
                        <label> Payment Method</label>
                        <select class="form-control" name='e_pay_method'>
                          <option>Cash </option>
                          <option>Card</option>
                          <option>Check</option>
                        </select>
                      </div>
					  
					   <div class="form-group">
                        <label> Account to</label>
                        <select class="form-control" name='expense_account'>
                          <option>Credit</option>
                          <option>Liability</option>
                          <option>Wasted</option>
                        </select>
                      </div>
				  
				   <div class="form-group">
                    <label for="exampleInputEmail1">Issued on <?php  echo $mandatory_star; ?></label>
                    <input type="date" class="form-control" id="exampleInputEmail1" placeholder="Enter email" name='expense_issed_on' required>
                  </div>
				  				    
                  <div class="form-group">
                    <label for="exampleInputFile">Attachment/Receipt</label>
                    <div class="input-group">
                      <div class="custom-file">
                        <input type="file" class="custom-file-input" id="exampleInputFile" name='expense_File'>
                        <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>
				  	<?php	
						include"config.php";

$sql="select * from z_cache";
$result=mysqli_query($conn,$sql);

if(mysqli_num_rows($result)>0)
{
	while($row=mysqli_fetch_assoc($result))
	{
		
	echo"    <input type='hidden' name='z_no' value='". $row['z_no']."'>";
	}}

?>
              
                </div>
				
				
				

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