Browse Source

Add button to clear transaction and restart

master
Skylar Ittner 1 year ago
parent
commit
a4c9966c3f
3 changed files with 12 additions and 0 deletions
  1. 2
    0
      lang/en_us.php
  2. 4
    0
      pages/pos.php
  3. 6
    0
      static/js/pos.js

+ 2
- 0
lang/en_us.php View File

@@ -138,4 +138,6 @@ define("STRINGS", [
"card x saved" => "Gift card #{arg} updated.",
"open drawer" => "Open Drawer",
"no items" => "No items in transaction.",
"delete transaction" => "Delete transaction",
"transaction discount" => "Transaction discount"
]);

+ 4
- 0
pages/pos.php View File

@@ -269,6 +269,10 @@ if (isset($_GET['switch']) || !isset($_SESSION['register']) || !$registeropen) {
<?php
}
?>
<div class="btn m-1" id="deletetxbtn">
<i class="fas fa-trash"></i>
<span class="sr-only"><?php lang("delete transaction"); ?></span>
</div>
</div>

<div class="card-body d-md-none">

+ 6
- 0
static/js/pos.js View File

@@ -56,6 +56,12 @@ function recalculate() {
$("#receiptchange").text(change.toFixed(2));
}

$("#deletetxbtn").click(function () {
bsalert("Confirm", "Really delete transaction?", "Yes", "No", function () {
window.location.href = "app.php?page=pos";
});
});

// Make sure the session doesn't expire
setInterval(function () {
$.get("action.php", {action: "session_keepalive"});

Loading…
Cancel
Save