<div class="col-lg-12">
    <div class="card">
        <div class="card-body pb-1">
            <div class="row justify-content-between">
                <div class="col-auto"><h4 class="card-title">Search by:</h4></div>
                <div class="col-auto justify-content-end"><a href="createquote" class="btn btn-sm btn-facebook"><i class="mdi mdi-plus"></i>Create Quote</a></div>
            </div>
            
            <form action="" class="row g-3 mt-3" name="filters">
            <div class="col-auto">
                <label for="custname">Customer Name</label>
                <input type="text" class="form-control form-controll-sm" id="custname" value="" name="cn" placeholder="Abdullah">
             </div>
            <div class="col-auto">
                <label for="quoteid">Quote No</label>
                <input type="text" class="form-control form-controll-sm" id="quoteid" value="" name="qn" placeholder="QN-001-260521">
                <i class="fw-lighter mdi mdi-information text-info">QN-Cid-YMD-Number</i>
             </div>
            <div class="col-auto">
                <label for="ponumber">PO Number</label>
                <input type="text" class="form-control form-controll-sm" id="ponumber" value="" name="po" placeholder="12345678">
             </div>
            <div class="col-auto">
                <label for="startdate">Start Date:</label>
                <input type="date" class="form-control form-controll-sm" id="startdate" name="sd">
             </div>
            <div class="col-auto">
                <label for="enddate">End Date:</label>
                <input type="date" class="form-control form-controll-sm" id="enddate" name="ed">
             </div>
            <div class="col-auto">
                <label for="status">Status</label>
                <select class="form-select form-select-sm" name="s" id="status" aria-label="status">
                    <option value="Active" selected class="bg-success">Active</option>
                    <option value="Inactive" class="bg-danger text-white">Inactive</option>
                    <option value="Hold" class="bg-warning">Hold</option>
                    <option value="Cancel" class="bg-info">Cancel</option>
                    <option value="amendment" class="">Amendment</option>
                </select>
             </div>
            <div class="col-auto align-content-end">
                <input type="submit" value="Search" class="btn btn-success" readonly disabled>
                <input type="reset" value="Reset" class="btn btn-secondary text-white">
             </div>
        </form>
        </div>
        
    </div>
</div>
<div class="col-lg-12 grid-margin stretch-card mt-1">
    <!-- Summary Table Limit 50 -->
<div class="card">
    <div class="card-body p-2">
        <table class="table table-bordered ga-table-small">
            <thead>
            <tr>
                <th>S.N</th>
                <th>Customer Name</th>
                <th>Quotation No.</th>
                <th>PO Number</th>
                <th>Date</th>
                <th>Validity</th>
                <th>Invoice.No</th>
                <th>Amount</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>
             <?php foreach($quotes as $quote): ?>
            <tr>
                <td class="text-center"><?= esc($quote['qid'])?></td>
                <td><?= esc($quote['c_cname'])?></td>
                <td><?= esc($quote['quotation_no'])?></td>
                <td><?= esc($quote['po_number'])?></td>
                <td><?= esc($quote['quotation_date'])?></td>
                <td><?= esc($quote['validity_date'])?></td>
                <td><a href="<?php echo base_url('index.php/admin/createinvoice?cid='.$quote['qid']);?>" class=" p-1"><i class="mdi mdi-note mdi-18px "></i>Generate Inoice</a></td>
                <td class="text-end"><?= esc(number_format($quote['net_amount'],2,'.',","))?></td>
                <td>
                    <a href="<?php echo base_url('index.php/admin/viewquote/'.$quote['qid'].'')?>"><i class="mdi mdi-eye mdi-18px text-info"></i></a>
                    <!-- <a href="#"><i class="mdi mdi-pen mdi-18px text-success"></i></a>
                    <a href="#"><i class="mdi mdi-trash-can mdi-18px text-danger"></i></a> -->
                </td>

            </tr>
            <?php endforeach;?>
           
            </tbody>
        </table>
    </div>
</div>
</div>
