@FXML
    private void handleTxtBarCodeAction(ActionEvent event) {
        String itemCode = txtBarCode.getText();

        // Subtraction
        if (itemCode.matches("[0-9]+-$")) {
            int input = Integer.parseInt(itemCode.replaceAll("-", ""));
            if (input > 0 && totalAmount > 0 && input - totalAmount > 0) {
                showChange();
                lblChange.setText(String.format("%,d", input - totalAmount));
            }

            clearBarCode();
            return;
        }

        hideChange();

        // Quantity
        if (itemCode.matches("^[0-9]+\\*[0-9]+")) {
            String[] split = itemCode.split("\\*");
            quantity = Integer.valueOf(split[0]);
            itemCode = split[1];
        }

        String sql = "SELECT * FROM Item where ItemCode = ?";
        Item item = getPersist().read(Item.class, sql, itemCode);
        if (item != null) {
            BigDecimal amount = BigDecimal.valueOf(Integer.parseInt(item.getPrice())).multiply(
                    BigDecimal.valueOf(quantity));
            ItemSaleModel model = new ItemSaleModel(
                    item.getName(), item.getPrice(), String.valueOf(quantity), amount.toString(), item);
            table.getItems().add(model);
            sumTotalAmount(amount.intValue());
            updateItemCounter(quantity);
        }

        initQuantity();
        txtBarCode.clear();
        txtBarCode.home();
    }