Add button to clear transaction and restart

master
Skylar Ittner 6 years ago
parent b8b04199d4
commit a4c9966c3f

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

@ -269,6 +269,10 @@ if (isset($_GET['switch']) || !isset($_SESSION['register']) || !$registeropen) {
<?php <?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>
<div class="card-body d-md-none"> <div class="card-body d-md-none">

@ -56,6 +56,12 @@ function recalculate() {
$("#receiptchange").text(change.toFixed(2)); $("#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 // Make sure the session doesn't expire
setInterval(function () { setInterval(function () {
$.get("action.php", {action: "session_keepalive"}); $.get("action.php", {action: "session_keepalive"});

Loading…
Cancel
Save