G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php session_start(); $empids = $_SESSION['empids']; include("innerpageheader.php"); include("config.php"); $result = $js->prepare('SELECT * FROM `customerexpense` ORDER BY `paydate`'); $result->execute(); ?> <section> <div class="content listing-content"> <div class="in-content-wrapper"> <div class="row no-gutters"> </div><!-- end row --> <div class="box"> <div class="row no-gutters"> <div class="col-auto me-auto text-start pe-0"> <div class="add-new"> <a href="select_customerexpense.php">Add New<i class="fas fa-plus"></i></a> </div><!-- End add-new--> </div><!-- End column--> <div class="col text-end"> <div class="tools-btns"> <a href="#"><i class="fas fa-print" data-bs-toggle="tooltip" data-html="true" title="Print"></i></a> <a href="#"><i class="fas fa-file-pdf" data-bs-toggle="tooltip" data-html="true" title="Pdf"></i></a> <a href="#"><i class="fas fa-file-excel" data-bs-toggle="tooltip" data-html="true" title="Excel"></i></a> </div><!-- End tool-btns--> </div><!-- End text-end--> </div> <div class="row no-gutters"> <div class="col-12 table-responsive"> <table id="example" class="table table-hover responsive listing"> <thead> <tr align="center"> <th>Date</th> <th>Customer</th> <th>Heads</th> <th>Subheads</th> <th>Amount</th> <th>Mode</th> <th>Remarks</th> <!--<th>Entered By</th>--> <th>Print Voucher</th> <th>Delete</th> </tr> </thead> <tbody> <?php while($row = $result->fetch(PDO::FETCH_ASSOC)) { $id = $row['id']; $expid = $row['expid']; $expdate = date('d-m-Y', strtotime($row['expdate'])); $expheads = $row['expheads']; $result1 = $js->prepare('SELECT * FROM `heads` WHERE headid = :expheads'); $result1->execute(array(':expheads' => $expheads)); while($row1 = $result1->fetch(PDO::FETCH_ASSOC)) { $heads = $row1['name']; } $tot = $row['expamount']; $expsubheads = $row['expsubheads']; $result2 = $js->prepare('SELECT * FROM `subheads` WHERE subid = :expsubheads'); $result2->execute(array(':expsubheads' => $expsubheads)); while($row2 = $result2->fetch(PDO::FETCH_ASSOC)) { $subheads = $row2['subname']; } $compexp = $tot; $pieces4 = explode(".", $compexp); $mainmenu4 = $pieces4[0]; $submenu4 = $pieces4[1]; $str= strlen($submenu4); if($str == '1') $submenu4 .= '00'; elseif($str == '2') $submenu4 .= '0'; elseif($str == '0') $submenu4 .= '000'; else{} $expamount = $mainmenu4.".".$submenu4; $pmode = $row['pmode']; $premarks = $row['premarks']; $enteredby = $row['enteredby']; echo "<tr>"; echo "<td>$expdate</td>"; echo "<td>$heads</td>"; echo "<td>$subheads</td>"; echo "<td align='right'>$expamount"; if($expheads == 'MI90') { echo "<br> <a href='comploanrepay.php?exp=$expid' style='border-radius:25px; width:120px; padding:10px;' class='bbtn btn-google btn-block'>Repay $expamount</a>"; } echo "</td>"; echo "<td>$pmode</td>"; echo "<td>$premarks</td>"; /*echo "<td>$enteredby</td>";*/ echo "<td align='center'><a href='printexpensevoucher.php?id=$id' style='border-radius:25px; background-color:#1A73E8; text-align:center;' class='btn btn-primary btn-circle' target='_blank'><i class='fas fa-print'></i> </a></td>"; ?> <td><a onclick="return add('<?php echo $expid?>')" style='background-color:red; border-color:red;' class='btn btn-primary btn-circle'><i class='fa fa-times'></i></a></td> <?php echo "</tr>"; } ?> </tbody> </table> </div> </div> </div> </div> <!-- /.container-fluid --> </div> <!-- Optional JavaScript, Not optional it's need too --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="js/jquery-3.3.1.min.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap-5.3.2.min.js"></script> <script src="vendors/datatables/datatables.min.js"></script> <script src="js/customscriptfile.js"></script> <!-- Page Scripts Ends --> <script> $(document).ready(function () { $('#example').DataTable(); }); </script> </body> </html> <script type="text/javascript"> function add(a) { if(confirm('Are You Sure to Delete')) { window.location.href = "delete_companyexpense.php?expid="+ a ; } else { return false; } } </script> <?php include('footer.php'); ?>