lang("no cash", false), "id" => "" ]; $registeropen = false; if (isset($_SESSION['register'])) { $registeropen = $database->has("registers", ['[>]cash_drawer' => ['registerid' => 'registerid']], ['AND' => ['open[!]' => null, 'close' => null, 'registers.registerid' => $_SESSION['register']]]); } if (isset($_GET['switch']) || !isset($_SESSION['register']) || !$registeropen) { require_once __DIR__ . "/../lib/chooseregister.php"; } else { $register = $database->get('registers', ['registerid (id)', 'registername (name)'], ['registerid' => $_SESSION['register']]); $showgridbydefault = $binstack->count('items', ['AND' => ['price[!]' => null, 'price[!]' => 0]]) <= GRID_BY_DEFAULT_MAX_ITEMS; $items = []; $payments = []; $editing = false; $returning = false; if (isset($VARS['txid']) && $database->has('transactions', ['txid' => $VARS['txid']])) { $tx = $database->get('transactions', ['[>]customers' => 'customerid'], ['txid', 'discountpercent', 'transactions.customerid', 'customers.name (customername)', 'cashid', 'type'], ['txid' => $VARS['txid']]); if ($tx['type'] != 1) { header('Location: app.php?page=pos&msg=return_transaction_no_edit'); die(); } $items = $database->select('lines', ['lineid', 'amount', 'name', 'itemid', 'qty'], ['txid' => $tx['txid']]); if ($database->has('cash_drawer', ['AND' => ['cashid' => $tx['cashid'], 'open[!]' => null, 'close' => null]])) { $editing = true; $payments = $database->select('payments', ['[>]certificates' => 'certid', '[>]payment_types' => ['type' => 'typeid']], ['payments.amount', 'typename', 'icon', 'text', 'certcode'], ['txid' => $tx['txid']]); echo ""; } else { $returning = true; echo ""; } } ?>
">
" />
$
$
$0.00
">
select('payment_types', ['typeid (id)', 'typename (name)', 'icon', 'text']); $hideforreturns = ['check', 'free']; foreach ($payment_methods as $data) { if ($returning && in_array($data['name'], $hideforreturns)) { continue; } ?>

$
$0.00
$0.00
$
$0.00
$0.00
$
#