@Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        switch (columnIndex) {
            case 0:
                return ((Invoice) data.values().toArray()[rowIndex]).getNumber();
            case 1:
                return ((Invoice) data.values().toArray()[rowIndex]).getClient().getSortKey();
            case 2:
                String datestring = ((Invoice) data.values().toArray()[rowIndex]).getDate();
                Date date = new Date();
                try {
                    date = new SimpleDateFormat("dd/MM/yyyy").parse(datestring);
                } catch (ParseException ex) {
                    Logger.getLogger(InvoiceTableModel.class.getName()).log(Level.SEVERE, null, ex);
                }
                return date;
            case 3:
                return ((Invoice) data.values().toArray()[rowIndex]).getPrimaryKeyValue();
            default:
                return "Error";
        }
    }