Show useful error message when attempting to finish a transaction with no items

master
Skylar Ittner 6 years ago
parent cddc06972b
commit b8b04199d4

@ -38,6 +38,11 @@ switch ($VARS['action']) {
$database->action(function ($database) {
global $VARS, $binstack, $error, $oktx;
if (empty($VARS['items'])) {
$error = lang("no items", false);
return false;
}
$items = $VARS['items'];
$payments = $VARS['payments'];
$customer = $VARS['customer'];

@ -137,4 +137,5 @@ define("STRINGS", [
"card x added" => "Gift card #{arg} added.",
"card x saved" => "Gift card #{arg} updated.",
"open drawer" => "Open Drawer",
"no items" => "No items in transaction.",
]);

Loading…
Cancel
Save