<?php    include_once('../config/db.php');  include_once('../config/check.php'); 

?>

<!DOCTYPE html>
<html>
<head>
<?php include_once('inc/link.php');   ?>  
</head>
<body <?php include_once('inc/nav.php');  ?>>
<div class="wrapper">

  <!-- Main Header -->
    <header class="main-header">

    <!-- Logo -->
       <?php include_once('inc/brand.php');   ?>

    <!-- Header Navbar -->
    <?php include_once('inc/navbar.php');   ?>

  </header>
 
  <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
     <?php include_once('inc/menu.php');   ?>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">


  <!-- Main content -->
  <section class="content container-fluid">
        

    <div class="row">        
        <div class="col-md-12">
        <div class="box box-default box-xs">
          <div class="box-body">
            <div class="row">
                <div class="col-md-12"><legend> <i class="fa fa-bars"></i> List Pay Modes </legend> </div>
                <div class="col-xs-12">
                     
                    <table class="table table-hover   table-sm table-condensed    " id="newsletter" >
                        <thead class="thead-light ">
                            <tr class="bg-default" >                            
                              
                                <th >   Pay Mode Name </th>
                                <th >   Pay Mode  Code </th>
                                <th >   Pay Mode  Description </th>                                                                  
                                <th >   Action  </th>
                            </tr>
                        </thead>
                        
                        <tbody class="box-body">
                        <?php try{

                            $select = $conn->prepare(" select * from acctranspaymode   ");
                            $select->execute();
                            while($data=$select->fetch()){ ?>
                        <tr>                       
                           
                            <td> <?php echo $data['name']; ?> </td>
                            <td> <?php echo $data['code']; ?> </td>
                            <td> <?php echo $data['description']; ?> </td>
                            <td> 
                
                                <div class="dropdown">
                                    <button id="dLabel" type="button" data-toggle="dropdown" 
                                            aria-haspopup="true" aria-expanded="false" class=" btn-xs btn btn-block btn-success">
                                        More
                                    </button>
                                    <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel" style="min-width: 100px !important;">
                                        <li><form method="post" target="_blank_" action="#">
                                            <button type="text" class="btn btn-xs btn-primary btn-block " name="show" value="<?php echo $data['tt']; ?>">  SHOW </button></form>
                                        </li>

                                        <li><form method="post" action="#">
                                            <button type="text" class="btn btn-xs btn-primary btn-block " name="purchasesedit" value="<?php echo $data['tt']; ?>">  EDIT </button></form>
                                        </li>
                                        <li><form method="post" action="#">
                                            <button type="text" class="btn btn-xs btn-primary btn-block " name="paysupp" value="<?php echo $data['tt']; ?>">  PAY </button></form>
                                        </li>
                                        
                                    </ul>
                                </div>
                            
                            </td> 
                
                        <?php } } catch(PDOException $e) { echo "error:".$e->getMessage(); } ?>
                    </tr>
                    </tbody>
                  </table>
                    
                </div>
            </div>
          </div>
        </div>
         
        </div>
        <!-- /.col -->
      </div>
  </section>


</div>
  <!-- /.content-wrapper -->
  
  <!-- Main Footer -->
  <footer class="main-footer">
    <?php  include_once('inc/footer.php'); ?>
  </footer>
  
</div>
                         

<?php include_once('inc/linkjs.php') ?>


</body>
</html>

