dowload button
parent
22c95c4df1
commit
216603a65d
|
@ -45,7 +45,7 @@ return array($totalGST,$totalCost,$totalAmount);
|
|||
<br />
|
||||
<form method="POST">
|
||||
<tabel> <tr>
|
||||
<td> Start Date <input type="date" id="start" name="start"> </td> <td> Date Before <input type="date" id="end" name="end"> </td> <td> <input type="submit" value="view"> <?php if(isset($_SESSION['email']) && $_SESSION['email'] == 'mousumi@fashionavenueonline.com'): ?> <a href="#" onclick="download_table_as_csv('Billing Data');">Download</a> <?php endif; ?></td>
|
||||
<td> Start Date <input type="date" id="start" name="start"> </td> <td> Date Before <input type="date" id="end" name="end"> </td> <td> <input type="submit" value="view"></td>
|
||||
</tr> </table></form>
|
||||
<table id="billDataTable">
|
||||
<tr style="">
|
||||
|
@ -81,6 +81,7 @@ if(isset($_GET['payment'])){
|
|||
$GSTAmount =0;
|
||||
$totalTax =0;
|
||||
$totalGSTlistedBills=0;
|
||||
|
||||
$query = "SELECT * FROM `" . SHOP_ID . "_bill` WHERE `payment_mode` != '0' " . $between . " ORDER BY `id` DESC";
|
||||
$result = mysqli_query($link, $query);
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
|
@ -198,16 +199,19 @@ if(isset($_GET['payment'])){
|
|||
?>
|
||||
</table>
|
||||
|
||||
|
||||
<div style="display: flex; flex-direction: row; place-items: center;">
|
||||
<?php
|
||||
|
||||
echo '<h3> Total Bill: ', $total ;
|
||||
if(isset($_SESSION['email']) && $_SESSION['email']=='mousumi@fashionavenueonline.com' || $_SESSION['email']=='user@fashionavenue.com'){
|
||||
echo ', Cost: ', $total_cost , ', Profit: ', $total-$total_cost,' Total GST: ', $totalGSTlistedBills ;
|
||||
}
|
||||
echo '</h3>'; ?>
|
||||
|
||||
|
||||
<?php if(isset($_SESSION['email']) && $_SESSION['email'] == 'mousumi@fashionavenueonline.com' && strlen($total > 1)): ?> <a href="#" onclick="download_table_as_csv('Billing Data');" style="background-color: #692626; padding: 5px 10px 5px 10px; border-radius: 10px; color: #fff;">Download </a> <?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if(isset($_POST['delete_bill']) && $_POST['delete_bill']){
|
||||
// echo $_POST['delete_bill'];
|
||||
$conn = new mysqli(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,MYSQL_DB);
|
||||
|
|
Loading…
Reference in New Issue