@@ -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" | |||
]); |
@@ -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"> |
@@ -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"}); |